beaker is a distributed key-value database under development for learning Rust/Database/Distributed System.
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.
Guide to modules:
src/engine: A lsm-tree-based storage engine likeleveldb.src/server: A implementation of database server.src/cmd: A redis-like command library.src/cli: A command line client tool.src/client:RustDatabase Client.src/resp: ARESPprotocol for exchanging data between client and server.src/raft: ARAFTprotocol for exchanging data between one server node and another.
- Support
set/get/delcommand.
-
lsmtree based kv storage- A
memtable+logimplementation - A
sstableimplementation - A
manifestfor managing sstables and logs - Background task,
sstable compact/log dumping/expire file cleaning... - Database interface
- A
-
Respprotocol - Database server
- Rust client
- command-line client tool
- gentle shutdown
-
Raftprotocol (brunch beaker-v0.2.0)- leader election
- log replication
- snapshot installation
- configure modification