Skip to main content

Module streaming_async

Module streaming_async 

Source
Expand description

Asynchronous streaming encoder — sibling of crate::streaming::StreamingEncoder that writes to any tokio::io::AsyncWrite + Unpin sink.

Driver: the HPC producer scenario — a producer job emits forecast steps as they are produced, writing to a shared filesystem or object-store sink without blocking the caller’s compute thread.

§Wire-format compatibility

The async encoder produces byte-identical output to the sync crate::streaming::StreamingEncoder for the same logical sequence of writes. Frame layout, hash semantics, and footer-frame ordering all share helpers in crate::streaming. The only difference is the I/O surface (AsyncWrite vs Write).

§Threading model

Like the sync encoder, the async encoder is single-task-owned. The AsyncWrite trait is naturally serial; concurrent AsyncStreamingEncoder::write_object calls against the same encoder are not permitted. Hashing remains in the calling task and never crosses thread boundaries — the transparent-codec byte-identical-across-threads invariant is preserved.

Structs§

AsyncStreamingEncoder
Asynchronous streaming encoder writing Tensogram frames progressively to any AsyncWrite sink.