A workstation will not attempt to open a connection to another workstation until it has a reason to do so. Such reasons might include:
1. A service instance has registered and needs to communicate with a workstation;
2. A directed remote procedure call has been made to the remote workstation;
3. The RPC Manager has explicitly requested to open a connection to a workstation; or
4. The remote workstation has initiated communication due to one of the above 3 reasons.
When a connection is to be established for the first time, RPC Manager creates a MachineNode to oversee communication with the remote workstation, and one or more SocketNodes to maintain the raw socket stream connection between the workstations.
The SocketNodes maintain the communication pathways between the MachineNode at either end of the link and report status changes to their owning MachineNode. The MachineNodes for the various interconnected workstations report status changes that they cannot transparently manage to the \Code level RPCServerNotice(), (see RPC Call-backs), and to the TagNodes that are using them. TagNodes use these events in their driving of service instances.
SocketNode\SocketOpen will initially be Invalid. The SocketNode will aggressively try to establish a socket stream connection with a SocketNode on the remote workstation up to the number of times specified in the RPCSktConnectAttemptMax system configuration setting, before deciding whether to mark the SocketNode open or not. If it fails to obtain a satisfactory connection within this number of attempts, SocketNode\SocketOpen is marked as closed (0) and MachineNode informed.
Once a socket stream has been opened, SocketNode interrogates the stream to get detailed network information. It then marks the SocketNode open (SocketOpen>0) and informs MachineNode.
Session management information is now retrieved from MachineNode and transmitted to the remote MachineNode. When the MachineNode first successfully exchanges session management information, each of the two MachineNodes is marked as open (MachineNode\SocketOpen > 0). At this point, "pinging" is initiated down the socket stream. (A "ping" is merely a "keep-alive" transmission that elicits no response from the other end.) Pings are very efficient and are only sent if there has been no other communication activity on the socket stream for the number of seconds defined in the RPCPingInterval system configuration setting.
If no activity is observed on a socket stream for the number of seconds defined in the RPCReconnectTime system configuration setting, the SocketNode terminates the socket stream and attempts to open another one. Once again, RPCSktConnectAttemptMax attempts are made at establishing a connection during the connection establishment process, as described above.
After RPCReconnectTime has expired, if no connection can be established within the number of seconds defined in the RPCSocketDeadTime system configuration setting, any sessions which the MachineNode has with applications running on the remote workstation are terminated, and their session IDs set to RPC_NO_SID. The session IDs will be set to new values when the session tables are re-built after a connection is re-established with the remote workstation (see Session Ids for further information on session IDs).
MachineNode will attempt to transmit RPCs to the remote workstation while it is marked as open. Each RPC transmitted receives positive acknowledgement of its receipt. Failure to receive this acknowledgement within the number of seconds defined in the RPCResendDelay system configuration setting causes MachineNode to resend it. There will be a maximum of RPCSktResendAttempts to transmit the RPC successfully. If, after these retries, the RPC has still not been acknowledged, the socket stream is terminated and SocketNode goes through its link re-establishment cycle, as above.
All RPCs carry with them an identification that prevents a re-transmitted RPC from being executed in the event that it was received and executed, but the acknowledgement was lost.
Note: If you require information on the available RPC configuration file settings, please refer to Setup.ini [SYSTEM] Section Values for the RPC Manager.
Topics in this section: