Design an Airflow/Temporal-style engine for durable workflows: DAGs, retries, timers, human tasks, and visibility. Work must survive process crashes and cluster failover without duplicate side effects.
Functional requirements
- Define workflows with steps, branches, and parallel fan-out
- Durable timers, sleeps, and cron-like schedules
- Activity retries with backoff, sagas, and compensation
- Human approval tasks with SLA escalations
- Query workflow state and signal external events
Non-functional requirements
- Horizontal scale of workers and deciders
- At-least-once activity delivery with idempotent implementations
- Strong persistence of workflow history for replay
- Multi-tenant fairness and noisy-neighbor isolation