Skip to content

Glossary

TermDefinition
BackendThe persistent storage layer (e.g., PostgreSQL, Redis) that durably stores job envelopes, state, and queue metadata.
ClientA component that creates and enqueues jobs into a queue by constructing job envelopes and submitting them to a backend.
HandlerA user-defined function that performs the actual work for a job. Each job type is associated with exactly one handler.
JobA discrete unit of work described by a job envelope, carrying a type identifier, arguments, and metadata.
Job EnvelopeThe complete data structure representing a job, including required attributes (type, arguments, state) and optional attributes (priority, queue, tags, metadata).
MiddlewareA composable component that wraps handler execution or job enqueueing to add cross-cutting behavior such as logging or telemetry.
QueueA named, logical channel through which jobs flow from clients to workers, providing ordering guarantees and isolation.
Spec VersionThe OJS specification version to which a job envelope or implementation conforms.
State TransitionA change from one lifecycle state to another. State transitions MUST be atomic and follow the valid transition graph.
Terminal StateA lifecycle state from which no further transitions are permitted: completed, cancelled, or discarded.
WorkerA process that polls queues, claims available jobs, and dispatches them to the appropriate handler for execution.
StateDefinition
scheduledThe job has a future execution time and is not yet eligible for processing. Transitions to available when its scheduled time arrives.
availableThe job is eligible to be claimed by a worker and resides in the queue awaiting pickup.
pendingThe job is accepted but awaits preconditions (e.g., dependency resolution) before becoming available.
activeThe job has been claimed by a worker and is currently being executed.
completedThe handler finished successfully. Terminal state.
retryableThe job failed but is eligible for automatic retry. It will transition back to available or scheduled after the backoff elapses.
cancelledThe job was explicitly cancelled before completion. Terminal state.
discardedThe job has exhausted all retries or been permanently rejected. Terminal state. May be moved to a dead letter queue.
TermDefinition
Automatic ReplayProgrammatic re-enqueuing of dead-lettered jobs in response to a fix or configuration change, without manual per-job action.
Dead Letter JobA job moved to a dead letter queue after exhausting all retry attempts or being explicitly discarded.
Dead Letter Queue (DLQ)A special-purpose queue that receives permanently failed jobs for inspection, debugging, and potential re-processing.
Manual RetryAn operator-initiated action that re-enqueues a specific failed or dead-lettered job, typically via an admin API.
PruningRemoving expired or obsolete jobs from a DLQ or backend storage based on retention policy rules (age or count thresholds).
Retention PolicyConfiguration governing how long dead-lettered or completed jobs are preserved before becoming eligible for pruning.
Retry PolicyRules determining how and when a failed job is retried, including max attempts, backoff strategy, and jitter.
TermDefinition
Cron ExpressionA string defining a recurring schedule using standard cron syntax, used to create periodic jobs at specified intervals.
Drain PhaseThe second shutdown phase where the worker stops accepting new jobs and waits for active jobs to complete within the grace period.
Force-StopThe action taken when the grace period expires: the worker terminates remaining work and releases held jobs back to the queue.
Grace PeriodMaximum duration a worker waits during shutdown for active jobs to complete before force-stopping.
Graceful ShutdownA controlled process where a worker stops accepting new work and allows in-flight jobs to complete before terminating.
Overlap PolicyA rule governing behavior when a cron-scheduled job is due while a previous instance is still active (e.g., skip, enqueue, cancel-previous).
PID 1 ProblemA container deployment concern where the worker runs as PID 1 and may not receive POSIX signals correctly, interfering with graceful shutdown.
Quiet PhaseThe first shutdown phase where the worker signals it will stop polling but continues executing already-claimed work.
TermDefinition
HeartbeatA periodic signal from a worker to the backend indicating it is alive and processing a claimed job. Missed heartbeats may trigger visibility timeout expiration.
ReservationThe act of claiming a job from a queue for exclusive processing, granting the worker a visibility timeout window.
Visibility TimeoutMaximum duration a job may remain active without heartbeat renewal before the backend makes it available for re-processing.
TermDefinition
Batch (workflow)A pattern that enqueues independent jobs as a named group, enabling collective monitoring and completion callbacks.
CallbackA job or function invoked when a workflow step or group reaches a specified state, triggering downstream processing.
Chain (workflow)A pattern where jobs execute sequentially, each starting only after its predecessor completes. Failures halt the chain unless an error strategy is defined.
Fan-inA synchronization point where multiple parallel jobs must complete before a single downstream job begins.
Fan-outA pattern spawning multiple parallel jobs from a single parent; results may be aggregated at a fan-in point.
Group (workflow)A pattern executing multiple jobs in parallel, optionally with a concurrency limit, completing when all members reach a terminal state.
TermDefinition
CardinalityThe number of distinct values a metric label or span attribute can take. High cardinality should be avoided.
Semantic ConventionsStandardized attribute names and values for spans and metrics, aligned with OpenTelemetry, ensuring interoperable telemetry.
SpanA named, timed operation within a trace representing a unit of work (e.g., enqueue, handler execution, retry attempt).
Span LinkAn association between causally related spans that lack a direct parent-child relationship, such as linking execution to enqueue.
Trace ContextPropagated metadata (trace ID, span ID, trace flags) connecting distributed spans into a logical trace. Implementations should propagate W3C Trace Context through job metadata.
TermDefinition
BackpressureA flow-control mechanism where downstream components signal upstream to slow down when queues approach their configured bounds.
Backpressure ActionThe behavior taken when a queue reaches its bound (e.g., reject, block, or drop lowest-priority jobs).
Bounded QueueA queue with a configured maximum capacity that applies its backpressure action when the bound is reached.
Concurrency LimitMaximum number of jobs executing simultaneously, scoped to a queue, worker, or global level.
HeadroomRemaining capacity in a bounded queue (bound minus current depth), used to determine when backpressure applies.
PartitionA logical subdivision within a rate limit scope enabling independent rate tracking (e.g., per-customer limits in a shared queue).
Queue BoundThe configured maximum number of jobs a bounded queue may hold before triggering backpressure.
Queue DepthThe current number of jobs in a queue across all non-terminal states, used as the primary backpressure metric.
Rate LimitA constraint on jobs processed or enqueued within a time window, expressed as count per window duration.
Rate Limit KeyA string identifier grouping jobs that share the same rate limit counter.
ScopeThe boundary within which a rate or concurrency limit applies (e.g., per-queue, per-worker, per-key, global).
ThrottleDeliberately slowing job processing to stay within a rate limit; throttled jobs are delayed rather than rejected.
WindowA fixed or sliding time interval used to measure rate limit consumption (e.g., 100 jobs per 60-second window).
TermDefinition
FairnessA scheduling property ensuring each tenant receives equitable processing capacity, preventing monopolization.
NamespaceA logical grouping that isolates jobs, queues, and configuration for different tenants or environments within a shared backend.
Noisy NeighborA condition where one tenant’s workload degrades performance for others due to shared resource contention.
Sharded QueueA queue distributing jobs across multiple physical partitions to improve throughput and enable tenant-level isolation.
StarvationA condition where a tenant’s jobs are perpetually delayed because other tenants consume all available worker capacity.
TenantAn organizational entity (e.g., customer, team) that owns jobs and queues within a shared OJS deployment.
Tenant IDA unique identifier for a tenant, propagated through job metadata for routing, rate limiting, and access control.
TermDefinition
CiphertextThe encrypted form of job payload data, opaque to the backend and decodable only by a codec with the appropriate key.
CodecA component that encodes and decodes job payloads, performing serialization, compression, encryption, or other transformations.
Codec ChainAn ordered sequence of codecs applied during encoding (and reversed during decoding), e.g., JSON → gzip → AES-256.
Codec ServerA standalone service performing codec operations on behalf of clients or workers, enabling centralized key management.
Compression CodecA codec that reduces payload size (e.g., gzip, zstd), typically applied before encryption in a codec chain.
Encryption CodecA codec that encrypts job payloads to protect data at rest and in transit. Must support key rotation and should use authenticated encryption.
Payload CodecThe primary codec for serializing and deserializing job arguments between in-memory and stored byte formats.
PlaintextThe unencrypted, human-readable form of job payload data.
TermDefinition
Framework AdapterA library-specific integration layer bridging an OJS backend with a host framework (e.g., Rails, Django, Spring), handling lifecycle hooks and idiomatic APIs.
Outbox PatternA reliability pattern where jobs are written to an outbox table in the same transaction as the business operation, then relayed to the queue asynchronously.
Request ContextThe ambient context (e.g., HTTP request, current user) available at enqueue time. Adapters may capture and propagate it into job metadata.
Transactional EnqueueEnqueuing a job within the same database transaction as a business operation, ensuring the job exists if and only if the transaction commits.
TermDefinition
Canary DeploymentA strategy where a new worker version is rolled out to a small subset first, allowing validation before full rollout.
Compatible WorkerA worker that declares support for a specific job version or version range and can correctly process those jobs.
Job VersionA numeric or semantic identifier indicating the schema and behavior contract of a job type’s arguments and handler.
Rolling DeploymentA strategy where new worker versions are gradually introduced while old versions continue processing, enabling zero-downtime upgrades.
Schema EvolutionChanging a job’s argument structure over time while maintaining compatibility with existing jobs and workers.
Schema VersionA version identifier for a job’s argument structure, distinct from the job version, enabling independent payload evolution.
Version RangeA semver-compatible expression declaring which job versions a worker accepts, used for routing jobs to compatible workers.
TermDefinition
Assertion HelperA test utility that simplifies verification of job enqueueing, execution results, and state transitions.
Drain (testing)A test operation that synchronously processes all enqueued jobs until the queue is empty, ensuring deterministic execution.
Fake ModeA testing mode that captures enqueued jobs in memory without executing them, useful for verifying enqueue behavior.
Inline ModeA testing mode that executes handlers synchronously at the point of enqueue, providing immediate feedback.
Real ModeA testing mode using actual backend infrastructure for full end-to-end integration testing.
Test ContextAn isolated testing environment with its own queue, backend state, and configuration to prevent cross-test pollution.
TermDefinition
Chain ManagementThe API and rules for registering, ordering, inserting, and removing middleware within a chain (prepend, append, insert-before, insert-after).
Enqueue MiddlewareMiddleware executing during the enqueue path before persistence, used for validation, enrichment, or deduplication.
Execution MiddlewareMiddleware wrapping handler execution for concerns such as error handling, logging, and transaction management.
Middleware ChainAn ordered list of middleware components forming a pipeline through which a job passes during enqueue or execution.
Yield/NextThe mechanism by which middleware delegates to the next component in the chain. Middleware must call yield/next exactly once to continue, or skip it to short-circuit.
TermDefinition
Admin EndpointAn HTTP or gRPC endpoint exposing administrative operations such as queue inspection, job cancellation, and worker management.
Bulk OperationAn administrative action applied to multiple jobs or queues simultaneously (e.g., bulk cancel, bulk retry, bulk discard).
Control PlaneAPIs and interfaces for managing and configuring the job processing system, distinct from the data plane.
Data PlaneThe runtime path through which jobs are enqueued, dispatched, and executed, prioritizing throughput and low latency.
Queue ConfigurationParameters defining queue behavior: concurrency limits, rate limits, priority, retry policy, and backpressure settings.
Stale WorkerAn unresponsive worker whose claimed jobs have not been released. Stale worker detection enables job recovery.
TermDefinition
Capability NegotiationThe process by which a client or worker discovers extensions supported by a backend, enabling graceful degradation.
Conformance LevelA classification indicating how fully an implementation satisfies a specification tier (e.g., “Core-conformant”).
DeprecationFormally marking an extension as obsolete. Deprecated extensions remain functional for a defined period but should not be used in new implementations.
ExtensionA self-contained, optional specification module adding functionality beyond the core OJS spec, following a defined lifecycle.
Extension IdentifierA unique URI or URN identifying an extension (e.g., urn:ojs:spec:retry), used in capability negotiation and conformance declarations.
PromotionAdvancing an extension from one tier to a higher tier (e.g., experimental → stable) based on maturity and community consensus.
TierA classification level indicating extension maturity and stability (e.g., Core, Stable, Experimental, Deprecated).
TermDefinition
Batch EncodingA wire format convention for encoding multiple job envelopes in a single message, enabling efficient bulk submission.
Content TypeA media type (e.g., application/json) declaring the serialization format of a job envelope on the wire.
Protocol BindingA specification mapping OJS operations onto a transport protocol (HTTP or gRPC), defining endpoints, methods, headers, and error codes.
Wire FormatThe byte-level representation of a job envelope during transmission. OJS defines a canonical JSON format and permits alternatives via content type negotiation.