Technical Architecture & System Internals

How KOLMOS
actually works.

A single unified Rust engine behind three wire protocol doors. Built on Apache DataFusion 54.1, FastCDC content-addressed storage on Cloudflare R2, and sandboxed WASM decoder covenants.

Unified System Topology
v1.0 Stack
[Door 1/2/3] PG / MySQL / Mongo WireNative Protocol Support
[Execution] Apache DataFusion 54.1Vectorized SIMD
[Mutations] WAL Write-Buffer~1ms Fast Ack
[Storage] Cloudflare R2 / S3 CASFastCDC Dedup
11 Crates
Modular Rust Workspace
Strict DAG · Zero cycles
"forbid"
Unsafe Code Policy
#![forbid(unsafe_code)]
18 Fixtures
Golden Byte Files
CI byte-equality verified
100%
Bit-Exact Guarantee
decode(encode(x)) == x
System Blueprint

5-Layer Stack Architecture.

Click on any system layer below to inspect its execution mechanics, concurrency invariants, and I/O characteristics.

LAYER 01 SPECIFICATIONid: wire

Client Wire Protocols

PostgreSQL, MySQL, and MongoDB wire protocol listeners. Accepts standard driver connections with zero client-side code modification.

Core Layer Invariants & Capabilities
pgwire + datafusion-postgres
opensrv-mysql framing
BSON OP_MSG protocol parser
SASL SCRAM-SHA-256 + TLS
Subsystem Status: Active & Verified
I/O Path: Low-latency
Query Acceleration

4-Tier Indexing Funnel.

How KOLMOS executes sub-millisecond queries over billions of rows without full-table scans.

01

100M+ Raw Records on Cloudflare R2

Data is partitioned into 200K-row explanation segments stored across content-addressed CAS chunks.

100% Volume Baseline
02

Tier 1: Min/Max Header Zone Maps

Range queries (WHERE date >= '2026-01-01' or WHERE amount > 500) skip non-matching segments in 0ms without downloading.

90% Segments Skipped
03

Tier 2: PK & Column Bloom Filter Sidecars

Point lookups (WHERE id = 'uuid-...' or findById) probe ~240KB sidecar Bloom filters, isolating target segments instantly.

99% Segments Skipped
04

Tier 3: WASM Decoder Covenant & Arrow Stream

Candidate segment decodes inside fuel-metered wasmtime sandbox, streaming zero-copy Arrow memory into DataFusion.

Exact Matching Records Returned
Codebase Matrix

11 Rust Crates by Layer.

A clean dependency DAG — no cycles, no unsafe code, no speculative abstractions.

Layer 1: Foundations & Vocabulary
kolmos-typesCore Vocabulary

Fundamental types (LogicalType, SegmentId, ChunkHash, TableId, RungId)

deps: None (Root)
kolmos-formatBinary Spec

KSF1 binary on-disk layout, LEB128 varints, TLV footers & blake3 checksums

deps: kolmos-types
Layer 2: Storage & Metadata Truth Log
kolmos-casStorage Plane

FastCDC chunking, blake3 dedup, LocalFsStore and S3Store (Cloudflare R2)

deps: kolmos-types, object_store
kolmos-catalogTruth Log

Append-only commit log, atomic HEAD swaps, lock-free MVCC-lite snapshots

deps: kolmos-types, kolmos-cas
Layer 3: Compression IP & Core Engine
kolmos-ladderExplanation IP

MDL cost model, Explainer/Decoder traits, formula AST mining, k-medoids

deps: kolmos-types, kolmos-format
kolmos-engineCore Lifecycle

Segmenter (~200K rows), ingest connectors, background workers, GC

deps: types, format, cas, catalog, ladder
Layer 4: Query, Wire Protocols & Verification
kolmos-querySQL Execution

Apache DataFusion 54.1 TableProvider, min/max & bloom pruning execution

deps: types, format, engine, datafusion
kolmos-serverWire Server

PostgreSQL wire protocol via datafusion-postgres

deps: kolmos-query, tokio
kolmos-cliCLI Binary

kolmos binary: ingest, query, serve, verify, explain-report, stats

deps: engine, query, server, clap
kolmos-wasm-guestWASM Covenant

Sandboxed wasm32-unknown-unknown decoder for covenant verification

deps: types, format
kolmos-testkitChaos Simulator

FaultyStore (torn writes/partial reads), SimClock, deterministic RNG

deps: types, cas, proptest
Zero-Trust Decoder Covenant

Perpetual decodability.
Guaranteed forever.

Every segment stores the blake3 hash of its exact WASM decoder artifact. Decoders run in a zero-import wasmtime sandbox with fuel metering, permanently exempt from garbage collection.

Invariant #1: decode(encode(x)) == x (18 golden fixtures verified)
Zero ambient authority — no disk, network, or clock leaks
Fuel-metered execution prevents infinite loops and CPU attacks
wasmtime-covenant-verifierSTATUS: GREEN
// Segment Footer Metadata Check
KSF1 Footer Magic: "KSF1END\0" verified ✓
Pinned Decoder Hash: 0x7e8b91a2...
WASM Sandbox Fuel Limit: 10,000 units
[OK] Bit-exact verification passed across all rungs
Recovery path: Replaying WAL = ordinary open (no special codepaths)

Build on the
KOLMOS engine.

Connect your existing PostgreSQL, MySQL, or MongoDB workloads and experience 1.66×–2.12× storage reduction today.