Skip to main content

Crate cliffy_protocols

Crate cliffy_protocols 

Source
Expand description

Distributed consensus protocols using geometric algebra

This crate provides CRDT, consensus, and synchronization implementations using Clifford algebra for coordination-free distributed systems.

§Key Components

§State Management

§Consensus

§Synchronization (Phase 3)

  • delta: State delta computation for efficient sync
  • sync: P2P synchronization protocol
  • storage: Persistence layer with snapshots and operation logs

§Example

use cliffy_protocols::{GeometricCRDT, OperationType};
use cliffy_core::GA3;
use uuid::Uuid;

let node_id = Uuid::new_v4();
let mut crdt = GeometricCRDT::new(node_id, GA3::scalar(0.0));

// Apply a geometric transformation
let op = crdt.create_operation(GA3::scalar(5.0), OperationType::Addition);
crdt.apply_operation(op);

Re-exports§

pub use delta::apply_additive_delta;
pub use delta::apply_delta;
pub use delta::compute_delta;
pub use delta::DeltaBatch;
pub use delta::DeltaEncoding;
pub use delta::StateDelta;
pub use lattice::ComponentLattice;
pub use lattice::GA3Lattice;
pub use lattice::GeometricLattice;
pub use storage::GeometricStore;
pub use storage::MemoryStore;
pub use storage::Snapshot;
pub use storage::StorageStats;
pub use sync::PeerCapabilities;
pub use sync::PeerConnectionState;
pub use sync::PeerInfo;
pub use sync::PeerState;
pub use sync::SyncConfig;
pub use sync::SyncMessage;
pub use sync::SyncPayload;
pub use sync::SyncState;
pub use consensus::*;
pub use crdt::*;
pub use vector_clock::*;

Modules§

consensus
Geometric consensus protocol implementations
crdt
Geometric CRDT implementations using Clifford algebra
delta
State delta computation for efficient synchronization
lattice
Lattice-based conflict resolution using geometric algebra
serde_ga3
Serde serialization helpers for GA3 multivectors
storage
Persistence layer for geometric state and operation history
sync
Synchronization protocol for P2P state coordination
vector_clock

Type Aliases§

ProtocolMultivector
Type alias for the default multivector type used in protocols