Resolution

All pages

0004 · Queues and schedules are database-backed job tables

Status: accepted, 2026-09-23. Not yet proven.

Context

Wakes, fetches, model calls and order submissions must be durable and idempotent, and must happen exactly once at the effect (§24). Dead letters must be visible on the Floor. One clock service owns time.

Decision

Jobs live in tables in the Record's database (0001). Workers claim them with row locks. A job's effect and its completion are written in one transaction wherever the effect is local. Where the effect is external, such as a broker order, the job carries an idempotency key (the client order id). A dedicated message broker is added only if a spike shows the need.

Alternatives

  • A message broker. Rejected for now: a second stateful system, and a second source of truth about what ran.
  • A managed workflow platform. Rejected: it becomes a record of what the fund did that lives outside the Record (§28.3).

Consequences

  • One backup covers the jobs and the Record, and they can never disagree.
  • The throughput ceiling is the database's. At this fund's cadence that ceiling is far away.

Falsifier

  • Any double placement, or any lost job, across the 1,000 induced-crash orders of spike 1;
  • job contention adds more than a tenth to the latency of a firm-day in spike 7.

Validated by

Spike 1 (gateway and idempotency) and spike 7 (cost and latency). Measurements: to be written here.