RPC – Remote Procedure Call

R

RPC is a powerful technique for building distributed applications based on the client-server model. The model extends the notion of local call procedure, the difference being that the called procedure is not in the same addressing space with the calling procedure. The two processes involved may be on the same computer or may be on two computers in the network. Using PRC, distributed application programmers bypass the development of application interfacing with the network.

In a way, sending a message to a host and receiving a response resembles calling a function in a programming language. In both cases, it starts with one or more parameters and returns a result. This similarity translates into the network environment in the form of procedural calls. This formulation makes it easy to program applications.

The first to use this concept was Nelson and Birrell in 1984. They came up with the idea of ​​allowing programs to initiate calls to procedures on other hosts. When a process on car A calls a procedure on machine B, the process calling is suspended, and the execution of the procedure takes place on machine B. The information is transported from the caller called to parameters, and returns as a result.

For the programmer, this information exchange is not visible. This technique is known as the RPC Call Procedure and has become the basis for many of the networking applications. The calling party of the procedure is referred to as the client; called is called server. The purpose of the RPC is to make a procedural appeal appear to be a local one. In the simplest form, to call a procedure elsewhere, the client program must have a library called the stub client that represents the server procedure in the client’s address space. Similarly, the server also has its own side: server stub. These procedures hide the fact that the client-to-server call is not local. Note: The client procedure, written by the programmer, makes a simple procedure call to the client stub, which has the same name as the server procedure.

As long as the customer’s procedure and stub are in the same address space, the parameters are set in the usual way. In the same way, the procedure on the server is called by a procedure from the same address space, with the expected parameters. Thus, instead of socket-in-out operations, network communication is done by mimicking a simple procedure call.

Consider the following simple example:
A client/server application that searches in a database on a network machine. We assume that the database can not be accessed from the local station using NFS.

The RPC alternative is:
1. Develop a server to run on the machine on which the database is and respond to remote calls; To develop a PRC application, you need to follow these steps:
2. Construction of a protocol for client/server communication.
3. Develop a server program.
4. Developing a client program.

These programs will be compiled separately. The communication is done by generating stub and skeleton for the client side, respectively, the server. RPC between client and server is one of the applications where UDP is very used.

About the author

Ilias spiros
By Ilias spiros

Recent Posts

Archives

Categories