Developer track · 2026-11
Tiny Job Queue: A SQLite-Backed Task Runner Library
Advanced0 enrolled · 0 submitted
Want in? Run /enroll in Discord to claim this tier before the build window closes.
The brief
Build a small library that lets a program enqueue background jobs into SQLite and process them with one or more local workers.
This is a deeper design challenge but still bounded.
MVP outcomes:
enqueue(name, payload)andworker.run()APIs, with jobs stored in a single SQLite file.- Safe job claiming so two workers on the same machine never run the same job (e.g. atomic update with a lease or visibility timeout).
- Retries with simple backoff and a dead-letter state after N failures.
- A demo script that enqueues 50 fake jobs (some that fail on purpose) and shows the results.
Out of scope: distributed deployment, web dashboards, Redis or cloud queues, exactly-once guarantees. Document your delivery semantics honestly (at-least-once is perfectly fine).
Deliverables
- Library source in a public repo with a clear, small public API
- A demo script plus its captured output showing retries and a dead-lettered job
- A test that runs two workers concurrently and asserts no job runs twice
- A short DESIGN.md (one page) covering the claim strategy, failure handling, and known limitations
Resources
- SQLite docs on transactions and
BEGIN IMMEDIATE - SQLite
UPDATE ... RETURNING(SQLite 3.35+) for atomic claims - Your language's standard SQLite bindings
- Blog posts on the transactional outbox and database-backed job queue patterns (search and skim, no deep research needed)