Web Infrastructure  «Prev  Next»
Lesson 4 Remote Procedure Calls (RPCs)
ObjectiveDescribe the function of RPCs.

What is RPC?

RPC, short for remote procedure call, is a client-server based protocol. It was an important tool in the early history of middleware development.

The history of RPC

Sun Microsystems developed the first widely used RPC protocol as part of their Open Network Computing (ONC) architecture in the early 1980s. The specification has been handed off to the Internet Engineering Task Force (IETF) as a step toward making ONC RPC an Internet standard. RPCs were viewed as potential saviors for inter-program interoperability up until the mid-1990s. RPCs, however, require a significant amount of hard coding, and can be impacted by version changes on either side of the call. Object Request Brokers (ORBs), covered in another lesson, gained popularity in the mid- and later 1990s. They offer enormous flexibility and management, as they are standards-based and protect against version changes. ORBs essentially have pushed RPCs out of the market.


A remote procedure call is an interprocess communication protocol that is used for client-server based applications.
A client makes a request message, which the RPC translates and sends to the server. This request is a procedure call to a remote server. When the server receives the request, it sends the required response back to the client. The client is blocked while the server is processing the call and only resumes execution after the server is finished. The sequence of events in a remote procedure call are given as follows:
  1. The client stub is called by the client.
  2. The client stub makes a system call to send the message to the server and puts the parameters in the message.
  3. The message is sent from the client to the server by the operating system of the client .
  4. The message is passed to the server stub using the server operating system.
  5. The parameters are removed from the message by the server stub.
  6. Then, the server procedure is called by the server stub.
Note: RPCs are no longer widely used, though they are important in the context and history of integration software.
RPCs allow a program on one computer to execute a program on a server computer. Using RPC, a system developer need not develop specific procedures for the server. The client program sends a message to the server with appropriate arguments and the server returns a message containing the results of the program executed. RPC-based products are procedure- or function-oriented. Developers create an RPC in three stages:
  1. They define functions using an interface description language (IDL).
  2. They compile that function into client and server stubs that actually do the networking.
  3. They use function calls within a development tool, such as 3GL languages and 4GL products, to call the function.
The key for the developer is whether the RPC-based middleware generates functions in the very tool in which the applications were developed. For applications that were once multi-user system based but are now being distributed, the RPC approach is very intuitive. Each existing function can be split across the network as needed.
The next lesson covers data integration middleware.