What Is A Remote Procedure Call?

What Is A Remote Procedure Call

Date First Published: 20th June 2022

Topic: Computer Networking

Subtopic: Internet Protocols

Article Type: Computer Terms & Definitions

Difficulty: Advanced

Difficulty Level: 9/10

Learn more about what a remote procedure call is in this article.

A Remote Procedure Call (RPC) is a software communication protocol that can be used by a program in order to request a service from a program that is located in another computer on a network without having to understand the details of the network. In other words, it enables the ability to run code or a program from a remote source. A computer without a hard drive might use NPC to access data from a network file system (NFS).

Note: Info Icon

Two newer object-oriented ways of programs communicating with each other, called CORBA and DCOM provide the same types of capabilities as remote procedure calls.

How Does RPC Work?

Usually, computer programs run sets of instructions using the CPU, meaning that the instructions are processed locally on exactly the same computer that the software is running on. However, remote procedure calls work by running procedures, or sets of instructions, on other devices connected to a network. The end results of the procedure are returned to that local computer once the procedures have been run.

RPC uses the client-server model. The program that sends the request is a client and the program that provides the services is known as the server.

RPC is known as a request-response protocol. A remote procedure call is performed by the client. The client then sends a request message to a remote server to run a specified procedure with supplied parameters. The remote server sends a response to the client. Whilst the server is processing the call, the client then waits until the server has finished processing before going back to running a specified procedure.

During a remote procedure call, the following steps occur:

  • The client calls the client stub. The call is a local procedure call.
  • The client stub packs the parameters onto a message and makes a system call to send the message. Packing the parameters is known as marshalling.
  • The local operating system of the client sends the message from the client node to the server node.
  • The local operating system on the server node sends the incoming packets to the server stub.
  • The server stub unpacks the parameters from the message. Unpacking the parameters is known as unmarshalling.
  • Finally, the server stub calls the server procedure.

Advantages and Disadvantages Of RPC

The advantages of RPC are:
  • It removes a lot of the protocol layers to enhance performance.
  • It requires little effort to rewrite and redevelop the code.
  • It can be used in a distributed environment as well as a local environment.
  • It helps clients to communicate with servers through the use of procedure calls in high-level languages.
  • It supports process-oriented and thread-oriented models.
  • It provides abstraction, which is when the message-passing nature of network communication is hidden from the user.
The disadvantages of RPC are:
  • RPC systems are not always suitable for transferring large amounts of data as the client and server use different running environments for their procedures.
  • It is vulnerable to failure due to it involving a communication system, another node, and another process.

History

The term 'remote procedure call’ was invented in 1981 by Bruce Jay Nelson. In 1982, one of the earliest practical implementations of RPC took place by Brian Randell and his colleagues for their Newcastle Connection between UNIX systems. ‘Lupine’ was soon implemented by Andrew Birrell and Bruce Nelson in the Cedar environment at Xerox PARC. Lupine generated stubs automatically, providing type-safe bindings, and used as an efficient protocol for communication.

One of the first business uses of RPC was by Xerox under the name ‘Courier’ in 1981. Sun’s RPC, now called ONC/RPC, was the first popular implementation of RPC on Unix. It was used as the basis for the Network File System (NFS).


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.