Module anti_entropy

Module anti_entropy 

Source
Expand description

δ-CRDT Anti-Entropy Algorithm 1 (Convergence Mode)

This module implements the anti-entropy algorithm from the δ-CRDT paper. It handles delta propagation, acknowledgments, and convergence testing.

§Algorithm 1 Overview

Each replica maintains:

  • X: the local CRDT state
  • D: delta buffer (sequence of deltas)
  • acked[j]: last sequence number acknowledged by peer j

Protocol:

  1. On local mutation m:

    • d = mδ(X) // compute delta
    • X = X ⊔ d // apply to local state
    • D.push(d) // buffer for sending
  2. On send to peer j:

    • send D[acked[j]..] to j
  3. On receive delta d from peer i:

    • X = X ⊔ d // apply (idempotent!)
    • send ack(seq) to i

Structs§

AntiEntropyCluster
Anti-entropy coordinator for a cluster of replicas
NetworkConfig
Network configuration for simulation
NetworkSimulator
A network simulator for testing anti-entropy under various conditions

Enums§

AntiEntropyMessage
Message types for the anti-entropy protocol