MLflow
Hybrid tracking, out-of-order traces & analytics
Runs MLflow 3.15.1 experiment tracking, 100-tag atomic batches, out-of-order distributed trace spans (init_or_mutate), LIKE/ILIKE search, and columnar OLAP trace metrics in one engine.
Contract-first database · v0.2.5 Open Source
Build with AI. Keep your data correct.
RiffDB puts your business rules inside the database, so AI-generated applications cannot bypass them. Get transactions, analytics, and search in one Rust-powered engine, without stitching together five different systems.
ACID transactions · Compiled contracts · Zero-ETL analytics · Native MCP
Open source in Rust (MIT / Apache-2.0) for Linux and Apple Silicon macOS with TypeScript, Python, Go, and Rust SDKs. Want hosted databases? Join managed early access.
Proven against real software
RiffDB is not a theoretical query language looking for a workload. We built out-of-tree adapters for four demanding open-source systems using ordinary compiled contracts and generated Go, Python, and TypeScript SDKs, with zero SQL or privileged storage hooks.
Hybrid tracking, out-of-order traces & analytics
Runs MLflow 3.15.1 experiment tracking, 100-tag atomic batches, out-of-order distributed trace spans (init_or_mutate), LIKE/ILIKE search, and columnar OLAP trace metrics in one engine.
8 / 8 upstream checkpoint capability suites
Implements sync and async BaseCheckpointSaver for multi-agent graphs with idempotent superstep writes, atomic thread branching, and bounded history pruning.
Complete storage/test.RunAllTests pass
Replaces race-prone SQL tuple checks with compiler-sealed Zanzibar tuple decisions (observe_or_initialize + decide) and bytewise UTF-8 changelog pagination.
Atomic signup, consume-once tokens & secret redaction
Compiles configured auth models into atomic user/account creation commands, transaction-time token expiry refusal, and secret-classified fields excluded from MCP.
The application changed
Coding agents can assemble routes, handlers, and background workers in minutes. They can also reproduce every concurrency bug, duplicate retry, and scattered invariant we spent decades learning to avoid.
The write committed. The response vanished. When the caller retries, a naive handler charges or mutates twice.
Each line looks reasonable in code review. Concurrent execution breaks the balance, quota, or tuple invariant.
Web handlers, queue workers, and agent tools each remember a different fragment of what must remain true.
RiffDB’s thesis
The safest operation is the one an application cannot express incorrectly.
See RiffDB in action
Instead of scattering SQL transactions and ETL sync jobs across your codebase, you declare the command and its derived analytics in a contract. RiffDB generates the client and enforces the guarantees on every call.
command AllocateBudget {
input request_key: string<128>
input organization_id: uuid
input amount: money<USD>
service now: transaction_time
idempotency_key request_key
mutate Budget(organization_id) as b
else BudgetMissing {}
require Enough: b.remaining >= amount
else InsufficientFunds {}
set b.remaining = b.remaining - amount
emit BudgetAllocated {
organization_id: organization_id,
amount: amount,
allocated_at: now,
}
return Allocated {
remaining: b.remaining
}
}
// Zero-ETL daily OLAP rollup
projection SpendByDay {
source event BudgetAllocated
key (organization_id, day(allocated_at))
measure spend = sum(amount)
frontier transactionally_ordered
}// Call the generated SDK
const outcome =
await client.allocateBudget({
requestKey: "alloc-2026-0042",
organizationId,
amount: "250.00",
});
// Exhaustive closed outcome union
switch (outcome.tag) {
case "Allocated":
console.log(outcome.remaining);
break;
case "InsufficientFunds":
case "BudgetMissing":
break;
}
// Query the live OLAP rollup
const spend = await client.spendByDay(
{ organizationId },
{ freshness: "causal" }
);requestKey replays the exact stored Allocated outcome at sequence 0042 without deducting twice.organization_id serialize on the declared conflict key. One succeeds; the other observes the updated balance.BudgetAllocated event, provenance, and the SpendByDay rollup share one commit sequence. With freshness: "causal", your dashboard immediately reflects the write.riffdb-mcp gives an agent the AllocateBudget tool and its schema, never raw table mutation.One database, three workloads
Stitching together an OLTP database, an analytics warehouse, a search cluster, a vector store, and CDC pipelines does not create one transaction, one freshness contract, or one coherent backup. RiffDB builds OLTP, OLAP, and search into one ordered engine.
Wired together
Dual writes · fragile ETL · stale dashboards · fractured recovery
Built in, not bolted on
Honest tradeoff comparison
Traditional SQL databases can implement every pattern below when paired with disciplined application code, manual row locking, idempotency tables, outbox workers, and external search or analytics pipelines. RiffDB is built for teams who want those safety properties enforced by the database interface itself.
| Dimension | Traditional SQL + Application Glue | RiffDB (v0.2.5) |
|---|---|---|
| Data mutation | Arbitrary SQL (INSERT, UPDATE, DELETE) and open client-managed transactions | Compiled domain commands and durable cross-partition sagas; no generic CRUD surface |
| Business invariants | Split across SQL constraints, triggers, isolation levels, and application code | Declared in .riff contracts, proven by the compiler, and revalidated at commit |
| Retry & timeout safety | Hand-rolled idempotency tables, unique keys, and background cleanup jobs | Command-level idempotency_key with durable typed outcome replay built into the protocol |
| Analytics & rollups | Materialized views, read replicas, or CDC/ETL pipelines to a separate warehouse | Contract-declared scalar columnar projections and event rollups with freshness watermarks |
| Search & vectors | Bolt-on full-text/vector extensions or external search clusters synced via CDC | Native stemmed/fuzzy BM25 with snippets, Partitioned HNSW vectors, and single-query hybrid RRF |
| AI agent access | Custom MCP wrappers or risky read/write database credentials | Native capability-filtered MCP (riffdb-mcp) with automatic secret-field redaction |
| Ecosystem maturity | Decades of production hardening, universal tooling, and ad-hoc multi-table SQL joins | Open-source v0.2.5 focused on bounded, contract-first multi-tenant SaaS workloads |
Running an existing relational SaaS stack? You do not need to rewrite your system of record. See the SQL safety comparison & brownfield adoption guide ↗ for carving out high-contention workflows without dual writes.
Reproducible evidence & v0.2.5 maturity
Database claims should come with hardware specs, durability settings, and honest boundaries. Below are reproducible results from the checked benchmark harnesses on an 8 vCPU AMD EPYC 9B14 host (32 GB RAM, ext4, full redb fsync durability), where every run verifies exact semantic parity before timing.
Full redb fsync durability, provenance, and idempotency outcome persistence on 8 vCPU AMD EPYC 9B14.
5,363 vs. 5,544 commits/s at 32 clients while maintaining a transactionally ordered projection with sub-second catch-up.
56 µs Partitioned HNSW vector join, 119 µs stemmed/fuzzy BM25 with snippets, and 122 µs hybrid RRF (327-684 µs over gRPC).
32-client compiled plan throughput (8,162 QPS end-to-end over public client gRPC vs. 10,393 QPS on PostgreSQL safe-app).
Shipping in v0.2.5 today
init_or_mutate, decide, mutate any pool claims, partial-update coalesce, deferred-pipeline idempotency disjointness (ADR-0349), and storage-verified cross-partition sagas (ADR-0334)ADR-0339)ADR-0337), online snapshot backups, online scrub, and online staged restoreauthorization_diagnostic classifications (ADR-0348), multi-database HostedHttp /mcp routing, native Rust Python Unix driver socket (cp311-abi3), and 7-surface remote conformance (ADR-0350)Deliberate v0.2.x boundaries
Causal, Bounded, and Available freshness and support automatic failover, but multi-primary writes and cascading followers are outside 0.2.x.riffdb migrate workflow with pre-migration backup.x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, and aarch64-apple-darwin (no native Windows or Intel macOS builds).@riffdb/better-auth).Start in 60 seconds
Scaffold a complete runnable starter or initialize RiffDB inside an existing TypeScript, Python, Go, or Rust repository. riffdb dev launches an isolated local database, compiles your contract, generates the typed SDK, seeds initial command data, and runs your application with zero manual key or certificate setup.
Path 01 · Open Source (v0.2.5)
Install the signed CLI and daemon binaries or language packages and build locally today under MIT / Apache-2.0.
Path 02 · RiffDB Cloud
Want replicated, zero-maintenance RiffDB hosting without operating your own cluster? Join the early-access list below.
# 1. Scaffold a runnable starter app
# (typescript | python | go | rust)
riffdb new task-tracker \
--language typescript
cd task-tracker
# 2. Start local DB, seed & run
riffdb dev --seed --run
# Or add RiffDB to an existing repo:
riffdb init my-app \
--generator typescript \
--generator mcp \
--starter
riffdb generateManaged RiffDB
We’re working toward a managed service. Join the early-access list for material project updates and the first invitations.