Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 2.24 KB

README.md

File metadata and controls

79 lines (57 loc) · 2.24 KB

beaker

中文|english

beaker is a distributed key-value database under development for learning Rust/Database/Distributed System.

Usage

If you're a Rust programmer, build and it with cargo.

# run the database server at root path with log at info level
RUST_LOG=info cargo run --release --bin server -- --root-path $path

# run command line
cargo run --release --bin cli

# apply command use cli
get key
set key val
del key
ping msg

# or using src/client in crate to apply command
async {
    let client = Client::connect($addr).await?;
    client.ping(None).await?;
}

If you want to install it, using cargo install --path ..

If you want in uninstall it, using cargo uninstall beaker.

Repository content

Guide to modules:

  • src/engine: A lsm-tree-based storage engine like leveldb.
  • src/server: A implementation of database server.
  • src/cmd: A redis-like command library.
  • src/cli: A command line client tool.
  • src/client: Rust Database Client.
  • src/resp: A RESP protocol for exchanging data between client and server.
  • src/raft: A RAFT protocol for exchanging data between one server node and another.

Milestones

Basic functional

  • Support set/get/del command.

Standalone infrastructure

  • lsm tree based kv storage
    • A memtable+log implementation
    • A sstable implementation
    • A manifest for managing sstables and logs
    • Background task, sstable compact/log dumping/expire file cleaning...
    • Database interface
  • Resp protocol
  • Database server
  • Rust client
  • command-line client tool
  • gentle shutdown

Distribution infrastructure

  • Raft protocol (brunch beaker-v0.2.0)
    • leader election
    • log replication
    • snapshot installation
    • configure modification

References