Architecture

Lithair is built on a progressive architecture — each layer can be activated independently, and complexity is added only when needed.

Layer Model

┌─────────────────────────────────────┐
│  HTTP Router & Static Files        │  ← Start here
├─────────────────────────────────────┤
│  REST API & Business Logic         │  ← Add when needed
├─────────────────────────────────────┤
│  Authentication & Authorization    │  ← Security built-in
├─────────────────────────────────────┤
│  Data Engine & Event Sourcing      │  ← Scale with data
├─────────────────────────────────────┤
│  Raft Consensus & Clustering       │  ← Distribute when ready
└─────────────────────────────────────┘

SCC2 Engine

At the heart of Lithair is SCC2, a lock-free concurrent HashMap. All data lives in memory — no disk I/O, no network round-trips. Disk is only used for persistence via event sourcing.

Memory-First Design

Unlike traditional web frameworks that rely on external databases, Lithair is the database. Your application manages its own state in memory, with events persisted to disk for durability.