toyDB is a simple distributed SQL database, intended to illustrate how such systems are built. The overall structure is similar to real-world distributed databases, but the design and implementation has been kept as simple as possible for understandability. Performance and scalability are explicit non-goals, as these are major sources of complexity in real-world systems.
This guide will walk through toyDB's architecture and code from the bottom up, with plenty of links to the actual source code.
ℹ️ View on GitHub with a desktop browser for inline code listings.
- Overview
- Storage Engine
- Key/Value Encoding
- MVCC Transactions
- Raft Consensus
- SQL Engine
- Server
- Client
Overview →