Skip to content

Architecture Introduction and Goals

Mohammad Rasoul Kazemi edited this page Nov 30, 2026 · 7 revisions

Architecture Introduction and Goals

Chapter 1 of the arc42 structure (Architecture). It states what the system is for, the requirements that drive the design, the quality goals and who cares about them.

Requirements overview

KingresDB is a database derived from PostgreSQL. The first release, 0.1.0, was published on 2026-11-28; it contains every phase of the roadmap except phase 8 (decided 2026-11-15; in design since 2026-11-28, not built), and every one of them is built. Phase 15 (third-party extension management) is designed and comes after 0.1.0. The capabilities, with the state of each, are in Product Overview and Features and Status and Roadmap. The drivers of the design:

Requirement Realised by State
Spread tables over several servers, with correct statements on a multi-group cluster kingres_shard: fixed hash buckets, shard groups, two-phase commit, a complete row-moving scan plus faster pushdown paths Phases 1, 2, 2b, 9 (table lifecycle) and 11 (distributed schemas) done
Move data and survive a server loss Bucket movement, rebalance, bucket split and drain (phases 4 and 10); standbys, failover and switchover, also of the map group (phase 5) Done. Failover is new in this release: test your recovery procedure on your own cluster
Detect tampering with history kingres_ledger (hash chain and Merkle blocks), signing, publication and anchoring in kingresd, the standalone verifier Phase 6 done; phase 7 done except an external signer command, publication mirrors and the anchor probe from another server, which are not in the first release
Run and operate the cluster without editing files on each server kingresd with a REST API and a web console on every node; PostgreSQL parameters from the console Phases 3 and 13 done; table and database export and import (phase 14) done
Analytics on large data kingres_sketch, kingres_timepart, kingres_columnar Phase 12 done
Install it as one product One package or image per PostgreSQL major A Debian package and a container image per major, amd64 (RPM packages since 0.2.0)

The first-release scope and the order of work are in architecture.md, section "Scope of the first release, and phase 8".

Quality goals

The documents do not contain a single list called "quality goals". The following are the goals that the design documents and ADRs state again and again; each names where it is stated.

Goal What it means in this project Where stated
Correctness before speed Every statement is correct on a cluster with several shard groups; the complete scan stays in every version and faster paths only add to it ADR 0022
Maintainability of the fork A small set of core patches, logic in extensions, one source for two PostgreSQL majors ADR 0001, ADR 0023
Tamper evidence that does not trust the operator Keys and credentials outside PostgreSQL; the verifier trusts what the auditor pinned, not what the server says ledger-phase7.md, section 2.1
Nothing on the commit path A transaction never waits for a signature, a publication or an anchor ledger-phase7.md, section 2.1
Works offline With no anchor target, no publication listener and no network the cluster runs, builds blocks and signs checkpoints ledger-phase7.md, section 2.1
Safe operation of the cluster Servers trust each other by certificates; failover is fenced by leases; a fenced task cannot act after it lost its term Security Model, High Availability
Verified by independent review Built parts are reviewed by independent reviews; the reports are kept in kingres/docs/reviews, and a fix comes with a test that fails without it Review Process, kingres/README.md
Honest limits The limits of the first release are stated, never hidden Limitations and Known Issues

How each goal is tested is on Architecture Quality Requirements.

Stakeholders

Stakeholder Expectation Where served
Database administrator Create and run a cluster from the console or the REST API; rebalance; fail over; configure; back up Administrator Guide, Operations
Application developer Distributed and reference tables, correct SQL on several groups, analytics functions User Guide
Auditor Check the ledger without trusting the database The Verifier, Ledger
Security officer Understand who can do what, what is encrypted, where secrets live Security Model, Data Security
Contributor and reviewer Build, test, review and synchronise two branches Development and Testing, Contributing, Review Process
Project owner Scope of the first release (every phase except 8), the licence, tags only for releases Architecture Constraints

Sources

Clone this wiki locally