mit-6.824

module
v0.0.0-...-496dcb2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2023 License: MIT

README

GetaKV

image-20230430171133761

Introduction

GetaKV is a Shard Key/Value System using Raft to support distributed fault-tolerance. It is based on the labs of MIT-6.824.

  • Lab1: MapReduce

  • Lab2: Raft

    • Lab2A: Leader Election ✅
      • Lab2B: Log Replication ✅
      • Lab2C: Persistent States ✅
  • Lab3: Raft KV

    • Lab3A: KV on Raft ✅
    • Lab3B: Log Compaction / Snapshot ✅
  • Lab4: Shard KV

    • Lab4A: Shard Master
    • Lab4B: Sharded KV Server
  • Improvement

    • Add simple parser and persistent file to save.
    • More clear structure.

Current progress: Lab3 finished. Single node KV Raft available. Not sharded yet.

K/V System Architecture:

image-20230421202347806

(Vote mechanism and some other details are not included)

Raft Implementation:

image-20230413133324787 image-20230413133359027

Build & Run

  • Test

    If you want to test, you can(test for raft is similar):

    cd src/kvraft # or `cd raft`
    go test
    

    If you want to run particular test:

    cd src/kvraft
    go test -run 3B
    

    If you want to run test in batch, you can run the script:

    cd src/kvraft
    ./test_batch.sh
    

    You may need to modify the srcipt file to do your own batch-test.

  • Run single node KV Raft

    cd src/main
    go run kvsingle.go
    

Test and Execution Result

image-20230421203111961 image-20230421203502670

Directories

Path Synopsis
src
mr

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL