Skip to content

ActualLab.Rpc: Diagrams

Diagrams for the RPC concepts introduced in Part 2.

RpcPeer Hierarchy

RpcPeer Hierarchy
Peer TypeDirectionDescription
RpcClientPeerOutboundInitiates connections, handles reconnection with backoff
RpcServerPeerInboundReceives connections from server framework (e.g., ASP.NET)

Connection State Machine

Connection State Machine
StateDescription
DisconnectedNo active connection
ConnectingEstablishing connection and exchanging handshake
ConnectedActive connection, can send/receive messages

RpcPeerRef Types

RpcPeerRef Types
PeerRefConnectionKindUse Case
DefaultRemoteStandard client-server communication
LocalLocalSame-process calls (no serialization)
LoopbackLoopbackTesting with serialization but no network
NewClient(host)RemoteConnect to specific host

RPC Call Flow

RPC Call Flow

Compute Service Client Caching

Compute Service Client Caching
ScenarioBehavior
Cache hit (consistent)Return immediately, no RPC
Cache missMake RPC, cache result
Server invalidationClient replica invalidated, next call triggers RPC

Invalidation Propagation

Invalidation Propagation

RpcStream Data Flow

RpcStream Data Flow
DirectionDescription
Server → ClientStream items sent in chunks
Client → ServerAcknowledgments for backpressure

RpcStream Backpressure

RpcStream Backpressure
PropertyDefaultDescription
AckPeriod30Consumer acks every N items
AckAdvance61Producer can send N items ahead before waiting