Durable workflow orchestration for Convex with external worker execution, enabling long-running processes and fault-tolerant step execution.
npm install @akshatgiri/convex-orchestratorDurable workflow orchestration on Convex where step execution happens on your machines (workers pull work from Convex), inspired by Temporal’s worker model.
convex-orchestrator enables durable workflows where each step can run on external workers that pull tasks from Convex. This allows workflows to survive server restarts and handle steps that take minutes or hours to complete, unlike standard Convex functions which have execution time limits.
The component implements a Temporal-inspired worker model where your workflow logic runs in Convex but actual step execution happens on separate worker machines. Workers poll Convex for tasks, execute them, and report results back, enabling distributed processing while maintaining workflow state.
convex-orchestrator persists workflow state in Convex and coordinates task execution across distributed workers. If a worker fails or restarts, tasks are automatically retried by other workers, ensuring reliable completion of multi-step processes.
convex-orchestrator tracks task execution state in Convex and implements automatic retry logic. If a worker fails to complete a task within the configured timeout, the orchestrator marks the task as available for retry and another worker can pick it up. This ensures fault tolerance without losing workflow progress.
Regular Convex functions have execution time limits and run on Convex servers. convex-orchestrator enables long-running workflows where the coordination happens in Convex but actual work executes on your own machines. This allows for computationally intensive or time-consuming operations that wouldn't fit within Convex function constraints.
Yes, convex-orchestrator decouples workflow coordination from execution. You can run multiple worker processes on different machines that all poll the same Convex database for tasks. This allows you to scale processing capacity up or down based on workload without affecting the workflow orchestration logic.
convex-orchestrator is inspired by Temporal's worker model but uses Convex as the coordination layer instead of requiring a separate Temporal server. It provides similar durable execution guarantees but with simpler deployment since you only need Convex and your worker processes, not additional infrastructure.