Stop being the product.
Become the owner.
or
sign uplog in

I implemented Raft, a KV store, and a sharded system in Go…

I implemented Raft, a KV store, and a sharded system in Go

I recently completed the labs from MIT 6.5840 Distributed Systems and implemented everything in Go, including:

* Raft consensus algorithm
* A replicated Key/Value store
* A sharded KV system with dynamic reconfiguration

The implementation focuses a lot on concurrency and failure handling:

* goroutines for RPC handling and background tasks
* channels for coordination between Raft and the state machine
* dealing with unreliable networks (dropped / delayed / out-of-order RPCs)

Some interesting challenges:

* ensuring commitIndex never goes backward under out-of-order RPC responses
* handling retries safely with client/request IDs (idempotency)
* keeping deduplication state consistent across snapshots and shard transfers

I wrote a detailed README explaining both the design and the tricky edge cases I encountered.
#programming #technology #dev
earnings
2,000 mlx total
$0  total
engagement
2 views
0 reactions

0 comments