fwRPC
 All Files Functions Variables
fwRPC_broker.ctl File Reference

Functions

void fwRPC_broker_initialize ()
 
private void _fwRPC_broker_beginTick ()
 
private void _fwRPC_broker_dbg_report ()
 
public synchronized void fwRPC_broker_newMbxCB (string project, string name)
 
public synchronized void fwRPC_broker_sys_drop (string project)
 
public synchronized void _fwRPC_broker_dropCore (string project, string name="")
 
public synchronized void _fwRPC_broker_dropClient (string project, string name="")
 
public void _fwRPC_broker_hdlDisconnect (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlRequest (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlStatus (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlGetResult (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlSetResult (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlRegister (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlAcknowledge (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlCancel (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlRecover (string senderProject, string senderName, anytype buffer)
 
public void _fwRPC_broker_hdlListServices (string senderProject, string senderName, string buffer)
 
public int _getNextServiceProvider (string service, dyn_string &node)
 

Variables

private global dyn_dyn_mixed g_fwRPC_broker_cores
 
private global int g_fwRPC_broker_coreIndex
 
private global const int _fwRPC_BROKER_TICK_RATE_S = 2
 
private global const int _fwRPC_BROKER_CORE_EXPIRE_TIME_S = 3
 
private global mapping _g_fwRPC_broker_pendingCalls
 

Detailed Description

This library contains functionality for the broker in a distributed RPC system.

Author
Victor Rodrigues (CERN, BE-ICS-SDS)

Function Documentation

public void _fwRPC_broker_hdlListServices ( string  senderProject,
string  senderName,
string  buffer 
)

Handle service listing messages.

Parameters
senderProject(IN, string) originating project
senderName(IN, string) originating name
buffer(IN, anytype) message buffer
Returns
nothing
Exceptions
nothing
void fwRPC_broker_initialize ( )

Initialize the broker module.

Returns
nothing
Exceptions
nothing

Variable Documentation

private global const int _fwRPC_BROKER_CORE_EXPIRE_TIME_S = 3

Time to wait for a core to initially process a new request before reassigning to a different core

private global const int _fwRPC_BROKER_TICK_RATE_S = 2

Time to wait in seconds between ticks to check for core delegation timeout

private global mapping _g_fwRPC_broker_pendingCalls

Mapping of pending calls. New client requests are appended to this collection, signifying that they have not yet received indication that the core has processed it. The broker will wait for _fwRPC_BROKER_CORE_EXPIRE_TIME_S seconds before attempting to reassign the call to a new core.

Once the broker receives a status update for the given call, the call will be removed from this mapping.

key: call hdl value: call packet (fwRPC_DISTMSG_REQUEST_*) with expire timestamp at index 4

private global int g_fwRPC_broker_coreIndex

Current index in round-robin load balancing.

private global dyn_dyn_mixed g_fwRPC_broker_cores

Collection of cores and their available procedures. Structure: DYN_DYN_MIXED: [x]: procedure name