Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

rhypedb

A strongly-typed object database with first-class relationships and native vector search. Written in Rust.

rhypedb treats objects, relationships, and vectors as core primitives — not afterthoughts bolted onto a relational or document model.

  • Objects, not rows. You define typed schemas; stored objects conform to their type. No impedance mismatch between your data model and your domain model.
  • Relationships are properties. You declare links between objects in the schema. The database stores, traverses, and maintains them — and enforces referential integrity. No foreign keys, no junction tables, no JOINs.
  • Vectors are native. Vector<N> is a field type like String or i64. Vectors are compressed at rest with TurboQuant-adapted quantization, indexed with HNSW, and queried with a .similar(...) operator — optionally with server-side text embedding so you never have to compute embeddings yourself.
  • Full-text search is built in. A String @fulltext field gets a BM25-ranked inverted index — required terms, phrases, prefix terms, diacritic-insensitive, with an optional English stemmer — maintained inside each object's transaction, queried with .matches(...) right next to .similar(...).
  • One path-based query language for lookups, filters, relationship traversal, mutations, vector similarity, and full-text search.
  • Real-time subscriptions. Subscribe to query patterns and get semantically meaningful change events.

Design goals

  • Low memory. rhypedb is built to run inside Firecracker microVMs. TurboQuant compresses vectors 4–8×, and steady-state RSS stays in single-digit megabytes on the benchmark workloads. Scale-to-zero via VM snapshots.
  • Referential integrity. No dangling references. Delete policies (remove, cascade, deny) are declared in the schema and enforced atomically.
  • MVCC. Snapshot isolation with write-write conflict detection. Readers never block writers.
  • Single binary, no external dependencies. rhypedb is the default database for the jkbase cloud platform.

How it fits together

rhypedb ships three binaries:

BinaryRole
rhypedb-serverThe database server. Speaks HTTP (default 127.0.0.1:4200) and a binary TCP protocol (default 127.0.0.1:4201).
rhypedb-cliInteractive client and operator tool — run queries, drive migrations, take backups, export data.
rhypedb-importOffline importer for logical (NDJSON) exports.

A running server is configured by exactly one thing you write: a schema file (.rhype). Everything else — types, indexes, vector fields, relationships, delete policies — is declared there.

Where to go next

Status: early development. The data model, query language, storage engine, vector search, migrations, and backup/restore are all implemented and tested, but APIs may still change. This documentation describes the current behavior of the master branch.

For the internal design (storage engine, MVCC, the vector pipeline), see Architecture.