Build a vector search engine
Build a vector index with exact search, filters, and a simplified HNSW graph.
TypeScript · Python · Go
A storage engine with a WAL, indexes and compaction. Understand how and when your data is persisted.
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.
“The database saves it” is one of those phrases we take for granted. This challenge takes it apart: you'll see exactly the moment a piece of data stops living only in memory and survives a power cut.
You'll build an LSM-style storage engine: writes to the log, an in-memory memtable, flushes to sorted files, indexes to read quickly, and compaction so the disk doesn't grow forever. And you'll subject it to brutal crashes to confirm it recovers.
14 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.
In-memory API, write-ahead log, and recovery by replaying the log at startup.
Memtable, flushes to immutable sorted files, and merged reads.
Sparse index, Bloom filters and range scans.
Levelled compaction, deletes with tombstones, and measuring the cost.
Build a vector index with exact search, filters, and a simplified HNSW graph.
TypeScript · Python · Go
Implement the RESP protocol, an event loop and key expiry. A real server that talks to redis-cli.
Go · Rust · Python
Open a real .db, walk its B-trees and run SELECTs. Reverse engineering of a documented binary format.
Go · Python · Java