Async RPC
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.
-
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.
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:
- Specification of the coordination prototcol
- Specification of the recovery protocol
- Specification for message passing
Footnotes
-
Em-dash not generated by AI ↩