Persistent Key-Value Store
Build a persistent key-value store from scratch in modern C++ with zero external dependencies. You append writes to a log, keep an in-memory index, serve reads quickly, and compact the log to reclaim space, all durable across restarts. A practical study of storage engines and crash-safe design.
Support Free C++ Education
Help us keep this platform free for everyone! Your support enables us to create more high-quality lessons, exercises, and interactive content.
What You'll Build
A durable key-value database with get, put, and delete operations backed by an append-only log and an in-memory index, surviving restarts and reclaiming space through compaction.
Learning Objectives
- Design an append-only log format for durable writes
- Maintain an in-memory index with std::unordered_map to file offsets
- Serialise records with lengths and checksums for integrity
- Replay the log on startup to rebuild the index
- Compact the log to remove stale and deleted entries
- Flush and fsync to guarantee durability across crashes
- Manage buffers and record ownership with move semantics
Coming Soon
This project is in development. Register your interest and we'll email you the moment it goes live.
No spam. Unsubscribe anytime.
Coming Soon
This project is in development. Register your interest and we'll email you the moment it goes live.
No spam. Unsubscribe anytime.