JouleDB (v0.8.0 — Pre-1.0 Research Preview)
An experimental energy-metered multi-model database in Rust (Apache-2.0 OR MIT) exploring Copy-on-Write SSI storage, out-of-core .jcol vectorized columnar analytics (43 / 43 Official ClickBench at 100M rows), PostgreSQL pgwire SQL, 5-node TCP Raft ReadIndex consensus, 10,240-bit Amorphic VSA storage, and .jsyn sub-1-bit sentence embeddings.
Pre-1.0 Status &
v0.8.0Release Summary (2026-11-25): Building on ourv0.6.0external-audit remediation (v1.0.0GA tag retracted/yanked, unrelated1.11M-LOCjoule-webcrate and syntheticfrontier_exam_routes.rsdeleted, 81 unverified low-BPW causal LLM exports pruned from Hugging Face) andv0.7.0consensus/MVCC fixes,v0.8.0delivers full-scale out-of-core100M-row Official ClickBench execution, head-to-headPostgreSQL 16.16pgwireOLTP benchmarks, and expanded compiler safety gates:
- Full Official
99,997,497-Row (14.78 GB) ClickBench Completed in Bounded RAM (6.20 GBRSS,20.74 GBPeakVmHWM): Added out-of-core.jcolcolumnar segment files (disk_col_segments.rs,<= 262,144rows/segment, CRC-32 slice +JCL1footer verification,preadcolumn-subset I/O) and two-phaseWHERE-first + 4-pass Radix-64 shardedexecute_segmented(columnar_exec.rs) — cutting10M-row RSS 17.5× (42.0 GB -> 2.41 GB), speeding up10Mgeomean latency 3.0× (9.74× -> 3.21×), and completing43 / 43official queries (0errors,0restarts,43 / 43SQL-valid match) on the full99,997,497-row dataset (4.85×geomean latency,4.25×geomeanreported_jvs DuckDB2.0.1, beating DuckDB on5 / 43queries at100Mrows).- Head-to-Head
100-Warehouse TCPpgwireOLTP vs.PostgreSQL 16.16(fsync=on) &SQLite 3.53.1: AddedO(1)secondary-index PK/UNIQUE constraint verification, multi-row PKINSERTbatching, parameterizedSELECTfast-path binding, and PostgreSQL v3 §55.2.3Syncpipeline error recovery — raising JouleDBpgwire(fsync=on) throughput 2.54× (1,319 -> 3,353.5 TPSatc=16;1,659.5 TPSatc=1,1.44×faster thanPostgreSQL 16.16atc=1), withinvariant_verified: trueacross all5engine/protocol modes.- True Raft §6.4
ReadIndexQuorum Linearizable Reads:RaftNode::propose_and_commit(§5.4.2) andRaftNode::read_linearizable(§6.4ReadIndex, zero WAL log writes on reads), verified{:valid? true}by official Clojureelle/elle 0.2.8.- Expanded Panic-Lint Gate (
7Core Crates): Enforced#![cfg_attr(not(test), deny(clippy::unwrap_used))]across 7 crates (joule-db-core,joule-db-branch,joule-db-ledger,joule-db-local,joule-db-energy,joule-db-weights,joule-db-query, plus#![deny(clippy::unwrap_used)]ondisk_col_segments.rs). SeeCHANGELOG.md.
What Is Real & Verified Today (41 Workspace Crates · 732.5k LOC · 12,269 Tests)
- Core Storage, MVCC
SSI& Recovery (joule-db-core,joule-db-local):- Copy-on-Write B-tree pages, lock-free positional
pread/pwrite, Cahill Serializable Snapshot Isolation (SSIrw-antidependency detection), index-assistedMvccTableStoragewithO(1)PK/UNIQUE index checks and group-committed WAL durability,CRC-32torn-WAL truncation,ALP + FSSTcolumnar codecs, andRaBitQ1-bitPOPCNTvector quantization.
- Copy-on-Write B-tree pages, lock-free positional
- Out-of-Core
.jcolColumnar Analytics,pgwire& Incremental Views (joule-db-query,joule-db-server):- PostgreSQL v3 wire listener (
psql,psycopg3Simple & Extended Pipeline modes), bounded-chunk streaming ParquetCOPYspilling262,144-row.jcoldisk segments (I8/I16/I32/I64narrowing, bitpacked null masks, compactu8/u16/u32local dictionaries, CRC-32 integrity), two-phaseWHERE-firstpreadsegment execution + 64-shard RadixGROUP BY(execute_segmented),DBSPZSet<T>incremental view algebra, and experimental multi-language query frontends (Cypher, Datalog, SPARQL, Gremlin,SigQL).
- PostgreSQL v3 wire listener (
- 5-Node Real TCP Raft Consensus with
ReadIndex(raft.rs,raft_transport.rs):- Quorum write commit via
RaftNode::propose_and_commit(Raft §5.4.2 current-term commit safety), quorum linearizable reads viaRaftNode::read_linearizable(Raft §6.4ReadIndexheartbeat quorum without WAL log growth), durableCRC-32raft.walrestart recovery, and a 5-node TCP socket-severing fault-injection test verified{:valid? true}(:strict-serializablerw-register) by Kyle Kingsbury's official Clojureelle/elle 0.2.8.
- Quorum write commit via
- Energy Telemetry (
joule-db-energy,joule-db-ledger):- Hardware counter readers on bare metal (
reported_jvia Linux/sys/class/powercap/intel-rapland macOSIOKit SMC/powermetrics) segregated explicitly from analytical cost-model estimates (est_j) for sub-millisecond operations, anchored in Merkle receipts.
- Hardware counter readers on bare metal (
.jsyn(JSYN-v1) Sub-1-Bit Sentence Embeddings &AmorphicStorage (joule-db-weights,joule-db-amorphic):- Pure-Rust
LittleBit-2 ⊕ Sakana SVFweight factorization (0PyTorch / ONNX Runtime): verified0.9441sentence-embedding cosine similarity vs upstreamFP32ondcharlot65-openie/all-MiniLM-L6-v2-LittleBit(1.95 MB,0.4378 BPW,22.23×smaller thanFP16), plus experimental10,240-bit Kanerva VSAAmorphicstorage (1.35 GBstreamed in57.64 MBPeak RSS).
- Pure-Rust
Reproducible External Evaluations (bench/)
1. Full Official ClickBench (hits.parquet, 99,997,497 Rows, 105 Columns, 43 Queries) vs. DuckDB 2.0.1
Executed via bench/clickbench_official.py over real pgwire (psycopg 3.3.9) on framework-128gb-0000 (AMD Ryzen AI Max+ 395, 128 GB RAM, Linux rapl-package reported_j):
Official hits.parquet Scale |
Parquet Load (DuckDB vs JouleDB) |
JouleDB Load RSS (VmHWM Peak) |
Queries Succeeded | SQL-Valid Match (Exact) |
Faster (JouleDB / DuckDB) |
Geomean Latency (JouleDB / DuckDB) |
Geomean Energy (reported_j) |
|---|---|---|---|---|---|---|---|
100,000 rows (JSON) |
0.197 s vs 0.355 s |
934 MB |
43 / 43 (0 err) |
43 / 43 (35 exact) |
25 / 18 |
1.30× slower (median 0.80×) |
1.53× more J |
1,000,000 rows (JSON) |
0.147 s vs 0.965 s |
1,237 MB (2,197 MB) |
43 / 43 (0 err) |
43 / 43 (28 exact) |
8 / 35 |
3.01× slower (median 3.14×) |
3.07× more J |
10,000,000 rows (JSON) |
1.402 s vs 10.755 s |
2,406 MB (9,006 MB) |
43 / 43 (0 err) |
43 / 43 (29 exact) |
10 / 33 |
3.21× slower (median 4.73×) |
3.21× more J |
99,997,497 rows — FULL 14.78 GB (JSON) |
15.546 s vs 91.621 s |
6,199 MB (20,740 MB) |
43 / 43 (0 err) |
43 / 43 (31 exact) |
5 / 38 |
4.85× slower (median 4.57×) |
4.25× more J |
- Candid Full-
100MScale & Performance Summary: Out-of-core.jcolsegment spilling (<= 262,144rows/segment) +preadcolumn-subset loading reduced post-load memory from~4.2 KB/row(~410 GBprojected inv0.7.0) to62 B/row(6.20 GBRSS after loading all99,997,497105-column rows;20.74 GBkernelVmHWMpeak across all 43 queries). At full100Mscale, JouleDB0.8.0completes43 / 43queries (0errors,0restarts) and beats DuckDB2.0.1on5 / 43queries (Q00.88 msvs2.07 ms,Q61.59 msvs6.65 ms,Q78.79 msvs27.79 ms,Q28REGEXP_REPLACE2,524 msvs2,769 ms,Q4211.61 msvs14.90 ms). DuckDB2.0.1wins38 / 43queries (4.85×geomean latency,5.89×faster Parquet load), with JouleDB's widest gap on100M-group high-cardinalityQ32(17.42 svs0.98 s,17.75×). (All 12 non-byte-identical results among the43 / 43SQL-valid matches at100Mrows are verifiedORDER BYties on equal aggregate counts and integer epoch-day/second formatting.)
2. Head-to-Head 100-Warehouse TCP pgwire OLTP vs. PostgreSQL 16.16 & SQLite 3.53.1
Executed via bench/oltp_pgwire.py (oltp_pgwire_100wh.json) on framework-128gb-0000 (rapl-package reported_j): 100,000 accounts (100 warehouses), 50% indexed point read, 30% durable BEGIN; UPDATE accounts ...; INSERT INTO history ...; COMMIT (fsync=on, synchronous_commit=on), and 20% warehouse COUNT/SUM scan across 1, 4, 8, 16 concurrent workers:
Engine & Wire Protocol (invariant_verified = true on all 5) |
c = 1 TPS (p50) |
c = 4 TPS (p50) |
c = 8 TPS (p50) |
c = 16 TPS (p50, mJ/txn) |
Committed Writes |
|---|---|---|---|---|---|
JouleDB 0.8.0 (pgwire Simple Query, 4-RTT + fsync) |
1,659.5 (0.30 ms) |
1,086.4 (0.97 ms) |
2,397.5 (0.96 ms) |
3,353.5 (1.08 ms, 17.2 mJ) |
20,366 (2 SI conflicts) |
PostgreSQL 16.16 (pgwire Simple Query, 4-RTT + fsync) |
1,149.1 (0.08 ms) |
3,020.2 (0.09 ms) |
5,826.9 (0.15 ms) |
11,452.5 (0.25 ms, 3.79 mJ) |
51,319 (0 conflicts) |
PostgreSQL 16.16 (pgwire Extended Pipeline, 1-RTT + fsync) |
1,255.4 (0.07 ms) |
2,984.2 (0.09 ms) |
6,045.0 (0.14 ms) |
10,441.8 (0.25 ms, 3.71 mJ) |
49,555 (0 conflicts) |
JouleDB 0.8.0 (pgwire Extended Pipeline, 1-RTT + fsync) |
256.9 (0.40 ms) |
490.2 (1.06 ms) |
514.4 (1.07 ms) |
593.7 (1.11 ms, 71.4 mJ) |
4,394 (1 SI conflict) |
SQLite 3.53.1 (Embedded in-proc C API, WAL, NORMAL) |
43,264.1 (0.005 ms) |
87,546.8 (0.006 ms) |
99,632.0 (0.007 ms) |
111,119.3 (0.007 ms, 0.36 mJ) |
845,266 (no TCP / fsync) |
- Candid OLTP Summary:
O(1)secondary-index PK/UNIQUE checks raised JouleDB Simple Query throughput 2.54× overv0.7.0(1,318.6 -> 3,353.5 TPSatc=16, and1,659.5 TPSvsPostgreSQL 16.16's1,149.1 TPSatc=1). Atc=16,PostgreSQL 16.16's mature C buffer/lock manager is3.42×faster (11,452.5 TPS,4.5×lowermJ/txn), and inpsycopgExtended Querypipeline()mode JouleDB'sDescribe('D') statement probe currently executes a dry-run schema query beforeExecute, limiting pipelined mode to593.7 TPS(invariant_verified = true).
3. 5-Node Real TCP Raft (ReadIndex) Fault-Injection + Official Clojure elle 0.2.8
Executed via crates/joule-db-server/tests/raft_tcp_elle_fault_injection.rs and bench/elle_check.clj:
- Setup: 5 real
RaftNode<KvStateMachine, TcpRaftTransport>servers with durableraft.walacross a 20-link socket-severingTcpPartitionMatrix, usingpropose_and_commitfor writes and Raft §6.4read_linearizable(ReadIndexheartbeat quorum, zero log growth) for reads. - Nemeses: Asymmetric
2/5vs3/5TCP partition isolating initial leader -> minority write &ReadIndexrejection ->3/5higher-term election -> node stop + diskraft.walrestart -> link heal & 5-node convergence (lost_committed_writes = 0). - Official
elle/elle 0.2.8Verdict (raft_tcp_elle_official_verdict.txt):{:valid? true}(rw-register,:strict-serializable,76events).
4. .jsyn (JSYN-v1) Fidelity vs. Compression Curve
| Model / Layer | BPW |
Shrink vs FP16 |
Measured Fidelity vs Upstream | Guidance |
|---|---|---|---|---|
all-MiniLM-L6-v2-LittleBit (6L Encoder) |
0.438 |
22.2× (1.95 MB) |
0.9441 embedding cosine vs FP32 |
Recommended for semantic search & TriModal RRF |
Gemma-4-E2B q_proj (r = 8..128) |
0.028–0.166 |
564×–96.6× |
0.271–0.455 output cos (KL 3.87–2.72) |
Experimental only — not a drop-in causal LLM (retracted from HF) |
Inkling-2-Mini w13 (128-Exp MoE, r = 8..128) |
0.023–0.134 |
701×–120× |
0.113–0.350 output cos (KL 2.91–2.59) |
Experimental only — not a drop-in causal LLM (retracted from HF) |
Quickstart (v0.8.0)
# 1. Install prebuilt v0.8.0 binary (macOS ARM64/x86_64; Linux x86_64 GLIBC <= 2.35, Ubuntu 22.04/24.04 & Debian 12 ready)
# 2. Launch JouleDB server (HTTP :8080, TCP :8081, PgWire :8082, JWP :8083, FlightSQL :8084)
# 3. Connect with psql or run one-shot SQL
# 4. Run fast in-process subsystem smoke checks & technical security-control self-tests
Build & Test from Source
Honest Engineering Boundaries (Read Before Adopting)
- Pre-1.0 research preview (
v0.8.0), not a battle-tested production RDBMS: While JouleDB0.8.0now executes all43 / 43Official ClickBench queries on the full99,997,497-row dataset in bounded RAM (6.2 GBload RSS) and3,353.5 TPSdurable TCPpgwireOLTP, mature single-purpose engines (PostgreSQL 16at11.5k TPSc=16,DuckDB 2.0at4.85×faster100Mgeomean,SQLiteembedded WAL) remain faster for conventional single-model production workloads. - No external compliance certifications:
jouledb trustexercises technical security primitives in code (SHA-256audit hash-chains, WORM retention timestamps, per-subject DEK zeroization, Luhn redaction,CycloneDX v1.6SBOM, Bell-LaPadula lattice checks). No third-party SOC 2, ISO 27001, HIPAA, PCI-DSS, NIST CMVP, or FedRAMP audit has been conducted. - Exact compiler safety lint scope:
#![deny(unsafe_code)]is set injoule-db-corewith 1#![allow(unsafe_code)]module (crates/joule-db-core/src/storage/mmap_extent.rs).#![cfg_attr(not(test), deny(clippy::unwrap_used))]is enforced in 7 core crates (joule-db-core,joule-db-branch,joule-db-ledger,joule-db-local,joule-db-energy,joule-db-weights,joule-db-query, plus#![deny(clippy::unwrap_used)]oncrates/joule-db-server/src/disk_col_segments.rs); the workspace-wide lint level iswarn. - Client SDKs are in-tree (
sdks/*,python/): Client libraries for Python (PyO3/maturin), TypeScript, Go, .NET, Swift, Java, and C99 ship in source form inside this repository and are not yet published to PyPI, npm, NuGet, or Maven Central.
Documentation & Links
- Website: https://jouledb.org (Benchmarks · Honest Boundaries · Security Controls & Bridges ·
.jsynFidelity) - Online Book (
mdBook): https://openie-dev.github.io/jouledb - Verified
.jsynSentence Embedder & Benchmark Dataset: https://huggingface.co/dcharlot65-openie - Architecture Whitepaper (
v0.8.0):docs/WHITEPAPER-JOULEDB-2026-11.md .jsynBinary Specification:docs/JSYN-LIVING-WEIGHTS-SPEC.md- Benchmark Scripts & Raw JSON/EDN Outputs:
bench/
License
Copyright (c) 2026 Open Interface Engineering, Inc. Dual-licensed under either Apache License, Version 2.0 or MIT License, at your option.