rad

The relational database, redesigned. Serverless OLTP backed by durable object storage. With a relational IR layer.

curl -fsSL https://radengine.dev/install.sh | sh

What is Rad?

Rad is a new relational database, unlike any other.

Firstly, it challenges the status-quo of SQL being the lingua franca of relational protocols. Instead, Rad exposes a relational intermediate representation as its interface. This IR can be targeted by SQL dialects, ORMs, or any other kind of frontend.

Secondly, it's backed by object storage rather than disks. This sacrifices speed for infrastructural simplicity. This means Rad can run in serverless environments with just an S3-compatible bucket and a stateless compute environment. You can think of Rad as a small relational query engine over a key-value store.

frontendsgeneratedSQLORMradrelational IRstructured relational programsrelational query enginebind · plan · executeS3-compatible object storagedurable key-value state

LIR + PIR

A relational database IR.

Rad's generated clients compile transactions into structured programs. Inspired by LLVM, the shared intermediate layer separates frontend syntax from structured machine-friendly commands.

{
"nodes": {
"users": { "kind": "scan", "table": "users", "scope": "u" },
"users_ordered": {
"kind": "order",
"input": "users",
"terms": [
{ "expr": { "kind": "col", "scope": "u", "column": "id" } }
]
},
"posts": { "kind": "scan", "table": "posts", "scope": "p" },
"posts_for_user": {
"kind": "filter",
"input": "posts",
"predicate": {
"kind": "binary",
"op": "eq",
"left": { "kind": "col", "scope": "p", "column": "user_id" },
"right": { "kind": "col", "scope": "u", "column": "id" }
}
},
"post_objects": {
"kind": "project",
"input": "posts_for_user",
"scope": "po",
"fields": [
{ "as": "id", "expr": { "kind": "col", "scope": "p", "column": "id" } },
{ "as": "title", "expr": { "kind": "col", "scope": "p", "column": "title" } }
]
},
"posts_ordered": {
"kind": "order",
"input": "post_objects",
"terms": [
{ "expr": { "kind": "col", "scope": "po", "column": "id" } }
]
},
"result": {
"kind": "project",
"input": "users_ordered",
"fields": [
{ "as": "id", "expr": { "kind": "col", "scope": "u", "column": "id" } },
{ "as": "name", "expr": { "kind": "col", "scope": "u", "column": "name" } },
{ "as": "posts", "expr": { "kind": "array", "node": "posts_ordered" } }
]
}
},
"root": { "node": "result", "cardinality": "many" }
}

development workflow

Schema driven

Rad's declarative schema is the source of truth for your database, migrations and type-safe clients. Change it, and everything else follows.

01
define
rad.schema.yaml

Describe tables, relations and indexes.

02
migrate
rad schema migrate

Review and apply the schema diff.

03
generate
rad generate

Generate schema-aware clients.

04
build
your application

Use typed queries in application code.

05
deploy
stateless compute

Run against durable object storage.

06
evolve
the next revision

Change the schema and regenerate.

what you get

Radically rethink your relationship with rows.

The whole stack, from code to columns. Built for today, not 1973.

clients

No need for an ORM

Generated directly from your schema. Typed queries, typed rows and typed relationships. More than just a layer on top, Rad defines and enforces a contract between your data and your code.

db.Tasks.Query().StatusEq("todo").OrderByPriority().All(ctx)
reads

Joins that make sense

Read data the way your application uses it. Parents, children and nested relationships without rebuilding from flattened results.

migrations

Migrations from a schema diff

Change the schema. Rad computes and runs the migration. Stable IDs preserve rename intent without unnecessary rewrites.

rad schema migrate
one binary

Server, devtool & codegen, all in one

Database, toolchain and code generation in a single executable. Runs anywhere you need it to.

storage

Durable, stateless storage

Built for object storage from day one. Stateless compute, durable data.

interface

Strings are not an API

Rad's lower level intermediary format is structured so you can build queries without gluing strings.

"SELECT * FROM users " + whereClause + " ORDER BY " + ... 🙅
protocol

The rad:// protocol

A simple JSON-over-HTTP protocol. Designed for generated clients, not hand-written requests.

Grab the binary for Windows, macOS or Linux. This includes the database server itself and the CLI developer tools.

curl -fsSL https://radengine.dev/install.sh | sh