Start here

Execution primitives

Choose among route, workflow, job, event, and pipeline based on durability and restart needs.

Choose the smallest primitive that matches the work. This keeps request code simple and makes durable work visible to operators.

PrimitiveUse it forState boundary
RouteValidate HTTP input, call application logic, shape a responseone request
WorkflowA short, in-process saga with compensating stepsmemory only
Local eventIn-process notification with zero or more listenersmemory only
JobOne deferred, retryable unit of workPostgreSQL job run
Durable eventA fact delivered independently to named consumersPostgreSQL event and deliveries
PipelineA restart-safe process with waits, branches, or several durable stagesPostgreSQL graph state

Durable workers use at-least-once delivery. A retry can execute handler code again, so database effects and external provider calls need stable idempotency keys.

Flow sketch

HTTP request
  -> route
  -> local workflow (optional)
  -> module service + transaction
  -> PostgreSQL

If the request commits domain data and starts durable work, pass the active transaction executor to the durable API. The domain row and durable record then commit or roll back together.

Next, learn where PostgreSQL, Redis, and process roles fit around these primitives.