Homeglossary

Remote Procedure Call

Remote procedure call is a software communication method that lets one program run a function on another system over a network as though it were a local function. RPC hides much of the message passing, but developers must still design for network delays, failures, security, and repeated requests.

Build API-powered apps with Emergent.

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.

  1. The client calls a local proxy, or client stub, with a function name and arguments.
  2. The proxy serializes, or marshals, arguments into a format such as JSON or Protocol Buffers.
  3. The RPC runtime sends the request to the server endpoint.
  4. The server validates the caller and request, converts the data, and runs the procedure.
  5. 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.

ApproachInteraction modelCommon formatBest fitBrowser friendliness and coupling
RPCCall named actionsVariesInternal service operationsUsually more contract-coupled
RESTWork with resource URLs using HTTP methodsUsually JSONPublic web APIs and broad compatibilityBrowser-friendly and relatively loose
gRPCTyped RPC methods, including streamingProtocol BuffersHigh-performance service-to-service systemsOften 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.

Start Building
on Emergent today
Start Building