OSF DCE Application Development Guide--Core Components

Developing a Simple RPC Application
Calling Code
Remote Procedures
Input arguments
4
RPC Runtime
Server Stub
Client Stub
RPC Runtime
RPC Client RPC Server
2
37
6
1
8
5
Output arguments/return value
The following steps describe the interrelationships of the components of RPC
applications, as shown in the previous figure:
1. The client’s application code invokes a remote procedure call, passing the input
arguments to the stub for the particular RPC interface.
2. The client’s stub marshalls the input arguments and dispatches the call to the
client’s RPC runtime.
3. The client’s RPC runtime transmits the input arguments to the server’s RPC
runtime, which dispatches the call to the server stub for the RPC interface of the
called procedure.
4. The server’s stub unmarshalls the input arguments and passes them to the called
remote procedure.
5. The procedure executes and then returns any results (output arguments or a return
value or both) to the server’s stub.
6. The server’s stub marshalls the results and returns them to the server’s RPC
runtime.
7. The server’s RPC runtime transmits the results to the client’s RPC runtime, which
dispatches them to the correct client stub.
8. The client’s stub unmarshalls output arguments and returns them to the calling
code.
124245 Tandem Computers Incorporated 117