Expand description
Chunked transfers over ordinary edges (blueprint §9.4,
session_id/segment_id/seq/fin/flush).
session S ┬─ segment 0 ─ seq 0,1,2 … fin (one point cloud)
├─ segment 1 ─ seq 0,1 … fin (the next one)
└─ segment 2 ─ seq 0 … flush … fin (a partial delivery)Three keys, three jobs: session_id says which conversation,
segment_id says which message within it, seq says which chunk within
that message. fin ends a segment; flush asks the receiver to deliver
what it has without ending anything.
§Why a node needs help here
A chunked transfer has three failure modes that a bare metadata key cannot
prevent, and StreamAssembler detects all three:
| Failure | How it is caught |
|---|---|
| A gap (chunk 3 arrives after chunk 1) | The assembler expects seq to be contiguous and reports crate::NodeError::Pattern |
| Reordering | Same check; out-of-order is a gap from the assembler’s side |
| A segment that never ends | StreamAssembler::open_segments shows it; a node with a deadline can act |
Correlated messages are not eviction-immune here — a stream chunk carries none of §11.2’s correlation keys — which is deliberate: a stream that outruns its consumer should drop, and the assembler will say so at the gap rather than silently reassembling the wrong bytes.
Structs§
- Chunk
Ref - One chunk’s place in its stream.
- Stream
Assembler - The receiving side of a stream (§9.4).
- Stream
Segment - A completed segment, reassembled.
- Stream
Writer - The sending side of a stream (§9.4).
Functions§
- chunk_
bytes - The payload bytes of an event, for a caller assembling by hand.
Type Aliases§
- Accepted
Chunk - What
StreamAssembler::accept_eventmade of an event: a completed segment, a chunk it absorbed (Ok(None)), or the event handed back because it was not a stream chunk at all.