Skip to content
Leader docs0.4

Exposed backend core

Latest stable Based on Leader release 0.4.0

Library module

Defines the shared SQL schema, table mappings, retry policy, history codec, and migrations used by JDBC and R2DBC electors. Applications normally select an adapter instead.

Use it directly when your team owns schema migration or builds a custom SQL adapter.

Artifact: io.github.bluetape4k.leader:bluetape4k-leader-exposed-core

dependencies {
implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>"))
implementation("io.github.bluetape4k.leader:bluetape4k-leader-exposed-core")
}

Lock, group-slot, and history tables share keys and expiry rules. Conditional SQL transactions provide ownership; retry handles transient conflicts.

dependencies {
implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>"))
implementation("io.github.bluetape4k.leader:bluetape4k-leader-exposed-jdbc")
}

ExposedLeaderSchema, table objects, and RetryStrategy are the main support APIs. Adapter initializers are the normal application entry point.

Give schema creation to one deployment step, keep a dedicated namespace, preserve unique keys, and apply migrations before application rollout.

JDBC and R2DBC share these tables and metadata formats; consistent configuration lets both observe the same logical namespace.

Adapters own schema names and retry settings. Database clock, isolation, timeout, and pool sizing remain application responsibilities.

Missing tables and permission errors are deployment failures, not contention. Serialization conflicts may retry; malformed migration state must surface.

Monitor table growth, history retention, dead tuples, and database latency. Never delete a row from application-local time alone.

Run schema tests per dialect and verify JDBC/R2DBC agree on keys, expiry units, and metadata.

Read this before JDBC/R2DBC when migration ownership is separate. The migration-gate example shows election around deployment work.

This is not a complete elector and selects no driver, pool, or transaction manager.

These diagrams are loaded directly from README assets published with the 0.4.0 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.

leader exposed core ERD diagram

Release README: leader-exposed-core/README.md

Schema · Lock table · Stable guide