One standard for background jobs. Every language. Every backend.
Enqueue in JavaScript, process in Go
Section titled “Enqueue in JavaScript, process in Go”OJS jobs are plain JSON. Any language can produce them, any language can consume them. The server handles retry logic, scheduling, and state management so your clients stay thin.
// JavaScript: enqueue a jobimport { OJSClient } from '@openjobspec/sdk';
const client = new OJSClient({ url: 'http://localhost:8080' });await client.enqueue('email.send', ['user@example.com', 'welcome']);// Go: process the same jobworker := ojs.NewWorker(ojs.WorkerConfig{ URL: "http://localhost:8080", Queues: []string{"default"},})
worker.Handle("email.send", func(ctx ojs.JobContext) error { to := ctx.Args[0].(string) template := ctx.Args[1].(string) return sendEmail(to, template)})
worker.Start(context.Background())Why OJS?
Section titled “Why OJS?”Backend-agnostic
Write your job logic once, run it on Redis, PostgreSQL, or any conforming backend. Switch backends without changing application code.
Language-agnostic
A Python service can enqueue a job that a Go worker processes. Six official SDKs cover the most popular languages, and the spec is simple enough to implement in a weekend.
Battle-tested design
OJS synthesizes the best ideas from Sidekiq, Faktory, Oban, BullMQ, Celery, and Temporal. Every design choice is documented with rationale and prior art.
SDKs for every language
Section titled “SDKs for every language”JavaScript / TypeScript
pnpm add @openjobspec/sdk ESM, vitest tested, full type definitions
Choose your backend
Section titled “Choose your backend”Both official backends support all five conformance levels and are production-ready.
| Feature | Redis Backend | PostgreSQL Backend |
|---|---|---|
| Storage Engine | Redis 7.0+ | PostgreSQL 15+ |
| Atomicity | Lua scripts | SQL transactions |
| Dequeue Strategy | ZPOPMIN / sorted sets | SELECT FOR UPDATE SKIP LOCKED |
| Persistence | RDB + AOF (configurable) | WAL (always durable) |
| Horizontal Scaling | Redis Cluster | Read replicas, Citus |
| Real-time Notifications | Pub/Sub | LISTEN/NOTIFY |
| Conformance Level | Level 4 | Level 4 |
| Best For | High throughput, low latency | Durability, existing Postgres infra |
Get running in 5 minutes
One Docker Compose command, one SDK install, and you have a working job system.