Skip to content

aarav-agn/FlashDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ FlashDB: Log-Structured Merge (LSM) Key-Value Store

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.

πŸš€ Key Features

  • 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).

πŸ›  Tech Stack

  • Language: C++17
  • Build System: CMake
  • Techniques: Pointer arithmetic, Binary Serialization, Probabilistic Data Structures.

⚑ How to Run

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors