skylite

module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: Apache-2.0

README

skylite

CI Docs

A SQL database server where object storage is the source of truth.

skylite runs SQLite behind an HTTPS API and keeps all durable state in object storage: Azure Blob Storage (the primary backend), Amazon S3, Google Cloud Storage, or a local directory for trials. A server needs no persistent volume. Applications connect with a Go database/sql driver (works with GORM) or a JDBC driver with a Hibernate dialect (works with Spring Data JPA), and authenticate with OIDC JWT bearer tokens.

Documentation: https://randomcodespace.github.io/skylite/

Is it for you

skylite fits services that want a small relational database without running a stateful database tier, and that accept:

  • Writes wait for object storage. A commit is acknowledged only after it is uploaded. Measured once against a real Azure account: one writer about 53 commits/s with a median of 17 ms; 4 to 64 writers about 63 to 67 commits/s in total. These are observations of one setup, not guarantees.
  • One writer per database. Each database has one leader; other servers answer reads and take over when it stops.
  • SQLite's SQL dialect.

Status: beta (v0.0.3)

Tested on every pull request: the server (reads, writes, transactions, read-only transactions, batches, resolve, leader election and failover, follower reads, forwarding between servers), the Go driver through a GORM acceptance suite, and the JDBC driver and Hibernate dialect through a Spring Data JPA acceptance suite, against a real server. The storage backends are tested against emulators (Azurite, RustFS, fake-gcs-server).

Run by hand against a real Azure storage account: the Azure backend's integration and conformance tests, the GORM acceptance suite, and a failover soak of three servers on one machine (SIGTERM, SIGKILL and SIGSTOP of the leader) that lost no acknowledged write.

Not verified yet: Amazon S3 and Google Cloud Storage themselves (emulators only), a Kubernetes cluster, a service mesh or ingress, a real Entra ID tenant as token issuer, driver failover across several pods, and a 24-hour soak.

Releases are signed binaries; there is no container image or Helm chart, and none is planned. Maven artifacts are not published (build the Java driver with mvn install). See the roadmap.

Quick start

Download a release for Linux or macOS, verify it and run it:

VERSION=0.0.3
gh release download "v$VERSION" -R RandomCodeSpace/skylite \
  -p "skylite_${VERSION}_linux_amd64.tar.gz" -p 'SHA256SUMS*'
sha256sum --ignore-missing -c SHA256SUMS
tar -xzf "skylite_${VERSION}_linux_amd64.tar.gz"
./skylite version

Or install with Go 1.26 or later:

go install github.com/RandomCodeSpace/skylite/cmd/skylite@v0.0.3

The quick start checks the release signature, runs a server on a local directory and connects to it from Go and from Java.

Documentation

Directories

Path Synopsis
cmd
skylite command
Command skylite is the skylite server binary.
Command skylite is the skylite server binary.
Package skylite is the Go database/sql driver for skylite, speaking the client protocol of ADR 0005 (docs/content/docs/decisions/0005-client-protocol.md) over HTTPS, with bearer tokens as ADR 0006 requires.
Package skylite is the Go database/sql driver for skylite, speaking the client protocol of ADR 0005 (docs/content/docs/decisions/0005-client-protocol.md) over HTTPS, with bearer tokens as ADR 0006 requires.
internal
auth
Package auth authenticates requests to the query endpoint with OIDC JWT bearer tokens and authorises them by role, as decided in docs/content/docs/decisions/0006-authentication.md.
Package auth authenticates requests to the query endpoint with OIDC JWT bearer tokens and authorises them by role, as decided in docs/content/docs/decisions/0006-authentication.md.
engine
Package engine is skylite's storage engine: it keeps a database in object storage as decision record 0004 (docs/content/docs/decisions/0004-storage-engine.md) lays it out, in the objects package format encodes.
Package engine is skylite's storage engine: it keeps a database in object storage as decision record 0004 (docs/content/docs/decisions/0004-storage-engine.md) lays it out, in the objects package format encodes.
format
Package format defines the objects that make up one database in object storage: the commit log, the base, the manifest and the lease.
Package format defines the objects that make up one database in object storage: the commit log, the base, the manifest and the lease.
office
Package office takes and keeps office for one database on this node: it runs candidacies until one succeeds, serves the database through an engine.Leader while the node holds office, and leaves office when the leader stops, the node is deposed or the caller shuts it down.
Package office takes and keeps office for one database on this node: it runs candidacies until one succeeds, serves the database through an engine.Leader while the node holds office, and leaves office when the leader stops, the node is deposed or the caller shuts it down.
server
Package server is skylite's HTTPS server: the client protocol of ADR 0005 (docs/content/docs/decisions/0005-client-protocol.md) with the authentication of ADR 0006.
Package server is skylite's HTTPS server: the client protocol of ADR 0005 (docs/content/docs/decisions/0005-client-protocol.md) with the authentication of ADR 0006.
spike/durability
Package durability is a spike to validate the durability design: Litestream embedded as a library, replicating to Azure Blob Storage through a ReplicaClient that fences stale leaders with conditional writes.
Package durability is a spike to validate the durability design: Litestream embedded as a library, replicating to Azure Blob Storage through a ReplicaClient that fences stale leaders with conditional writes.
sqlpolicy
Package sqlpolicy restricts the SQL that clients may run on a SQLite connection.
Package sqlpolicy restricts the SQL that clients may run on a SQLite connection.
storage
Package storage defines the object storage interface that every skylite storage backend implements, the errors it returns and the key rules it enforces.
Package storage defines the object storage interface that every skylite storage backend implements, the errors it returns and the key rules it enforces.
storage/azureblob
Package azureblob is a storage.Store on one container of Azure Blob Storage with a flat namespace: every object is a block blob named by its key.
Package azureblob is a storage.Store on one container of Azure Blob Storage with a flat namespace: every object is a block blob named by its key.
storage/gcs
Package gcs is a storage.Store on a Google Cloud Storage bucket, through the JSON API and the official client, cloud.google.com/go/storage.
Package gcs is a storage.Store on a Google Cloud Storage bucket, through the JSON API and the official client, cloud.google.com/go/storage.
storage/localfs
Package localfs is a storage.Store on a local directory.
Package localfs is a storage.Store on a local directory.
storage/s3
Package s3 is a storage.Store on Amazon S3 and S3-compatible object stores.
Package s3 is a storage.Store on Amazon S3 and S3-compatible object stores.
storage/storagetest
Package storagetest is the portable part of the conformance suite for storage.Store backends.
Package storagetest is the portable part of the conformance suite for storage.Store backends.
wire
Package wire encodes and decodes the client protocol of ADR 0005 (docs/content/docs/decisions/0005-client-protocol.md): request paths and bodies, SQL values, response frames, done fields, the limits object and errors.
Package wire encodes and decodes the client protocol of ADR 0005 (docs/content/docs/decisions/0005-client-protocol.md): request paths and bodies, SQL values, response frames, done fields, the limits object and errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL