Skip to main content

Crate sim_lib_stream_fabric

Crate sim_lib_stream_fabric 

Source
Expand description

Content-addressed distributed evaluation for remote stream realization.

This crate is the EvalFabric / realize transport layer for SIM streams: the location-transparent eval surface that server and agent code target to place work and exchange streams, rather than reaching for transport-specific APIs. It turns StreamValue packet spines into kernel chunk events or existing server stream frames, and turns event or frame buffers back into lazy stream spines. It stays in library space: it does not add server frame kinds or kernel object hooks.

Content-addressed evaluation treats a fleet as a store of immutable eval replies. ContentServeFabric answers a request only if this node already holds its ContentKey. ContentAddressedFabric presents local and peer cassettes as one EvalFabric: it checks the local EvalCassette, asks peers that hold the content id, computes on a home site when no holder has the reply, and records every successful reply so this node becomes a holder too. There is no routing table; the lookup question is simply “who holds content id X.” HoldingIndex is a grow-only gossip index of holders. Because content never mutates, a holder fact is never invalidated and the index needs no consensus. Recovery is EvalCassette::from_ledger replay. The FleetRelayFabric design names the explicit-routing alternative for small, statically known fleets.

The surface has four families:

Structs§

ContentAddressedFabric
Content-addressed lookup fabric over local and peer cassettes.
ContentKey
Content-addressed identity for an EvalRequest.
ContentPeer
A peer that may hold content in its local cassette.
ContentServeFabric
Read side of the content-addressed store for one node.
EffectLedgerCassette
A kernel EffectLedger adapter for EvalCassette.
EvalCassette
An EffectLedger-backed cache of content-addressed eval replies.
HeldContent
A claim that one node holds one content id in its cassette.
HoldingIndex
A grow-only index of which nodes hold which content ids.
LedgeredRelayFabric
A cache-first EvalFabric that records successful replies in a cassette.
PlacementResourceLimits
Resource bounds enforced on a server placement before and during execution.
RelayFabric
A remote or relayed EvalFabric node carrying a surface session.
ServerPlacementRequest
Server placement request carried through stream-fabric server frames.
StreamFrameLimits
Resource bounds applied while encoding a stream into server frames.

Enums§

PlacementCapability
Capability a peer must hold to place work across the stream fabric.
RelayStatus
The connection state of a RelayFabric link.
StreamControl
Control-plane operation exchanged over remote stream-fabric frames.

Traits§

EvalCassetteLedger
Append and replay surface used by EvalCassette.

Functions§

cassette_to_stream_frames
Re-encodes a recorded StreamCassette back into server frames.
event_buffer_to_stream
Folds a buffer of run events into a pull-based StreamValue.
expr_chunk_event
Builds a chunk event whose payload is the interned data packet (kind expr).
expr_to_stream_chunk_frame
Compatibility helper. New code should call sim_lib_server::stream_chunk_frame_from_expr directly.
ledgered_relay_fabric_value
Wraps inner and cassette as an opaque runtime value.
placement_capability_names
Returns the kernel capability names for every PlacementCapability.
placement_host_device_capability
Returns the capability required to reach a host device during placement.
placement_remote_render_capability
Returns the capability required to render a fragment remotely.
placement_run_node_on_lan_peer_capability
Returns the capability required to run a placed node on a LAN peer site.
placement_run_node_on_server_capability
Returns the capability required to run a placed node on the server site.
realize_placed_stream_events
Realizes a placed fragment on site and returns its output envelopes.
realize_stream_events
Drains a stream into the events of one realized run.
redact_placement_expr
Returns a copy of expr with sensitive placement data redacted.
refused_profile_diagnostic_kind
Returns the diagnostic kind marking a transport profile refused over frames.
remote_error_diagnostic_kind
Returns the diagnostic kind marking a remote-side error surfaced locally.
remote_frame_to_event
Converts a single remote server frame into a run event, if it carries one.
server_buffered_preview_profile
Returns the server buffered-preview output profile.
server_placement_frame_operation_symbols
Returns the request, result, and refusal placement operation symbols.
server_placement_refusal_diagnostic_kind
Returns the diagnostic kind emitted when server placement is refused.
server_placement_refusal_symbol
Returns the operation symbol for a server placement refusal data frame.
server_placement_request_symbol
Returns the operation symbol for a server placement request data frame.
server_placement_result_symbol
Returns the operation symbol for a server placement result data frame.
server_placement_stream_frames
Places a fragment on the server site and encodes the exchange as frames.
server_render_return_profile
Returns the server render-return output profile.
server_site_symbol
Returns the site symbol naming the server placement target.
stream_chunk_frame_to_expr
Compatibility helper. New code should call sim_lib_server::stream_frame_to_expr directly.
stream_control_cancel_symbol
Returns the operation symbol for the cancel control action.
stream_control_close_symbol
Returns the operation symbol for the close control action.
stream_control_fault_symbol
Returns the operation symbol for the fault control action.
stream_control_frame_from_control
Encodes a StreamControl into a server stream-chunk frame.
stream_control_from_frame
Decodes a server stream-chunk frame back into a StreamControl.
stream_control_metadata_symbol
Returns the operation symbol for the metadata control action.
stream_control_next_symbol
Returns the operation symbol for the next control action.
stream_control_open_symbol
Returns the operation symbol for the open control action.
stream_control_operation_symbols
Returns every stream-fabric control operation symbol, one per variant.
stream_control_push_symbol
Returns the operation symbol for the push control action.
stream_control_required_capability
Returns the capability required to perform control.
stream_control_stats_symbol
Returns the operation symbol for the stats control action.
stream_frames_to_cassette
Decodes server frames into a replayable StreamCassette.
stream_frames_to_events
Decodes server frames into stream metadata plus a buffer of run events.
stream_frames_to_stream
Decodes a buffer of server frames back into a lazy StreamValue.
stream_limit_diagnostic_kind
Returns the diagnostic kind marking a stream truncated by a fabric limit.
stream_realize_request
Builds a realize request that observes a term as an event stream.
stream_to_frames
Encodes a stream into server frames with default envelope, profile, limits.
stream_to_frames_with_envelope
Encodes a stream into server frames under a caller-supplied frame envelope.
stream_to_frames_with_limits
Encodes a stream into server frames, enforcing every fabric resource bound.
stream_to_frames_with_profile
Encodes a stream into server frames under a caller-chosen transport profile.