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

RpcRef Types ​

RpcRef 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
AckAdvance61Wire window: producer may have N items in flight past the last ACK
BufferSize0Local-only sender ring buffer hint (0 = inherit AckAdvance); set larger to pre-buffer past the in-flight window