systems · sub-star
nexus_db
embedded LSM key-value store in C++17, with a live telemetry dashboard.
readme
An embedded key-value store written in C++17, taking its architecture from LevelDB and RocksDB: writes land in an in-memory skip list, get durability from a write-ahead log, and are flushed to immutable SSTables on disk. On top of the engine sits a FastAPI layer talking to the C++ core over a ctypes FFI, and a React dashboard showing live telemetry.
artifact
simulated write path: wal append, memtable growth, flush to sstable at 1mb.
signal log
- MemTable is a probabilistic skip list, giving O(log n) insert and point lookup with no tree-rebalancing overhead.
- write-ahead log appends every operation to disk before the MemTable is touched, recording intent ahead of effect.
- MemTable freezes and flushes to an immutable SSTable via sequential write once it passes 1 MB.
- deletes write tombstone markers rather than removing data: SSTables are immutable, so the marker is what makes the newest-first read report a miss.
- SSTables are re-adopted on open and the file counter resumes past the highest index, so reopening a database does not shadow or overwrite what is already on disk.
- three-layer stack: C++17 engine, Python/FastAPI REST API over ctypes FFI, React/TypeScript dashboard.
- not yet built: WAL replay on startup, compaction, and per-file indexes. reads scan each SSTable linearly.
built with
C++17PythonFastAPIReactTypeScript