JouleDB (v0.7.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, vectorized columnar analytics, 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.7.0Release Summary (2026-11-25): Following ourv0.6.0external-audit remediation (which retracted the prematurev1.0.0GA tag, removed the unrelated1.11M-LOCjoule-webcrate, deleted synthetic frontier AI exam routes, and pruned 81 unverified low-BPW causal LLM exports from Hugging Face),v0.7.0lands major engine, consensus, OLTP, and safety upgrades:
- Official ClickBench (
43 / 43Queries Succeeded up to10,000,000Rows): Upgradedcolumnar_exec, width-adaptive integer columns (I8/I16/I32/I64), and streaming ParquetCOPY— completing43 / 43queries (0timeouts,100%SQL-valid match) across100k(1.30×geomean vs DuckDB2.0.1, beating DuckDB on25 / 43queries),1M(9.34×), and10,000,000official rows (9.74×geomean latency,7.50×geomeanreported_j).- Concurrent Multi-Client OLTP over Real TCP
pgwire(invariant_verified: true): FixedMvccTableStoragelazy secondary-index seeding and atomic group-committedCOMMITbatching (605 TPSatc=1to1,319 TPSatc=16with durablefsyncacross100,000accounts and6,431committed balance+ledger transactions, benchmarked candidly against embedded SQLite WAL).- True Raft §6.4
ReadIndexQuorum Linearizable Reads: AddedRaftNode::read_indexandRaftNode::read_linearizable(zero log/WAL writes on reads), verified{:valid? true}by official Clojureelle/elle 0.2.8.- Expanded Panic-Lint Gate (
6Core Crates) & Workspace Alignment: Enforced#![cfg_attr(not(test), deny(clippy::unwrap_used))]in 6 crates (joule-db-core,joule-db-branch,joule-db-ledger,joule-db-local,joule-db-energy,joule-db-weights) with a blocking CI gate and pruned 173 unused workspace dependencies. SeeCHANGELOG.md.
What Is Real & Verified Today (41 Workspace Crates · 728k LOC · 12,268 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-assistedMvccTableStoragewith group-committed WAL durability,CRC-32torn-WAL truncation,ALP + FSSTcolumnar codecs, andRaBitQ1-bitPOPCNTvector quantization.
- Copy-on-Write B-tree pages, lock-free positional
- Vectorized SQL,
pgwire, Streaming ParquetCOPY& Incremental Views (joule-db-query,joule-db-server):- PostgreSQL v3 wire listener (
psql,psycopg3), bounded-chunk streaming ParquetCOPYingress, morsel-parallelcolumnar_execengine (VColvirtual expressions, dictionaryREGEXP_REPLACE/LIKE, algebraicSUM(x+k)sharing, Top-K scans, narrowI8..I64columns),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. Official ClickBench (hits.parquet, 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, 10 s query timeout):
Official hits.parquet Slice |
Parquet Load (DuckDB vs JouleDB) |
JouleDB RSS | Queries < 10s |
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 timeouts) |
43 / 43 (35 exact) |
25 / 18 |
1.30× slower (median 0.80×) |
1.53× more J |
1,000,000 rows (JSON) |
0.402 s vs 2.889 s |
4,902 MB |
43 / 43 (0 timeouts) |
43 / 43 (30 exact) |
3 / 40 |
9.34× slower (median 10.08×) |
9.39× more J |
10,000,000 rows (JSON) |
0.799 s vs 16.66 s |
41,996 MB |
43 / 43 (0 timeouts) |
43 / 43 (30 exact) |
2 / 41 |
9.74× slower (median 9.36×) |
7.50× more J |
- Candid Scale & Performance Summary: Upgrading
columnar_execinv0.7.0eliminated all20query timeouts seen inv0.6.0and improved100k-row geomean latency 20× (26.37×->1.30×, beating DuckDB on25 / 43queries; at10Mrows JouleDB also edges DuckDB onQ11.17 msvs2.30 msandQ2911.05 msvs11.79 ms). DuckDB2.0.1remains9.3×–9.7×faster on geometric mean at1M–10Mrows, and JouleDB's queued columnar/row cache (42.0 GBRSS at10M105-column rows,~4.2 KB/row) still requires out-of-core column eviction to load the full99,997,497-row (~410 GBprojected RAM) file on a128 GBmachine. (Note: the 8–13 non-byte-identical queries among the43 / 43SQL-valid matches are verifiedORDER BYties on equal aggregate counts and integer epoch-day/second formatting.)
2. Concurrent Multi-Client OLTP over Real TCP pgwire (100 Warehouses = 100,000 Accounts)
Executed via bench/oltp_pgwire.py (oltp_pgwire_100wh.json) on framework-128gb-0000 (rapl-package reported_j): 50% indexed point read, 30% multi-statement BEGIN; UPDATE accounts ...; INSERT INTO history ...; COMMIT (JOULEDB_SYNC_COMMIT=on durable fsync), and 20% warehouse COUNT/SUM scan across 1, 4, 8, 16 concurrent workers:
| Concurrency | JouleDB 0.7.0 (pgwire TCP + fsync) |
JouleDB p50 / p95 / p99 |
JouleDB mJ/txn (reported_j) |
Embedded SQLite 3.53.1 (WAL, NORMAL, in-proc) |
Post-Run Conservation Invariant |
|---|---|---|---|---|---|
c = 1 |
604.97 TPS (0 errors) |
1.15 / 5.83 / 11.07 ms |
208.5 mJ |
18,754.8 TPS (p50 0.007 ms, 6.8 mJ) |
invariant_verified = true |
c = 4 |
720.57 TPS (0 errors) |
2.17 / 24.34 / 42.55 ms |
176.9 mJ |
35,532.9 TPS (p50 0.010 ms, 3.6 mJ) |
100,000 accts · 6,431 writes |
c = 8 |
888.93 TPS (0 errors) |
2.99 / 32.00 / 44.72 ms |
145.7 mJ |
36,273.3 TPS (p50 0.010 ms, 3.4 mJ) |
SUM(balance) == 100,096,250 |
c = 16 |
1,318.62 TPS (1 SI conflict) |
3.52 / 44.44 / 60.82 ms |
97.5 mJ |
45,142.2 TPS (p50 0.009 ms, 2.5 mJ) |
Exact match (expected == actual) |
- Candid OLTP Summary: Building
oltp_pgwire.pyuncovered and fixed three real MVCC bugs inv0.7.0(post-startupCOPYrows missing fromMvccTableStorage, globalbegin_batchcontention across concurrentCOMMITs, and missingamorphic_idwriteback onINSERT->UPDATE), raisingc=16throughput from47.5 TPSto1,318.6 TPSwith bit-exact conservation. Embedded in-process SQLite WAL (synchronous=NORMAL, zero TCP wire hops, non-fsynccommits) remains31×–34×faster than JouleDB over TCPpgwire(4 socket round-trips +fsyncper write transaction).
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.7.0)
# 1. Install prebuilt v0.7.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.7.0), not a battle-tested production RDBMS: For mission-critical high-throughput OLTP or full100M+-row out-of-core OLAP today, use PostgreSQL, SQLite, or DuckDB; evaluate JouleDB for experimental multi-model, CoW branching,Amorphic, and joule-metered 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 6 core crates (joule-db-core,joule-db-branch,joule-db-ledger,joule-db-local,joule-db-energy,joule-db-weights); 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.7.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.