Rust SSPL-1.0 New: Android SDK and embedded library →

A distributed database that speaks SQL.

skaidb is a schema-less, SQL-speaking, leaderless distributed database written in Rust. It stores dynamically-typed documents and queries them with a subset of SQL:2016 core.

One binary gives you LSM storage, leaderless replication with tunable quorums, secondary and global indexes, full-text and vector search, geo queries, time-series tables, and a native MQTT broker — behind a binary fast path, with a REST gateway and a PostgreSQL-protocol port alongside.

The same engine also runs inside an application: as an Android library with a Kotlin API, and as an in-process library with a C ABI.

Get started Read the docs Android and embedded
leaderless
every node reads & writes
1 GB
runs a comfortable cluster node
9
official drivers
amd64 · arm64
signed packages
Android · Embedded

The same engine, inside your app

skaidb also ships as a library. On Android the engine is a native library in your APK and the database is a directory in your app's private storage; nothing listens on a socket. It is the same SQL, the same types and the same on-disk format as the server — a local store your app owns, not a member of a cluster.

// Kotlin — org.skaidb:skaidb-android-kotlin
val db = SkaidbDatabase.open(
    directory = File(context.noBackupFilesDir, "store"),
    options = OpenOptions(key = storeKey),   // 32 bytes, or null for a plain store
)
db.execute("CREATE TABLE IF NOT EXISTS messages (PRIMARY KEY (channel, ts))")

db.update(
    "INSERT INTO messages (channel, ts, sender, body) VALUES (?, ?, ?, ?)",
    "C1", "1700000000.000100", "U7", "hello",
)

// a Flow: the current rows, then again whenever a write changed them
db.observe(
    "SELECT ts, sender, body FROM messages WHERE channel = ? ORDER BY ts DESC LIMIT 200",
    channel,
).collect { rows -> render(rows) }
Kotlin API for Android

skaidb-android-kotlin gives suspending calls and Flow queries; skaidb-android-core is a blocking API for Java and Kotlin. Android 11 (API 30) and newer, on arm64-v8a, armeabi-v7a, x86_64 and x86.

Encrypted on the device

Pass a 32-byte key and every table file, index file and write-ahead log is sealed. A missing or wrong key is refused before any data is read. A killed process loses no acknowledged write.

A C ABI for other languages

libskaidb_embedded, static and shared, with one header; prebuilt for Linux x86_64 and aarch64. An unencrypted store's directory is a server data directory: skaidbsh --local opens it.

The library never connects anywhere: no network and no replication. Moving data between a device and a server is the application's job. Full-text search is not part of the Android library; time-series tables, vector indexes and geo indexes are off there unless the open asks for them.

Android guide Embedded library guide Download
Quickstart

From install to first query

Signed packages for Debian/Ubuntu on amd64 and arm64, straight from the package repository. Each package ships the skaidb server and the skaidbsh shell.

# Add the signed apt repository (Debian / Ubuntu)
curl -fsSL https://repo.dsys.org/pubkey.gpg \
  | sudo tee /etc/apt/keyrings/repo-dsys.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/repo-dsys.gpg] https://repo.dsys.org/deb stable main" \
  | sudo tee /etc/apt/sources.list.d/repo-dsys.list
sudo apt update && sudo apt install skaidb

The node also serves a built-in web UI at 127.0.0.1:7080/ui — status, SQL console, and admin ops, embedded in the binary.

What's inside

Built end-to-end, tested

Leaderless replication

Every node serves reads and writes. Consistent-hash ring, tunable quorums (ONE / QUORUM / ALL), linearizable per-row UPDATEs, read-repair, hinted handoff and anti-entropy.

SQL over documents

Schema-less documents under a declared primary key. Joins, subqueries, CTEs, UNNEST, window functions, views, sequences, generated columns, UNIQUE and FOREIGN KEY constraints, and transactions.

LSM storage engine

Write-ahead log with crash recovery, SSTables with Bloom filters and block checksums, lazy-leveled compaction, group-commit fsync, and one memory target that sizes buffers and caches.

Secondary & global indexes

Composite, multikey, unique and global value-sharded indexes. Index-served ORDER BY, index-only counts, and EXPLAIN to see which index a query uses.

Full-text search

