Skip to main content

Crate fusee_core

Crate fusee_core 

Expand description

The deterministic core of Fusee.

Nothing in this crate performs I/O, reads a clock, spawns a thread or takes a lock. Each piece is a state machine driven by its host:

  • record: journal records and their encodings.
  • segment: the log segment format, the in-memory segment::LogWriter and the recovery scanner that tells torn tails from lost records.
  • run: the per-run run::RunMachine that assigns journal positions, replays recorded results in journal order and detects nondeterminism.
  • shard: shard::ShardCore, the state derived from a shard’s log: runs, timers, signals, and outputs held until their records are durable.
  • wheel: the hierarchical timing wheel.
  • store: run store and checkpoint formats.
  • table: the compact table of every run a shard knows.
  • vsr: the replication protocol as a pure state machine.
  • frame: the framed binary protocol shared by replication and server mode.

Because the core is pure, the same code runs in production and inside the deterministic simulator (fusee-sim), where disks tear writes and networks drop messages under a seeded scheduler.

Re-exports§

pub use record::Lsn;
pub use record::Name;
pub use record::Payload;
pub use record::Record;
pub use record::RecordBuf;
pub use record::RecordRef;
pub use record::RunId;
pub use record::Seq;
pub use record::Status;

Modules§

frame
Framing for Fusee’s binary protocols (replication and server mode).
record
Journal records.
run
The per-run journal machine.
segment
Log segment format, the in-memory log writer and the recovery scanner.
shard
Shard state.
store
Formats for the run store and checkpoints.
table
The run table: one 32-byte entry for every run a shard knows, loaded or parked, found by run ID or by workflow ID hash.
vsr
Replication: a primary-backup protocol in the style of Viewstamped Replication Revisited, as a pure state machine.
wal
Log format 3: one write-ahead log per device, shared by every shard.
wheel
Hierarchical timing wheel with millisecond resolution.
wire
Little-endian integers, LEB128 varints and length-prefixed bytes.