Skip to main content

Module in_memory

Module in_memory 

Source
Expand description

In-process RPC transport for co-located services.

Dials a service running in the same process without a network socket. This is the in-memory dial target the crate::dial factory selects for inproc:// endpoints — the replacement for ZMQ’s inproc:// transport.

§No second security model

InMemoryTransport::send forwards the canonical request bytes to an IrohRequestProcessor (in production a LocalServiceBridge, which isolates !Send tch-holding services on a dedicated LocalSet thread and exposes only a Send Bytes-in/Bytes-out surface) and returns the signed response bytes. The envelope is signed and verified by the exact same process_request path a networked transport uses — co-located calls skip serialization to a socket, never authentication or Casbin authz. This is behaviourally identical to ZMQ’s inproc:// (serialize once, no socket), so there is no distinct trust path to review.

Per the A1 addressing spike, every in-process call goes through the bridge (one channel hop — the same cost as inproc-ZMQ today). A zero-hop tier that calls process_request directly is inexpressible while RequestService is unconditionally ?Send; it is a deliberate later follow-up, not part of this change.

§RPC plane only

Like SessionRpcTransport, this transport is request-response only; subscribe/publish bail. The streaming plane (moq-net) carries SUB/PUB, and in-process streaming is deferred with the streaming substrate (#134).

Structs§

InMemoryTransport
In-process RPC transport over an IrohRequestProcessor.