Expand description
atomr-distributed-data.
Provides CRDTs (GCounter, PNCounter, GSet, ORSet, LWWRegister,
Flag, ORMap, LWWMap, PNCounterMap) and a Replicator that
stores them in-memory and merges on request.
Structs§
- File
Durable Store - Append-only file-backed store. Keys live as
<dir>/<sanitized>.bin. - Flag
- GCounter
- GSet
- LWWMap
- Last-write-wins map of K → V.
- LwwRegister
- Noop
Durable Store - In-memory no-op implementation. Used when durability is disabled.
- ORMap
- Observed-remove map of K → V (V itself a CRDT).
- ORMulti
Map - Map of K → set-of-V, where the set is itself an
OrSet<V>. Phase 8.B. - OrSet
- Observed-remove set. Each addition gets a unique tag; a removal retains all tags seen at that moment. Merge takes the union of (item, tag) pairs minus tombstones.
- PNCounter
- PNCounter
Map - Map of K →
PNCounter. - Pruning
State - State carried alongside a CRDT entry — maps each removed node to its pruning phase. Per, the map’s keys are the addresses that have left the cluster.
- Read
Aggregator - Counts replies against a target derived from a
crate::ReadConsistencyandcluster_size. Identical shape toWriteAggregatorbut distinct so call sites cannot mix them up. - Replicator
- Replicator
Actor - Actor-style replicator handle.
- Subscription
Token - RAII handle returned by
Replicator::subscribe. - Write
Aggregator - Counts acks against a target derived from a
crate::WriteConsistencyandcluster_size.
Enums§
- Pruning
Phase - Per-(removed-node, owner) pruning state.
- Read
Consistency - Replicator
Ack - Tagged response payloads for
ReplicatorActorcommands. - Replicator
Error - Write
Consistency - Phase 8.D — typed consistency levels with timeouts. The current
in-process Replicator runs every operation as
Local(single-node store); cross-nodeAll/Majority/From(n)semantics activate once Phase 6 gossip lands.
Traits§
- Crdt
Merge - Convergent replicated data type merge semantics.
- Delta
Crdt - Optional delta-CRDT layer: emit a small “delta” describing the last local change and merge incoming deltas into the full state.
- Durable
Store - Abstraction over a durable backing store. Methods are sync so they can be called from anywhere (including the replicator actor task); implementations should keep work small or punt to a worker thread.