xyzDB

Specifications

The hard numbers, taken straight from the source. None of it is secret — the code is available, so these are simply the facts as built.

Implementation

Language
Rust (edition 2024)

One workspace; the whole database is one project.

Distribution
Single static binary

Server and CLI. No JVM, no sidecar, no network runtime, no wrapper.

Topology
Single-node

No replication and no clustering, by design.

Storage internals

Engine
turba — 5 LSM trees

records · identity · dictionary · ghosts · vectors, each with its own WAL, memtable and compaction.

Primary key
22-byte Z-order key

Type id (21 bits) and timestamp (21 bits) bit-interleaved, so a gravity cluster is contiguous on disk.

Gravity hash
FNV-1a → 48 bits

Deterministic, unsalted bucket assignment.

Ghost routing
XXH3 (64-bit)

Fingerprints a query's filter to name and match auto-ghosts.

Compression — hot
LZ4 (L0–L1)

Cheap to write at the top of the tree.

Compression — cold
Zstd level 3 (L2+)

Optional trained dictionary on cold tiers for denser blocks.

Block size
32 KB (ssd) · 64 KB (hdd)

Selected by --storage-profile.

Vectors

Storage
f32 — lossless

No int8/binary quantization: there is no index to rerank, so quantizing would be real loss.

Dimensions
No fixed size

A homogeneous float list of 64+ becomes a vector; the dimension must stay consistent within a field, checked at query time.

Search
Exact — no ANN

NEAREST brute-forces the gravity bucket with Cauchy–Schwarz pruning. Recall 1.0, nothing to tune.

Metrics
cosine · dot · l2
Embedding
Engine never embeds (default)

You bring the query vector; a remote service is opt-in only.

Hard limits

SCAN
1,000 default · 10,000 max

An unbounded SCAN caps at 1,000 (with a warning); an explicit LIMIT above 10,000 is rejected.

PUT BATCH
10,000 records / batch

Written atomically in one batch.

Gravity bucket
No size cap

A bucket grows as needed; paginate large reads with CURSOR. NEAREST stays exact over the whole bucket.

Lobes
65,536

Structural (16-bit lobe id), not a tunable knob.

Types per lobe
2,097,151

21-bit type id in the Z-order key.

Auth token
4 KiB max

Data types

Ten value types; nesting through list and map is arbitrary-depth.

Bool
boolean
Int
i64

signed 64-bit integer

Float
f64

signed 64-bit float

Text
UTF-8
Timestamp
i64 — microseconds

since the Unix epoch

Bytes
raw byte string
List
ordered, heterogeneous
Map
string-keyed, sorted
Vector
f32, 64+ dims
Null
explicit null (Null = Null is true)

Runtime & network

Default port
2505 / TCP
Wire protocol
Versioned, length-framed

A version byte, then text or binary payloads; plain HTTP on the same port is auto-detected.

Transport security
TLS 1.3 (opt-in)

--tls-cert / --tls-key · --auth-token

WAL
64 MB segments · durable default

Acknowledged writes are fsynced; segments roll and prune automatically.

Snapshot
Hot, hard-linked

Millisecond lock window; restore is offline.

Version & license

Version
v0.8.9
License
BSL 1.1

Source-available; converts to an open license over time.