Understanding RPC Services

In the RPC model, the local interface is known as the caller, and the remote interface is known as the dispatcher. A caller and dispatcher that work together to implement a remote request protocol are referred to as a caller-dispatcher pair.

A simple remote procedure call setup consists of:

Figure 5
shows a simple caller-dispatcher pair model, where the caller resides in the local task and the dispatcher and implementation objects reside in a remote task. When interacting:

  1. The caller uses stub code to send function parameters to the remote task, where the dispatcher receives them.
  2. The dispatcher uses its own stub code to retrieve these parameters and send them on to the dispatcher implementation.
  3. The dispatcher implementation executes the member function that corresponds to the caller request.
  4. The dispatcher implementation returns results back to the dispatcher.
  5. The dispatcher sends the results back to the caller.

Using a two-step process of dispatching--where a dispatcher calls a separate implementation object--keeps the dispatcher implementation class independent of remote processing; the member functions do not need to know that they are being called remotely.


While the interaction of a caller-dispatcher pair uses the client-server model, callers and dispatchers do not always correspond exactly to clients and servers. In general, clients and servers are more complex than a single caller-dispatcher pair. A client often has multiple callers, and a server might have one or more dispatchers. Also, a server usually has more structure than a dispatcher, encompassing a tasking model, the transport mechanism, and resources that the server manages.

You can use callers and dispatchers as building blocks out of which you create clients and servers. As Figure 6 illustrates, you can construct servers out of multiple caller-dispatcher pairs and their variations. For information on various ways to configure a server, see "Designing servers" on page 93.



[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker