RPC Internal Routing

RPC Manager absolutely guarantees that a sequence of RPCs generated on one workstation, will be routed to the next consumer of the request in the order that the RPCs were generated.

What this means to the programmer is that two consecutive RPCs that are to be executed on the same workstation as each other (but not necessarily the same workstation on which they were generated), will always be executed in the order in which they were generated. This assumption promotes robust algorithms when programming for a distributed system. This assumption is necessary for the correct operation of services and other parts of the RPC subsystem.

To achieve this, RPC Manager serializes all RPC requests through a single FIFO queue on the local workstation. The serialization includes not only locally generated requests, but also requests that arrive from other workstations.

RPC requests are then removed, one at a time, from the serialization FIFO and examined to determine:

      If the request should be forwarded to other RPC manager instances in the distributed system where the request will be processed in an identical fashion; or

      If the request should be executed on the local workstation.

Each MachineNode contains a transmission FIFO, ensuring that RPC requests are delivered to the remote workstation in the strict order that they were generated on the local workstation. MachineNode selects the SocketNode to encode and transmit the request, according to the methods outlined in the section in RPC Manager Methods Reference.

Each SocketNode\Receiver module accepts and decodes the incoming requests and places them on the local serialization FIFO for processing.

The flow of RPC requests through the RPC subsystem is depicted in the following diagram, where the parenthesized names are the RPC Manager module that performs the operation:

image\help0003_wmf.gif

The settings that were provided by the original \RPCManager\Send()subroutine call provide the initial routing information. RPC Manager may modify this information before queuing the RPC request on a transmission FIFO, so that the receiving RPC Manager will make the correct decisions about any further routing. Further routing only occurs in the "client of a client" case (see the section Clients of Clients).

To achieve this, the RPC request carries a set of "routing flags" with it, which are transported across workstations. These flags and the routing strategy are discussed in the RPC External Routing section below.

With the Diagnostics window's "Detail Trace" button pressed, the routing of RPC requests between the serialization FIFO and the transmission FIFOs are revealed. A request received from a remote workstation is diagnostically recorded when it is posted to the serialization FIFO, when it is removed from the serialization FIFO for processing, and when it is queued on each transmission FIFO.

Without this button pressed, an RPC from a remote workstation will be recorded only when it is removed from the serialization FIFO or when it is queued on each transmission FIFO.