BM25 ranking from SQL with MATCH() and SEARCH(): analyzers, phrase, prefix and fuzzy predicates, highlights, suggestions and facet counts. Includes an Elasticsearch-compatible REST subset.

Vector search

HNSW nearest-neighbor search with filters, quantized indexes, managed embeddings, hybrid ranking with RANK BY RRF, and reranking. Distributed across the cluster.

Geo queries

geo_distance and geo_bbox work anywhere in WHERE or ORDER BY. A geo index prunes them to a neighborhood: on disk, distributed, maintained on writes.

Time-series tables

Gorilla-compressed chunks at 1.0–1.5 bytes/sample on typical fleet metrics, ≥2M samples/s single-node ingest. Retention, rollups, time_bucket() and rate(), PromQL and Prometheus remote_write.

Native MQTT broker

MQTT 3.1.1 and 5.0 over TCP, TLS and WebSocket. Broker state lives in replicated tables, topics have ACLs, and a topic→table sink lands messages as rows.

PostgreSQL wire protocol

psql, psycopg, asyncpg, node-postgres, pgx and the JDBC driver connect as they would to PostgreSQL: SCRAM login, prepared statements, COPY, cursors and cancel. It carries skaidb SQL — the protocol, not the PostgreSQL dialect.

Procedures, jobs and triggers

CREATE PROCEDURE stores a statement list that CALL runs in one round trip. CREATE JOB runs it on an interval or a cron schedule, CREATE TRIGGER when a matching row changes.

Change streams

CREATE STREAM is a standing filter over a table's writes. Matching changes are captured, kept for a retention window you can replay, and published live over MQTT.

Backup and point-in-time recovery

BACKUP TO updates an existing backup incrementally. RESTORE … TO TIMESTAMP replays archived WAL segments on top of one. Witness nodes mirror chosen databases off-site.

Online resharding

Nodes join or leave while the cluster serves traffic. A join moves roughly 1/(N+1) of the keyspace onto the new node; a leave moves about 1/N.

Security built in

SCRAM-SHA-256 logins, RBAC with column-level grants, TLS for clients and between nodes, at-rest encryption, and Kerberos/GSSAPI single sign-on.

Web UI, metrics and advisor

An admin UI embedded in the binary on every node. Prometheus metrics, and Grafana's Prometheus datasource works against a node directly. The advisor turns cluster signals into findings.

New

Recently added

Download

Compiled packages, signed

skaidb ships as compiled packages from the signed repository at repo.dsys.org. Installing via apt keeps upgrades automatic; direct downloads are below. The Android SDK is in the Maven repository at repo.dsys.org/maven; it and the embedded library are also tarballs in the release directory, with signed checksums beside them.

Debian / Ubuntu — amd64

x86-64 servers and desktops.

skaidb_0.354.15_amd64.deb
Debian / Ubuntu — arm64

Raspberry Pi 4/5, ARM servers, Apple-silicon VMs.

skaidb_0.354.15_arm64.deb
Repository & key

Browse all packages, or fetch the GPG signing key.

Browse packages Signing key
Android SDK

In Gradle, add the repository https://repo.dsys.org/maven and depend on org.skaidb:skaidb-android-kotlin:0.354.15. The bundle holds the same artifacts for offline builds, the native libraries with their symbols, and the license of every linked dependency.

Maven repository skaidb-android-0.354.15.tar.gz
Embedded library — C ABI

libskaidb_embedded, static and shared, with its header: include/ and lib/ in one tarball per target.

Linux x86_64 Linux aarch64
Release files & checksums

Every tarball of this release, with SHA256SUMS and its signature, SHA256SUMS.asc.

Browse files SHA256SUMS

Every package installs skaidb + skaidbsh, a systemd unit, and a default config. See the install guide for containers and other platforms, and DOCKER for compose examples. The Android guide has the Gradle lines for the Maven repository, and the embedded guide the link line for C.

Client drivers

Nine official drivers

Each driver mirrors the idiomatic database API of its language and speaks the binary protocol directly, with SCRAM auth, TLS, typed parameters and streaming. Python, Node.js, Go, Java, Rust, Ruby and PHP install with their usual tools (pip, npm, go get, JitPack, cargo, gem, Composer); the .NET package and the C library ship as release files. The drivers page has every guide.

Python Node.js / TypeScript Go Java Rust Ruby PHP C# / .NET C / C++
Search the docs