toydb
Distributed SQL database in Rust, written as an educational project
What is toydb?
Distributed SQL database in Rust, written as an educational project
Overview of toydb
What it is
toyDB is a distributed SQL database written in Rust, created as an educational project to illustrate the architecture and concepts behind distributed SQL databases. It is not intended for production use; performance, scalability, and availability are non-goals.
Key features
- Raft distributed consensus for linearizable state machine replication - ACID transactions with MVCC-based snapshot isolation - Pluggable storage engine with BitCask and in-memory backends - Iterator-based query engine with heuristic optimization and time-travel support - SQL interface including joins, aggregates, and transactions
Use cases
toyDB is designed for learning and experimentation with distributed database internals. It can be used to study Raft consensus, MVCC transactions, query optimization, and SQL execution in a simplified, understandable codebase. It is not suitable for production workloads.
Getting started
With a Rust compiler installed, a local five-node cluster can be built and started as: $ ./cluster/run.sh A command-line client can be built and used with node 1 on localhost:9601: $ cargo run --release --bin toysql For detailed usage, see the repository README.
License and pricing
toyDB is open source under the Apache-2.0 license.
Based on the project's public README and repository metadata.