Available on crate features
delta-checkpoint and graph only.Expand description
Delta checkpoint compression for graph state.
This module provides incremental (delta-based) checkpoint storage, reducing storage growth from quadratic (full snapshots every step) to linear (only differences between consecutive states are persisted).
§Architecture
The core abstraction is the Diff trait, which defines how to compute and
apply incremental deltas for a given state type. DeltaConfig controls how
often full snapshots are stored (bounding reconstruction cost), and
CheckpointType distinguishes between full snapshots and delta records.
§Example
use adk_graph::delta::{Diff, DeltaConfig, CheckpointType};
// DeltaConfig with default full_snapshot_interval of 10
let config = DeltaConfig::default();
assert_eq!(config.full_snapshot_interval, 10);
// CheckpointType distinguishes full vs delta records
let full = CheckpointType::Full;
let delta = CheckpointType::Delta {
base_checkpoint_id: "ckpt-001".to_string(),
};Structs§
- Delta
Checkpointer - Wraps any
Checkpointerwith delta compression. - Delta
Config - Configuration for delta-based checkpoint compression.
- MapDelta
- Delta representation for
HashMap<String, Value>. - String
Delta - Delta representation for
String. - VecDelta
- Delta representation for
Vec<Value>.
Enums§
- Checkpoint
Type - Discriminates between full state snapshots and incremental delta records.
- String
Op - An individual edit operation for string diffs.
Traits§
- Diff
- Trait for types that can compute and apply incremental diffs.