Skip to main content

Module checkpoint

Module checkpoint 

Source
Expand description

Checkpoint management for durable sessions.

The CheckpointManager provides atomic checkpoint persistence so that a crash cannot leave an event emitted but un-checkpointed (or vice versa). For the initial implementation, storage is in-memory (Vec<SessionEvent>). The real integration with SessionService for persistent storage is a platform concern.

§Responsibilities

  1. Atomicity guarantee: event + state saved together in one operation
  2. Load/resume interface: retrieve all events and last run state
  3. Event log maintenance: ordered log for replay

Structs§

CheckpointManager
Manages atomic checkpoint persistence for durable sessions.
RunState
Run-state persisted with each checkpoint.