Skip to content

Architecture Decision Records

Architecture Decision Records (ADRs) document significant design decisions made during the development of the Open Job Spec. Each ADR captures the context, decision, and consequences of a choice that shapes the specification.

ADRs are maintained in the spec/adrs/ directory.

ADRTitleSummary
001Three-Layer ArchitectureCore envelope (Layer 1) → Wire formats (Layer 2) → Protocol bindings (Layer 3), inspired by CloudEvents
002Eight-State Job Lifecyclescheduled → available → pending → active → completed/retryable/cancelled/discarded
003Args (Array) Over Payload (Object)Using args (JSON array) instead of payload (JSON object) for job arguments
004UUIDv7 for Job IDsTime-sortable UUIDs for natural chronological ordering and distributed generation
005Backend Interface DesignThree-layer internal architecture (API → Core → Storage) for all backends
006Conformance Level HierarchyFive levels (0–4) as progressive supersets, inspired by Unicode conformance
007Client-Side Encryption ArchitectureCodec-based encryption at the SDK layer, keeping backends zero-knowledge
008Multi-Tenancy Isolation ModelsThree models (namespace, shared, hybrid) with hybrid sharded queues recommended
009Transactional Enqueue PatternOutbox pattern for ensuring jobs are only enqueued when the transaction commits
010Deduplication StrategySHA-256 hash of canonical JSON for unique key computation
011OpenTelemetry-Native ObservabilityNative OpenTelemetry integration for traces, metrics, and logs
012Control Plane / Data Plane SeparationSeparate admin API path prefix (/ojs/v1/admin/) from data-plane operations
013NATS JetStream Backend ArchitectureJetStream streams + KV stores for a lightweight single-binary backend
014Kafka Hybrid Backend ArchitectureKafka for transport + Redis for state in a hybrid architecture
015SQS + DynamoDB Backend ArchitectureAWS-native backend using SQS for transport and DynamoDB for state

Each ADR follows a standard structure:

  1. Status — Proposed, Accepted, Deprecated, or Superseded
  2. Context — The situation and forces driving the decision
  3. Decision — What was decided and why
  4. Consequences — Positive and negative outcomes of the decision
  5. Alternatives Considered — Other options that were evaluated

New ADRs follow the RFC process. To propose an architecture decision:

  1. Create a new ADR file following the template in spec/adrs/README.md
  2. Submit a pull request with the proposal
  3. Discuss in the PR and gather feedback
  4. ADR is accepted when consensus is reached

See the RFC Process for the full contribution workflow.