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.

RPC

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.

Which Technology has replaced Remote Procedure Calls?

Remote Procedure Calls (RPC) is a method of communication between software programs, where a client program sends a request to a server program to execute a specific procedure. The server program executes the procedure and returns the results to the client program.
The technology that has largely replaced RPC is Representational State Transfer (REST). REST is an architectural style for building web services that use HTTP as the underlying protocol. In REST, resources are identified by Uniform Resource Identifiers (URIs), and a client program can perform four basic operations on a resource using the HTTP protocol: GET, POST, PUT, and DELETE. One of the main advantages of REST over RPC is that it is simpler and more flexible. REST is based on the HTTP protocol, which is a widely adopted standard, and it uses a stateless client-server model, which makes it easier to scale and maintain. REST also supports a variety of data formats, such as XML and JSON, which makes it more adaptable to different programming languages and platforms. Another advantage of REST is that it can be used over the internet, making it an ideal technology for building distributed systems. REST is widely used in web development and in building APIs (Application Programming Interfaces) that enable different software applications to communicate with each other over the internet.
The next lesson covers data integration middleware.