Skip to main content

Module stream

Module stream 

Source
Expand description

Lossless append-log binary publishing over moq-net tracks.

An ordered log of opaque payloads, for consumers that care about every one (an event log, a sequence of samples). Nothing is ever superseded: a consumer yields each payload in the order it was appended. For a latest-value document, use snapshot instead.

Retention is bounded, which is the limit of “lossless” here. The group’s cache is finite, so a write that would outgrow it aborts the group with moq_net::Error::GroupTooLarge rather than dropping a prefix some readers missed: a partial log presented as a whole one is what this mode exists to prevent. Keep a log inside what the group retains, and split anything unbounded across successive tracks.

On the wire the log is a single group that is never rolled, one payload per frame. A payload that cannot be written ends the track rather than opening a second group: a log missing a record is not lossless, and a gap dressed up as a complete log is worse than a visible failure. With Config::compression set to Compression::Deflate, that one group is one sync-flushed DEFLATE stream, so each payload compresses against the earlier ones and a run of similar payloads shrinks sharply.

Re-exports§

pub use consumer::Consumer;
pub use producer::Producer;

Modules§

consumer
Consuming an ordered log of binary payloads from a track.
producer
Publishing an ordered log of binary payloads over a track.

Structs§

Config
Codec options for a stream track.