Remote Procedure Call
What Is a Remote Procedure Call?
Remote procedure call, or RPC, lets one program run a function on another system over a network as if it were local. A client sends a request to a server, which performs the function and returns a result. RPC hides message passing, but calls can still be delayed or fail.
How RPC Calls Work
RPC frameworks make network requests look like normal function calls by translating program data into network messages.
- The client calls a local proxy, or client stub, with a function name and arguments.
- The proxy serializes, or marshals, arguments into a format such as JSON or Protocol Buffers.
- The RPC runtime sends the request to the server endpoint.
- The server validates the caller and request, converts the data, and runs the procedure.
- The server returns a result or error for the client runtime to convert into a response.
An interface definition can specify functions, inputs, and outputs. This shared contract can also generate reliable client code.
Benefits of Remote Procedure Call
RPC is useful when one backend service needs a direct action from another.
- Clear contracts define what an operation accepts and returns.
- Generated clients reduce networking code and input-handling mistakes.
- Strong typing can catch incompatible data before release.
- Efficient request-response exchanges suit internal microservices, authentication checks, and database-related service actions.
Practical Limits of RPC
A remote call is not truly local. Treat every RPC request as a network operation with an uncertain outcome.
- Latency, dropped connections, and server overload can cause timeouts or partial failures.
- A retry may repeat an action if the server completed it but the response was lost. Make write operations idempotent where possible.
- Client and server versions can drift, so evolve contracts carefully and maintain backward compatibility when needed.
- Set deadlines, limit retries, authenticate callers, authorize actions, and record logs, metrics, and traces.
RPC vs REST vs gRPC
RPC describes an interaction style. gRPC is a modern RPC framework, not another name for all RPC approaches.
| Approach | Interaction model | Common format | Best fit | Browser friendliness and coupling |
|---|---|---|---|---|
| RPC | Call named actions | Varies | Internal service operations | Usually more contract-coupled |
| REST | Work with resource URLs using HTTP methods | Usually JSON | Public web APIs and broad compatibility | Browser-friendly and relatively loose |
| gRPC | Typed RPC methods, including streaming | Protocol Buffers | High-performance service-to-service systems | Often needs browser support tooling |
Is RPC Still Used?
Yes. RPC remains common in cloud services, distributed systems, and operating-system services. JSON-RPC, Microsoft RPC, and gRPC are established examples. RPC is related to inter-process communication, or IPC, but IPC is broader and includes processes on the same machine. RPC specifically models calling a procedure in another process or system.
Remote Procedure Call in Emergent
In Emergent, RPC-style calls can connect frontend features to backend services and third-party integrations. Understanding function calling clarifies how an application invokes a defined action, while a callback URL supports asynchronous responses from outside services. Generated integrations still need contracts, secure credentials, authorization, timeouts, and error handling.
on Emergent today

