Glossary

For everyone. Each term in one sentence, with a link to where it is explained in full.

Archive. Where a closed flow moves about a minute after it closes, readable by its key and listed by ListClosed until the retention drops it. Driving Flows

Baggage. Context your application attaches to a flow, such as the acting user, that every task can read but no task can change. Writing Tasks

Branch. One parallel path of a fan-out. Fan-Out & Subgraphs

Claim. A worker taking ownership of a pending step before running it, in a single database statement so no two workers hold the same step. How Dwarf Works

Closed flow. A flow that has completed, failed, been terminated or been cancelled, and so never changes again. Concepts

Continue. Starting a new flow from a completed one, carrying its final state forward, as in the next turn of a conversation. Driving Flows

Dispatcher. A replica chosen to run a given shard’s steps, so the shard’s connection budget is shared rather than multiplied by the fleet. Deployment

Engine. The Dwarf library inside your process: it decides which step runs next, calls your host, and records outcomes. How Dwarf Works

Fairness key. A label on a flow, typically the tenant, that the scheduler uses to share workers fairly between tenants at the same priority. Scheduling

Fan-in. The task where the branches of a fan-out converge, with their writes combined by reducers. Fan-Out & Subgraphs

Fan-out. Running several branches in parallel: a fixed set (fanOut) or one per item of an array (forEach). Building Graphs

Flow. One execution of a graph, with its own state and lifecycle. Concepts

Flow expiration. An optional engine-wide age, set with SetFlowExpiration, past which a flow still running or interrupted is terminated. Driving Flows

Flow key. The unique identifier of a flow, in the form {shard}-{hour}-{flowID}-{token}, which you pass to every operation on it. Concepts

Fork. Starting a new flow from a chosen step of a flow that has ended, for example to recover from a failure by re-running from the last good step. Driving Flows

Graph. The definition of a workflow: its tasks and the transitions between them. Concepts

Host. The code you write to connect the engine to your world: LoadGraph returns a graph, and ExecuteTask runs a task. How Dwarf Works

Interrupt. A task pausing its flow to wait for outside input, such as a person’s approval, until your application calls Resume. Writing Tasks

Lease. The time limit on a claim (the task’s time budget plus 30 seconds), after which a crashed worker’s step is handed to another replica. How Dwarf Works

Open flow. A flow that is running or interrupted, as ListOpen lists them. Concepts

Park. A flow waiting on an Interrupt or a subgraph without holding a worker. How Dwarf Works

Priority. A number on a flow, 1 to 5 by default; lower numbers run first, and a worse priority gets the workers a better one leaves unused. Scheduling

Reducer. The rule for combining writes to a state field: append, add, union and others. On a reduced field, each write is a contribution, combined with what the field already holds. Concepts

Replica. One running copy of your application, with its own engine; replicas coordinate only through the shard databases. How Dwarf Works

Retention. How many days the archive keeps closed flows before dropping each day’s as a whole: 30 by default, set with SetRetention. Driving Flows

Shard. One SQL database holding a share of the flows. Deployment

State. The JSON data a flow carries from task to task. Concepts

Step. One task execution within a flow, with its input and output recorded. Concepts

Step key. A step’s unique identifier, in the form {shard}-{hour}-{flowID}-{stepID}-{token}, the same on every attempt, which makes it a natural idempotency key. Writing Tasks

Subgraph. A workflow run as a child of a task, like a function call. Fan-Out & Subgraphs

Task. A named unit of work in a graph, reached by its URL through your host. Concepts

Time budget. How long one task may run before its context is cancelled; set engine-wide or per flow. Scheduling

Transition. An edge in a graph from one task to the next, possibly conditional. Building Graphs

Worker. A goroutine in the engine that claims a step, calls your host, and records the result. How Dwarf Works

Workflow URL. The key your LoadGraph resolves to a graph; you pass it to Create and Run. Getting Started

Next: FAQ.