A high-performance, persistent Key-Value store written in C++17, modeled after LevelDB and RocksDB. It uses an LSM-Tree architecture optimized for write-heavy workloads and includes a Bloom Filter to minimize unnecessary disk I/O.
-
MemTable: Implemented using a probabilistic Skip List for
$O(\log N)$ inserts and lookups (replacing slow balanced trees). - Persistence: Flushes in-memory data to binary SSTables (Sorted String Tables) on disk for crash recovery.
- Optimization: Integrated a custom Bloom Filter (3-hash) to reject non-existent keys in ~8 microseconds, bypassing disk reads.
- Performance: Capable of 1.5 Million writes/second (single-threaded).
- Language: C++17
- Build System: CMake
- Techniques: Pointer arithmetic, Binary Serialization, Probabilistic Data Structures.
mkdir build && cd build
cmake ..
make
# Run the Engine
./flashdb
# Recover/View Data from Disk
./sst_dump data_with_bloom.sst
π¨βπ» Author
Aarav Agnihotri - Built to explore database internals and storage engine architecture.