Systems programming

jobq, durable job queue

Year
2026
Role
Solo
Status
Built from scratch, standard library only
GoWrite-Ahead LogProperty-Based Testing
µs
Per-op under 16 producers
5/5
Crash rounds survived
Jobs lost or resurrected

What it is

A durable, single-node job queue written from scratch in Go using only the standard library, the systems-programming piece, built to be explained rather than just to run. At-least-once delivery, leases with lazy expiry, retries with per-job attempt budgets, delayed jobs, and dead-letter queues.

Proving durability

  • A segmented, CRC-checked write-ahead log with group commit: actors hand encoded records to a single committer, so sixteen producers share one fsync instead of paying for sixteen, cutting per-operation cost from 550µs sequential to 65µs under load.
  • A crash harness kills the process cold, mid-write, at a random moment, across 5 rounds. Result: zero acknowledged jobs lost, zero resurrected, duplicates counted and permitted under the at-least-once contract.
  • Two invariants verified under the race detector: conservation (every job accounted for in exactly one state across thousands of randomized interleavings) and unique settlement (exactly one lease Ack ever succeeds per job).

Why it matters

An actor-per-topic design, one goroutine per topic, no global mutex, means unrelated topics never contend and lease expiry is never a race. Everything is measured, not asserted: the README’s benchmark table is regenerated from the same harness a reader can run themselves.