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
:Rust
Database Client.src/resp
: ARESP
protocol for exchanging data between client and server.src/raft
: ARAFT
protocol for exchanging data between one server node and another.
- Support
set
/get
/del
command.
-
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
- A
-
Resp
protocol - Database server
- Rust client
- command-line client tool
- gentle shutdown
-
Raft
protocol (brunch beaker-v0.2.0)- leader election
- log replication
- snapshot installation
- configure modification