Skip to main content

Async RPC

In-progress

This documentation is in-progress. You may reference it and use it as needed, but be aware that it is incomplete and subject to change.

tl;dr

The purpose of this document is to formalize Async RPC, an open, vendor-neutral specification of an asynchronous remote procedure call that is

  • based on Durable Promises
  • simple to understand
  • simple to develop
  • simple to operate

Context

Most distributed applications communicate via synchronous, request-response interactions over connection-oriented protocols such as HTTP or gRPC—an abstraction that crumbles as applications scale across space and time1.

Synchronous RPC

Synchronous RPCs operate on a connection-oriented model where caller and callee share a persistent connection. Request and response must flow over the same connection, creating a tight, transitive spatial and temporal coupling between caller and callee.

  • Scaling across space

    As the number of executions and therefore the number of persistent connections increases, connections become a point of failure: when the root connection of a subgraph fails, the entire subgraph is lost. A retry initiated by the caller can mitigate the failure, however the entire subgraph, has to be executed again.

    Distributed across space

  • Scaling across time

    As the number of executions and therefore the number of persistent connections increases, connections become a point of failure: when the runtime of a subgraph exceeds the lifetime of its root connection, the entire subgraph is lost. A retry initiated by the caller cannot mitigate the timeout, since the entire subgraph will exceed the lifetime again.

    Distributed across time

Asynchronous RPC

Asynchronous RPC operates on a message-passing model where caller and callee do not share a persistent transport connection. Request and response may flow over the same or different connections, creating a loose spatial and temporal coupling between caller and callee.

Structure of the specification

This specification consits of three prescriptive parts:

  1. Specification of the coordination prototcol
  2. Specification of the recovery protocol
  3. Specification for message passing

Footnotes

  1. Em-dash not generated by AI