liveBook · Manning

Remote procedure call

As explained in API Design Patterns

A remote procedure call is a mechanism for invoking a procedure or method whose execution occurs on another computer or process.

A remote procedure call (RPC) invokes a preconfigured procedure or method on another computer or process. It frames an API around actions such as predictWeather(postalCode), encrypt(data), or sendEmail(to). section 1.3

RPC works especially well for stateless operations, where each request stands alone. It becomes a poorer fit for stateful operations that depend on earlier requests or previously stored data, making resource-oriented designs a useful alternative. section 1.3

Flight-booking API

An RPC-style interface might expose ScheduleFlight(), GetFlightDetails(), ShowAllBookings(), CancelReservation(), RescheduleFlight(), and UpgradeTrip(). Standard resource methods instead use names such as CreateFlightReservation(), GetFlightReservation(), ListFlightReservations(), DeleteFlightReservation(), and UpdateFlightReservation(). section 1.3

How API Design Patterns covers it

How deep it goes
Defines invocation style and contrasts stateless and stateful fit without detailing transport or implementation internals.
Examples
Uses weather forecasting, encryption, email, and flight-booking methods to illustrate action-oriented API naming.
What you can do after
Evaluate whether an action-oriented RPC interface fits stateless functionality or stateful resource operations.
How it connects
Connects RPC with APIs, statelessness, statefulness, resources, and REST-oriented API design.

Also explained in

Compare how 5 books explain remote procedure call →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of API Design Patterns. The section links point to the parts of the book it draws on.