Ruvector Replication
Data replication and synchronization for Ruvector distributed deployments.
ruvector-replication provides vector data replication across nodes with configurable consistency levels, conflict resolution, and synchronization strategies. Part of the Ruvector ecosystem.
Why Ruvector Replication?
- High Availability: Replicate data across multiple nodes
- Configurable Consistency: Tune consistency vs availability
- Async Replication: Non-blocking replication for performance
- Conflict Resolution: Automatic conflict handling strategies
- Incremental Sync: Efficient delta synchronization
Features
Core Capabilities
- Multi-Master Replication: Write to any node
- Replica Sets: Configurable replication factor
- Change Streams: Real-time replication events
- Checkpointing: Track replication progress
- Recovery: Automatic replica recovery
Advanced Features
- Quorum Writes: Configurable write acknowledgment
- Read Replicas: Scale read throughput
- Conflict Resolution: Last-write-wins, vector clocks, CRDTs
- Bandwidth Throttling: Control replication bandwidth
- Compression: Reduce network transfer size
Installation
Add ruvector-replication to your Cargo.toml:
[]
= "0.1.1"
Quick Start
Setup Replication
use ;
async
Write with Replication
use ;
// Write with quorum consistency
let options = WriteOptions ;
replicator.write.await?;
// Write with eventual consistency (faster)
let options = WriteOptions ;
replicator.write.await?;
Monitor Replication
// Get replication lag
let lag = replicator.lag.await?;
println!;
// Get replica status
for replica in replicator.replicas.await?
// Subscribe to replication events
let mut stream = replicator.events.await?;
while let Some = stream.next.await
API Overview
Core Types
// Replication configuration
// Consistency levels
// Conflict resolution strategies
// Replica information
Replicator Operations
Architecture
┌─────────────────────────────────────────────────────────┐
│ Replication Flow │
│ │
│ Client │
│ │ │
│ ▼ │
│ ┌──────────┐ Quorum Write ┌──────────┐ │
│ │ Primary │────────────────────▶│ Replica 1│ │
│ │ │ │ │ │
│ │ Vectors │────────────────────▶│ Vectors │ │
│ └──────────┘ └──────────┘ │
│ │ │
│ │ Async Replication │
│ └──────────────────────────▶┌──────────┐ │
│ │ Replica 2│ │
│ │ │ │
│ │ Vectors │ │
│ └──────────┘ │
└─────────────────────────────────────────────────────────┘
Related Crates
- ruvector-core - Core vector database engine
- ruvector-cluster - Clustering and sharding
- ruvector-raft - Raft consensus
Documentation
- Main README - Complete project overview
- API Documentation - Full API reference
- GitHub Repository - Source code
License
MIT License - see LICENSE for details.