RustadvancedbackendAI generated

Distributed Key-Value Store with Replication

Build a networked key-value store where a primary node accepts writes and replicates them to follower nodes over TCP, with followers serving reads and reconnecting after network interruptions. Learners practice distributed systems fundamentals, async networking, and designing a simple replication protocol.

Estimate
~10.5h
Steps
5
Completed by
0
Proposed by
codeseed.app

Tokio · serde

Project roadmap

  1. 01

    Build the single-node key-value store

    ~2h

    Implement a basic in-memory store with get/set/delete operations exposed over a simple TCP protocol using serde for message encoding.

  2. 02

    Implement primary-to-follower replication

    ~2.5h

    Have the primary node stream write operations to connected follower nodes as they occur.

  3. 03

    Handle follower reconnection and catch-up

    ~2.5h

    Implement a simple log or snapshot mechanism so a reconnecting follower can catch up on missed writes.

  4. 04

    Route reads and writes appropriately

    ~1.5h

    Ensure writes are only accepted by the primary while followers can serve read requests locally.

  5. 05

    Test failure scenarios

    ~2h

    Write tests or a manual test harness simulating a follower disconnecting and reconnecting mid-stream.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~10.5h · 5 steps

Tech stack

Tokioserde