PreviousNext

RPC Interfaces That Represent Services

The simplest RPC application uses only one RPC interface. However, an application can use multiple RPC interfaces, and, frequently, an integral set of RPC interfaces work together as an RPC service. An RPC server is a logical grouping of one or more RPC interfaces. For example, you can write a calendar server that contains only a personal calendar interface or a calendar server that contains additional RPC interfaces such as a scheduling interface for meetings.

Different servers can share one or more RPC interfaces. For example, an administrative-support application can include an RPC interface from a calendar service.

An RPC interface exists independently of specific applications. Each RPC interface can be implemented by any set of procedures that conforms to the interface definition. The operations of an interface are exactly the same for all implementations of the same version of the interface. This makes it possible for clients from different implementations to call the same interface, and servers from different implementations to offer the same interface.

The following figure shows the role of RPC interfaces in remote procedure calls. This client contains calling code that makes two remote procedure calls. The first is a remote procedure call to Procedure A. The second is a remote procedure call to Procedure B.


Role of RPC Interfaces

Clients can use any practical combination of RPC interfaces, whether offered by the same or different servers. For this example, using a database access interface, a client on a graphics workstation can call a remote procedure on a database server to fetch data from a central database. Then, using a statistics interface, the client can call a procedure on another server on a parallel processor to analyze the data from the central database and return the results to the client for display.