RPC
Abbreviation · Development
Definitions
RPC, or Remote Procedure Call, is a communication protocol that allows a program to execute a function or procedure on a remote server as if it were a local function call, abstracting away the details of network communication. The client calls a function, the RPC framework serializes the arguments, sends them over the network to the server, the server deserializes and executes the function, and the result is sent back the same way. This abstraction makes distributed computing feel like local programming. Classic RPC implementations include Sun RPC (ONC RPC) and XML-RPC. Modern frameworks include gRPC (Google, using Protocol Buffers and HTTP/2 for high performance), Apache Thrift (Facebook), and tRPC (TypeScript, providing end-to-end type safety). gRPC has become the dominant choice for microservice-to-microservice communication due to its binary protocol efficiency, bidirectional streaming, and automatic code generation from interface definitions. REST and RPC represent different philosophies: REST models resources and uses HTTP methods, while RPC models actions and function calls. Many systems use REST for external APIs and gRPC for internal service communication.
In plain English: A way for one computer to run a function on another computer as if it were running locally, hiding all the network complexity.
Example: "Our services communicate over RPC — the client just calls getUser() and the stub handles serialization and the network hop."
Etymology
- 1976
- RFC 707 introduced the concept of remote procedure calls for the ARPANET.
- 1984
- Birrell and Nelson published the seminal paper 'Implementing Remote Procedure Calls' at Xerox PARC.
- 2015
- Google released gRPC, a high-performance RPC framework using HTTP/2 and Protocol Buffers.