85 broker RPCs
Select, upsert, delete, batch, vector search, object operations, graph traversal, cache, CDC, migrations, transaction control, and backend health through one serving contract.
Inspect the data planeDeclare once · enforce centrally · call from any SDK
Define entities, storage placement, tenant isolation, security annotations, and native service access in protobuf. UDB turns that descriptor into a gRPC broker, generated SDKs, migrations, policy checks, CDC, and runtime routing across 18 backend kinds.
UDB is useful when the hard part is not a single database query. It is keeping tenant scope, project scope, auth metadata, schema drift, generated clients, native services, and backend-specific execution consistent as the product grows. The descriptor is the source of truth; the broker enforces it on every request.
Select, upsert, delete, batch, vector search, object operations, graph traversal, cache, CDC, migrations, transaction control, and backend health through one serving contract.
Inspect the data planeAuth, identity federation, tenancy, policy bundles, API keys, notifications, storage, realtime, analytics, audit, and operational services behind the native control-plane listener (loopback :50061 by default).
Apps use uploadFile, bound entity/table CRUD, authz helpers, sessions, and event readiness. Raw generated clients stay available for admin and benchmark work.
The playground runs UDB's parser bridge in WebAssembly, so users can inspect catalog output, generated DDL, and compiled SQL without a server.
Open the playgroundJWT · session · API key · federated identity · mTLS SAN
RBAC + ABAC + ReBAC over Casbin · deterministic decision id
per-tenant fair channels · bounded-queue backpressure
request → backend-agnostic intermediate representation
backend executor · RLS via SET LOCAL
typed response · outbox event · redacted compliance envelope
message Invoice { option (udb.core.common.v1.pg_table) = { table: "invoices" schema: "billing" }; string invoice_id = 1 [(...pg_column) = { primary_key: true }]; string tenant_id = 2 [(...pg_column) = { tenant_column: true }]; string customer_id = 3; int64 total_cents = 4; }
import os from udb_client.project import UdbProject # the API key is exchanged for a self-refreshing bearer; # tenant and project come from the key with UdbProject.connect( target="127.0.0.1:50051", # data plane auth_target="127.0.0.1:50061", # control plane: data port + 10 api_key=os.environ["UDB_API_KEY"], ) as udb: pdf = open("invoice.pdf", "rb").read() udb.storage.upload_file("invoice.pdf", pdf, {"content_type": "application/pdf"}) udb.authz.allow_role("reader", "invoice", "Select") rows = udb.data.table("acme.billing.v1.Invoice").select(where={"status": "open"})
import ( "os" udb "github.com/fahara02/udb/sdk/go/udbclient" ) project, err := udb.Connect(ctx, udb.Config{ Target: "127.0.0.1:50051", // data plane AuthTarget: "127.0.0.1:50061", // control plane: data port + 10 Credentials: udb.Credentials{APIKey: os.Getenv("UDB_API_KEY")}, }) if err != nil { return err } defer project.Close() pdf, _ := os.ReadFile("invoice.pdf") _, _ = project.Storage.UploadFile(ctx, "invoice.pdf", pdf, udb.WithContentType("application/pdf")) invoices := project.Entity("acme.billing.v1.Invoice", udb.Key("invoice_id")) rows, _ := invoices.Select(ctx, map[string]any{"status": "open"})
import { readFile } from "node:fs/promises"; import { UdbProject } from "@udb_plus/sdk"; const udb = await UdbProject.connect({ target: "127.0.0.1:50051", // data plane authTarget: "127.0.0.1:50061", // control plane: data port + 10 tenantId: process.env.UDB_TENANT_ID!, // the key's own tenant UUID credentials: { apiKey: process.env.UDB_API_KEY }, }); const pdf = await readFile("invoice.pdf"); await udb.storage.uploadFile("invoice.pdf", pdf, { contentType: "application/pdf" }); await udb.authz.allowRole("reader", { resource: "invoice", action: "Select" }); const rows = await udb.data.table("acme.billing.v1.Invoice").select({ where: { status: "open" } });
# env, broker, first admin, catalog + policies $ udb env --profile dev --out .env $ udb serve proto "" 0.0.0.0:50051 $ udb auth bootstrap user --tenant acme --project billing ... $ udb up --project billing --tenant $TENANT_UUID $ udb sdk generate --lang all # inspect the generated contract $ udb native manifest | jq '.service_count'
UDB's real proto parser (the udb-portable crate
compiled to WASM) runs entirely client-side. Paste a UDB-annotated .proto and watch UDB
produce the exact catalog schema — tables, columns, RLS, per-column data classes — and the same
deterministic manifest checksum the server computes. No server, no mock.
Proto → catalog manifest → per-request runtime pipeline; the descriptor is the single source of truth.
How it works85 RPCs across every backend, plus 2PC/XA, sagas, CDC→Kafka, and migrations.
Explore28 native services, 345 RPCs — auth, identity, tenancy, and policy distribution.
See servicesRLS, encryption, mTLS, fail-closed posture, and compliance profiles.
Security modelLeader election, recovery, observability, SLOs, and runbooks.
Operate at scaleWorkflow helpers for app code, raw generated clients for advanced protocol access.
Get startedDashboard shell for release-binary SDK results when CI publishes bench JSON.
See curves