denoland/celld

Public

Support Cloudflare Workflows

  1. sachaarbonelsubscribed3 months ago on GitHub

  2. RY
    Author

    Design written (wiki: designs/workflows.md on the `workflows` branch), v1 implementation starting. The short version: Cloudflare builds Workflows on Durable Objects, so celld builds them on cells — one cell per instance under a reserved class (the `.cron` precedent), step results as rows in the cell's SQLite, every wait (sleep, retry backoff, waitForEvent timeout) as the cell's alarm, and `run()` replayed with completed steps short-circuiting from the cache. Suspension is a private sentinel exception; the alarm re-enters the replay. Workflow state rides the cell's ordinary durability contract, so the output gate and replication apply with nothing added.

    v1 surface: `WorkflowEntrypoint`, `NonRetryableError`, `step.do` (retries limit/delay/backoff + timeout, 1 MB serializable results), `sleep`/`sleepUntil`, `waitForEvent`/`sendEvent`, binding `create`/`createBatch`/`get`, instance `status()`/`terminate()`, and the `workflows` wrangler key. Punted loudly (deploy errors name the field): `schedules`, `pause`/`resume`, `restart`, rollback handlers, the `wrangler workflows` CLI, the REST API — all additive on the same tables.

  3. RY
    Author

    Shipped in c55d4bea (feat: Workflows), targeting the 0.3.1 release. One cell per workflow instance under a reserved class; run() replays over a step ledger in the cell's SQLite; every wait — sleep, retry backoff, event timeout — is the cell's alarm, so hibernation and node-failure takeover are inherited rather than implemented. The v1 surface: WorkflowEntrypoint, step.do with retry configuration, sleep/sleepUntil, waitForEvent/sendEvent, and the binding's create/createBatch/get with status and terminate. Not in v1, each refused loudly: pause/resume, restart, rollback handlers, cron schedules, the wrangler workflows CLI. Fleet-validated: a three-step instance survived the SIGKILL of its owning node mid-sleep — every step ran exactly once, takeover in 76 seconds.

  4. ryclosed3 months ago on GitHub

  5. bartlomiejureferenced 554fa82872e62 months ago on GitHub

  6. bartlomiejureferenced a52f9905425b2 months ago on GitHub

  7. alicetriessubscribed2 months ago on GitHub