A key-value database
A storage engine with a WAL, indexes and compaction. Understand how and when your data is persisted.
Go · Rust
Open a real .db, walk its B-trees and run SELECTs. Reverse engineering of a documented binary format.
Build it in your language
The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.
SQLite is probably the most widely deployed piece of software in the world, and its file format is documented down to the last byte. It's the perfect target for learning to read on-disk data structures.
You'll open a real .db — not a toy one — and walk it yourself: header, pages, B-trees, records. You'll finish running SELECT queries with WHERE over real tables, using indexes so you don't scan everything.
10 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.
Header, page size, schema and table listing.
B-tree traversal, varints and record decoding.
A SELECT parser, WHERE filters and column projection.
Index B-trees and queries that avoid the full scan.
A storage engine with a WAL, indexes and compaction. Understand how and when your data is persisted.
Go · Rust
Implement the RESP protocol, an event loop and key expiry. A real server that talks to redis-cli.
Go · Rust · Python
Build a vector index with exact search, filters, and a simplified HNSW graph.
TypeScript · Python · Go