Skip to content

One standard for background jobs. Every language. Every backend.

Open Job Spec (OJS) defines a vendor-neutral envelope format, 8-state lifecycle, and protocol bindings for background job processing. Write jobs in any language, run them on any backend.

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 job
import { 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 job
worker := 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())

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.


Go

go get github.com/openjobspec/ojs-go-sdk

Full client + worker, middleware, workflows

GitHub →

JavaScript / TypeScript

pnpm add @openjobspec/sdk

ESM, vitest tested, full type definitions

GitHub →

Python

pip install openjobspec

asyncio, mypy strict, Python 3.11+

GitHub →

Java

Maven: com.openjobspec:ojs-sdk

Java 21 records, zero required dependencies

GitHub →

Rust

cargo add openjobspec

tokio async, serde, full type safety

GitHub →

Ruby

gem 'openjobspec'

stdlib only, Ruby 3.2+

GitHub →


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.