DB Nerds – Try this out

haz001 pts0 comments

KesselDB — Lightspeed Deterministic SQL Database

GitHub →v2.0.0 · Hyperdrive engaged<br>The database that made<br>the Kessel Run in 12 parsecs.<br>Deterministic, replicated SQL with PostgreSQL-style flexibility on a TigerBeetle-style core. 14.71M point reads/sec at K=8, 6.02× Postgres on OLTP read-only, TLA+ verified VSR. Pure Rust, zero deps. Single binary, Docker, or Helm.<br>Download Binary →Documentation<br>cockpit ~ millennium-falcon<br># Binary CLI<br>$ kessel "CREATE TABLE acct (owner U32 NOT NULL, bal I64 NOT NULL)"<br>$ kessel "SELECT SUM(bal) FROM acct WHERE owner = 100"<br>=> 50 · 0.00012s# HTTP/JSON<br>$ curl -s -X POST --data-binary 'SELECT * FROM acct' -H 'Authorization: Bearer mysecret' http://127.0.0.1:8080/v1/sql# PostgreSQL wire<br>$ PGPASSWORD=mysecret psql -h 127.0.0.1 -p 5432 -U test<br>=&gt; SELECT * FROM acct

14.71M<br>Point reads / sec (K=8)

6.02×<br>OLTP RO vs Postgres (N=16)

51,840<br>COPY FROM rows / sec

External deps in kernel

// ship systems<br>Engineered for lightspeed

Hyperdrive SQL<br>CREATE / ALTER (online, no lock) / DROP, INNER/LEFT/RIGHT/FULL JOIN, GROUP BY, HAVING, indexes, FK with ON DELETE actions, CHECK, deterministic triggers — real SQL, no compromises.

Viewstamped Replication<br>Multi-node VSR over real TCP. Safety-hardened against view-change op loss and liveness-tested under an adversarial partition corpus. Survives partitions like a YT-1300 survives Imperial fire.

TLA+ Verified Core<br>Seven layered TLA+ modules (Replication → MVCC backbone). TLC model-checks VSR safety across 528M distinct states at depth 21 — zero counterexamples.

MVCC + Cahill SSI<br>Every SQL statement is a deterministic MVCC transaction with snapshot isolation + Cahill SSI. Write-skew impossible. Replicas reach byte-identical state at every commit. 5 Jepsen-style linearizability tests pass under partition.

Four Wire Protocols<br>Binary fast path, HTTP/1.1 + JSON (/v1/sql, /v1/metrics Prometheus), WebSocket /v1/ws, and PostgreSQL v3.0 with Simple + Extended Query, binary Bind, and SCRAM-SHA-256.

PG Ecosystem Verified<br>psql, pgcli, pgAdmin, DBeaver, DataGrip, Metabase, Tableau. Real driver CRUD green in simple + extended modes: pgJDBC 42.7.4, psycopg2/3, SQLAlchemy 2.0, asyncpg. COPY FROM STDIN text + CSV + binary at ~51,840 rows/sec.

Deterministic WASM UDFs<br>Zero-dep WASM-MVP interpreter for CHECK / trigger user functions. Gas-bounded, no host calls, no clocks. Every replica runs byte-identical UDF logic — replayable from the log.

Parquet & External Sources<br>Register and REFRESH JSON / NDJSON / CSV / Parquet from HTTP(S), S3, or Azure Blob. Pure-Rust zero-dep Parquet reader covers the full 6-codec × V1/V2 × PLAIN/dictionary matrix up to 3-deep nesting.

Cross-Shard Scatter Scan<br>K independent VSR shard groups, zero-dep scatter-gather with bounded per-shard channels and BinaryHeap k-way merge. K-invariance locked by 85-seed × 5-K sweep: byte-identical output for K ∈ {1,2,4,8,16}.

Docker, Helm & Fly.io<br>Multi-arch (amd64 + arm64) GHCR image, ~77 MiB stripped. Helm chart for single-pod or 3/5-replica VSR cluster with primary-kill failover. fly.toml tested end-to-end in CI.

// pre-flight<br>Launch sequence<br>Grab a pre-built binary or build from source. The whole engine is a seedable state machine — ready to jump as soon as you set coordinates.<br>01Calibrate the navicomputer<br>02Charge the hyperdrive<br>03Punch it

Read the full docs →<br>// docker (fastest jump)<br>docker run --rm \<br>-p 6532:6532 -p 6533:6533 -p 5432:5432 \<br>-v $PWD/kesseldb-data:/data \<br>-e KESSELDB_TOKEN=changeme \<br>ghcr.io/hassard0/kesseldb:latest<br>// pre-built binary (linux x86_64)<br>VER=v2.0.0 # see releases for latest<br>curl -L https://github.com/hassard0/KesselDB/releases/download/$VER/kesseldb-$VER-x86_64-unknown-linux-gnu \<br>-o kesseldb && chmod +x kesseldb

./kesseldb 127.0.0.1:7878 ./data<br>// build from source<br>git clone https://github.com/hassard0/KesselDB && cd KesselDB<br>cargo build --release --features pg-gateway,http-gateway

./target/release/kesseldb 127.0.0.1:7878 ./data

kesseldb binary from deterministic zero http

Related Articles