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.

Frequently Asked Questions

Your Questions, Answered

This will automatically populate, don't change

Don't change this element unless you know what you are doing

What is a Remote Procedure Call (RPC)?

RPC is a method that lets software request a function from another program or server over a network. It makes the request resemble a local function call while the framework handles network communication.

How do RPC calls work?

A client calls a proxy function, which serializes the arguments and sends them to a server. The server runs the requested procedure and sends back a result or an error response.

What is IPC and RPC?

IPC, or inter-process communication, is the broad category of ways separate programs exchange data. RPC is a type of IPC that focuses on invoking a named procedure, often across a network.

What is the difference between gRPC and RPC?

RPC is the general pattern of calling a remote procedure. gRPC is a specific RPC framework that commonly uses Protocol Buffers, generated code, and HTTP/2-based transport.

Why use RPC instead of REST?

Use RPC when your API is centered on specific actions, such as validatePayment or createSession, especially between internal services. REST can be a better choice for resource-oriented public APIs and straightforward browser compatibility.

Is RPC still used?

Yes. RPC is widely used for internal APIs, cloud services, operating-system services, and distributed applications. Common implementations include gRPC, JSON-RPC, and Microsoft RPC.

Is RPC a security risk?

RPC can become a security risk if endpoints accept unauthenticated callers or expose powerful actions too broadly. Use encrypted transport, strong authentication, per-action authorization, input validation, rate limits, and audit logs.

Start Building
on Emergent today
Start Building