Building the Next Generation
Data Layer

StrataDB is a pluggable storage engine architecture featuring LSM-Trees for high-performance writes and a custom SQL parser. Built from the ground up to explore ownership, concurrency, and durability.

Start Exploring

01 Under the Hood

Write-Ahead Log (WAL)

Ensures durability by logging every mutation to an append-only file before updating the MemTable. On restart, the engine replays the WAL to restore state.

  • • Sequential I/O Performance
  • • Crash Recovery Protocol

In-Memory Table

Active writes are buffered in a sorted MemTable. Once the size threshold is met, the table is frozen and flushed to disk as an immutable SSTable.

  • • Sorted String Table (SST)
  • • Non-blocking Flushes

LSM-Tree & Compaction

Strata uses a Log-Structured Merge-Tree. Background workers merge smaller SSTables into larger ones, reclaiming space by purging deleted keys.

  • • Multi-level Compaction
  • • Bloom Filter Lookups

Document Layer

Built on top of the KV engine, the Document layer handles schema-less JSON storage with automatic indexing and complex query support.

  • • Secondary Indexing
  • • Flexible JSON Schemas

SQL Lexer & Parser

A custom-built SQL frontend that tokenizes and parses queries into execution plans, bridging structured data with the pluggable engines.

  • • Recursive Descent Parsing
  • • System Catalog Integration

ACID Guarantees

Basic transaction support using Snapshot Isolation. Ensures that multiple operations either succeed together or leave the DB unchanged.

  • • Snapshot Isolation
  • • Atomic Commits