Pranjal Sailwal

recovering from log

  1. seq 0000recovering from log

NitroDB

“What actually keeps a database's data safe through a crash?”

An embedded LSM-tree storage engine, built from papers with no tutorial

68

unit and integration tests

42

concurrency outcomes checked, 0 failed

2.25M

point reads a second in a one-iteration smoke run

Reel 1 of 7: Now showing

Scroll to watch. Click someone in the audience.

  • In the audience

Now showing

NitroDB

An embedded LSM-tree storage engine, built from papers with no tutorial

How a write survives a crash.

The path of one write through NitroDB, as the project's own design document describes it. Pick a stage, or press the arrow keys.

NitroDBImpl.put

It takes a striped lock for the key and a sequence number from SequenceGenerator. That number is what orders everything that follows.

Read the file

 

68unit and integration tests

The case in short.

The problem
I wanted to understand how real storage engines keep data durable and consistent, so I built one (WAL, SSTables, compaction, MVCC) instead of only reading about it.
Who it is for
Me first: it is a learning project, written to be read. It is also a reference for anyone studying how an LSM engine fits together.
My part
Sole author.

How it was done

  1. I implemented WAL-backed durability, SSTable persistence, crash recovery and leveled compaction in Java 21, with RocksDB and LevelDB as the reference designs.
  2. I designed MVCC snapshot isolation with versioned-key visibility, for consistent point-in-time reads under concurrent workloads.
  3. I improved the read path with Bloom filters, sparse indexes and an off-heap block cache.
  4. I wrote the design before the code (a blueprint) and a claim-by-claim verification matrix after it.

What came out

Tested for correctness under race conditions with JCStress, with unit and integration tests and a JMH benchmark suite. The project's own docs list its limits: one node, no replication, no compression.

What it rests on.

Every figure about this project, and how each one is known. The folder structure, languages and history on the right are read straight from GitHub, so they say what the code is, not what I wish it were.

68unit and integration tests
42concurrency outcomes checked, 0 failed
2.25Mpoint reads a second in a one-iteration smoke run
1 nodeno replication, no compression, no TTL
github.com / sailwalpranjal / NitroDB

3

commits

242

files

72

folders

17.9 MB

on disk

  • Java 92%
  • Shell 4.0%
  • Batchfile 3.5%
  • PowerShell 0.2%
  • Dockerfile 0.2%
  • NitroDB/
  • nitrodb-core/107 files
    • src/
    • pom.xml
  • .tools/97 files
    • apache-maven-3.9.16/
    • apache-maven-3.9.16-bin.zip
  • nitrodb-benchmarks/11 files
    • src/
    • pom.xml
  • scripts/7 files
    • benchmark.sh
    • build.sh
    • checkstyle.sh
  • config/4 files
    • default.properties
    • dev.properties
    • high-throughput.properties
  • nitrodb-jcstress/4 files
    • src/
    • pom.xml
  • .github/3 files
    • workflows/
  • docs/2 files
    • Architecture-and-Design.md
    • Project-Understanding-and-Interview-Guide.md
  • docker/1 files
    • Dockerfile
  • .editorconfig
  • .gitignore
Jun 2026 → Jun 2026.java ×119.jar ×52.license ×25.(none) ×6.xml ×6

SyncState

An offline-first collaborative editor that doesn't need the network to keep working

If you want to talk about how this was built, write to me.

  1. seq 0001you arrived
  2. seq 0002write back