Projects

Jan 1 0001

404

Under Construction #

Jan 1 0001

Distributed Key-Value Store

Architecture #

arch image

Ring & Backends #

We applied a structure called “Ring” which is similar to the Chord Ring to organize our Backends server. The ReplicaBins layer turns a loose collection of backend key‑value stores into a fault‑tolerant, quorum‑style shard that behaves like a single logical bin. Each bin is assigned to a primary + two backups by hashing the bin‐name prefix onto a sorted consistent‑hash ring. All client operations first map the prefix to its ideal server index; from there the code hunts clockwise until it reaches a live backend, as recorded in the lazily updated reachability table. Writes are turned into idempotent log entries—clock()::action::payload—so that even if a server rejoins half‑way through, it can replay the log and converge on the same state; helper routines like consume_ks_log and consume_kl_log fold the log stream into a final key string or list. A successful write to the primary is immediately propagated to the next two live nodes, while reads tolerate failures by linearly probing until a healthy copy is found. Throughout, the logical clocks give a total order, and key names are salted with the shard‑hash so that parallel bins never clash.

Jan 1 0001

Projects

Raft Consensus Core ➡️ Report Here! #

(May 2025 - Present)

  • Developed a Go-based Raft Consensus Core with gRPC for inter-node communication, implementing leader election, heartbeat-based failure detection, log replication to ensure Strong Consistency and Fault Tolerance across the cluster.
  • Integrated Pebble KV Store for durable Write-Ahead Logging and LSM Compaction, guaranteeing Data Persistence and enabling seamless Recovery after node crashes.
  • Designed modular StateMachine API for applying and snapshot-based recovery commands, separating consensus mechanism from application logic.

Distributed Key-Value Store ➡️ Report Here! #

(Apr 2025 - May 2025)