Trusted answers to developer questions

What is a Remote Procedure Call (RPC)?

Get Started With Data Science

Learn the fundamentals of Data Science with this free course. Future-proof your career by adding Data Science skills to your toolkit — or prepare to land a job in AI, Machine Learning, or Data Analysis.

Remote Procedure Call (RPC) is a distributed computing technique in which a computer program calls a procedure (subroutine or service) to execute in a different address space than its own. The procedure may be on the same system or a different system connected on a network.

The idea behind RPC is that a computer program can call and execute a subroutine on a remote system just like it would call a local subroutine, but the network communication details are hidden from the user.

Client-server model

RPC is a request–response protocol, i.e., it follows the client-server model:

The client makes a request to execute a procedure on the remote server. Like a synchronous local call, the client is suspended until the procedure results are back. The procedure’s parameters are passed over the network to the server-side. The procedure executes on the server and, finally, the results are transferred back to the client.

A remote procedure call
A remote procedure call

Advantages

  • RPC can be used in distributed environments and local environments.
  • RPC is implemented in nearly all popular programming languages including Java, Python, and Go.
  • RPC provides an abstraction – the user doesn’t need to know the details of how the RPC interaction was handled over the network.
  • RPC supports process-oriented and thread-oriented models.

RELATED TAGS

distributed services
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?