A distributed SQL database in Rust, built from scratch as an educational project to illustrate core database concepts.
toyDB is a distributed SQL database written in Rust from scratch, designed as an educational project to teach the internals of database systems. It implements core features like Raft consensus, ACID transactions with MVCC, and a SQL query engine, providing a functional yet simplified view of how distributed databases work. The project explicitly avoids production optimizations to keep the codebase accessible for learning.
Developers, students, and engineers interested in learning about distributed systems, database architecture, and SQL implementation, particularly those looking to understand concepts like consensus algorithms and transaction processing.
toyDB offers a clean, well-documented codebase that prioritizes clarity and correctness over performance, making it an excellent resource for hands-on learning. Its focus on educational simplicity, combined with real-world features like Raft and MVCC, provides unique insight into database design without the complexity of production systems.
Distributed SQL database in Rust, written as an educational project
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The project prioritizes simplicity and understandability with a detailed architecture guide and SQL examples that walk through key concepts like Raft and MVCC, making it ideal for learning.
Implements core database features including ACID transactions with MVCC and distributed consensus via Raft, ensuring a correct foundation for educational purposes.
Supports multiple backends like BitCask and in-memory storage, allowing experimentation with different storage strategies without code changes.
Includes thorough documentation such as architecture guides, SQL references, and test scripts that provide deep insights into database internals.
Benchmarks show atrocious write speeds (e.g., 35 txn/s with fsync), as admitted in the README, due to lack of optimizations like write batching, making it unsuitable for real workloads.
Intentionally avoids production-grade features such as advanced indexing, query optimizations, and high availability mechanisms, focusing solely on educational simplicity.
Requires Rust compilation and manual cluster orchestration via scripts, which can be cumbersome for users unfamiliar with systems programming or distributed setups.