Expand description
Barrier snapshots: the frozen container, the storage seam, and the shared byte-store payload codec.
A task snapshots every store it owns when a barrier fires. The result is a
map from store name to opaque payload bytes, and the container below holds
it. The container is frozen. krabka-streams-rs, krabka-streams-java, and
krabka-streams-go write the same bytes:
version u32 = 1
count u32
entries count x [ name_len u32 | name UTF-8 | value_len u32 | value bytes ]Every integer is big-endian. The entries are in ascending byte order of the name, so one snapshot always encodes to one byte string.
The payload inside an entry is language-specific. Rust uses the byte-store
payload that [encode_byte_entries] writes for every store over the
pluggable byte backend, and a store with in-process state of its own writes
its own payload.
The cut identity is not in the container. It is the storage key, which is
the task, the barrier group, and the epoch. See SnapshotKey.
Structs§
- File
Snapshot Store - Writes each snapshot to one file under a directory.
- NoSnapshot
Store - A snapshot store that keeps nothing.
- Snapshot
Key - Names one stored snapshot: the task, the barrier group, and the epoch.
Constants§
- SNAPSHOT_
CONTAINER_ VERSION - The container version that the three streams libraries share.
Traits§
- Snapshot
Store - Keeps the store snapshots a task takes at each barrier cut.
Functions§
- decode_
snapshot - Decodes the frozen container bytes back into a task snapshot.
- encode_
snapshot - Encodes a task snapshot into the frozen container bytes.
Type Aliases§
- Task
Snapshot - Every store of one task at one cut, as store name to payload bytes.