Giter Club home page Giter Club logo

mum's Introduction

Mum - distributed kv store base on raft

Usage

Server

# server side 
RUST_LOG=server,mum cargo run --bin server -- --id 1 --snap_dir example_dir/1/snap/ --wal_dir example_dir/1/ --addrs  127.0.0.1:9005 --addrs  127.0.0.1:9006 --addrs  127.0.0.1:9007

RUST_LOG=server,mum cargo run --bin server -- --id 2 --snap_dir example_dir/2/snap/ --wal_dir example_dir/2/ --addrs  127.0.0.1:9005 --addrs  127.0.0.1:9006 --addrs  127.0.0.1:9007

RUST_LOG=server,mum cargo run --bin server -- --id 3 --snap_dir example_dir/3/snap/ --wal_dir example_dir/3/ --addrs  127.0.0.1:9005 --addrs  127.0.0.1:9006 --addrs  127.0.0.1:9007

Client

# kv --op (get/set/del/scan)
# conf --op (add/remove)
RUST_LOG=ctl,mum ./target/debug/ctl kv --op get --y hello1 --value world1 --kv_addr 127.0.0.1:9005

Features

Wanted

  • Use raft-rs, grpc-rs, tokio to build a simple HA key-value service
  • Provide basic get, set, delete, and scan operations
  • The data saved in one node must be persistent in the disk (restart can’t lose data).
  • Need to show - Kill minority node, the service can still work.
  • Need to show - Kill majority node, the service can not work.
  • Need to support add/remove node dynamically
  • Use a benchmark tool to find some performance problems.

Simple MVCC K/V Storage

K/V Storage Features

  • A Single-File Presistent Storage
  • Copy-On-Write, Read-Lock-Free (MVCC)
  • Auto garbage collection
  • Snapshot (Maybe)

K/V Storage TODOs

  • Get(Key) -> Option
  • Set(Key, Value)
  • Delete(Key) -> Option
  • Scan() -> Iter
  • MVCC support
  • Snapshot support

WAL Features

  • Multi segments
  • Reply logs for Disaster Recovery

WAL TODOs

  • Write logs
  • Read all logs

mum's People

Contributors

dyxushuai avatar

Stargazers

 avatar Vitaliy Yermolenko avatar Samuel Jie avatar krircc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.