Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rust Distributed Key-Value Store

Project Structure

distributed-key-value-store/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.rs
β”‚   β”œβ”€β”€ config.rs              # CLI args and config parsing
β”‚   β”œβ”€β”€ cluster/               # Cluster logic: leader election, peer health, quorum
β”‚   β”‚   β”œβ”€β”€ mod.rs
β”‚   β”‚   β”œβ”€β”€ state.rs           # Represents a node
β”‚   β”‚   β”œβ”€β”€ election.rs        # Static-priority leader election
β”‚   β”‚   └── quorum.rs          # Quorum read/write logic
β”‚   β”œβ”€β”€ store/                 # Key-value storage + persistence
β”‚   β”‚   β”œβ”€β”€ mod.rs
β”‚   β”‚   β”œβ”€β”€ engine.rs          # In-memory or sled-backed key-value store
β”‚   β”‚   β”œβ”€β”€ lamport.rs         # Lamport clock implementation
β”‚   β”‚   β”œβ”€β”€ wal.rs             # WAL logging & replay
β”‚   β”‚   └── snapshot.rs        # Compaction + snapshot handling
β”‚   β”œβ”€β”€ replication/           # Batch replication system
β”‚   β”‚   β”œβ”€β”€ mod.rs
β”‚   β”‚   β”œβ”€β”€ batch.rs           # Queue, flush interval
β”‚   β”‚   └── handler.rs         # Handles /replicate-batch endpoint
β”‚   β”œβ”€β”€ api/                   # HTTP routes and handlers
β”‚   β”‚   β”œβ”€β”€ mod.rs
β”‚   β”‚   β”œβ”€β”€ client.rs          # API endpoints
β”‚   β”‚   β”œβ”€β”€ state.rs           # ApiState definition
β”‚   β”‚   └── metrics.rs         # Prometheus metrics definition
β”‚   β”œβ”€β”€ util/                  # Common types & helpers
β”‚   β”‚   β”œβ”€β”€ mod.rs
β”‚   β”‚   └── types.rs           # Shared types: Value, Request, NodeID, etc.
β”œβ”€β”€ Cargo.toml
β”œβ”€β”€ README.md
└── scripts/
    β”œβ”€β”€ start_cluster.sh       # Spins up 3+ nodes
    └── test_put_get.sh        # CLI test driver

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages