Skip to main content

The best workflow engine is a programming language

By Steven Van ·

The idea of orchestrating long-running, stateful logic on top of unreliable, stateless infrastructure isn't new.

Vercel has released Workflow SDK, a TypeScript library for writing durable, long-running workflows without standing up separate orchestration infrastructure. A function marked with the "use workflow" directive becomes an orchestrator; a function marked "use step" is a unit of durable, retryable side-effecting work. The compiler splits the file into workflow and client/step bundles, so the control flow of ordinary async/await, try/catch, Promise.all, loops and conditionals is what defines the graph, rather than a separately drawn DAG.

  • Uncaught errors in a step retry automatically. Throwing FatalError stops retries, RetryableError sets a custom backoff, and fn.maxRetries tunes the count.
  • A single createHook() primitive replaces Temporal's separate signals, queries and updates for getting data into and out of a running workflow.
  • createWebhook() creates a callable URL inside a running workflow in one line, with no route or handler to deploy; the run parks until the URL is hit.
  • The runtime talks to infrastructure through a single "World" interface covering storage, queuing, auth and streaming, so the backend is swappable: Redis or Kafka for streams, Postgres, Cassandra, the file system, Turso or Durable Objects for durability, and Vercel Queues, SQS or Cloudflare Queues for the queue.

Vercel maintains a first-party Postgres world, modelled on the open-source DBOS project, that uses Postgres alone for durability, queueing and streaming. More detail is in the original announcement.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read The best workflow engine is a programming language on Creators Toolbox