Waymark is a durable workflow engine for background jobs, designed to keep tasks running through process crashes, server restarts, and long waits. It uses Postgres as its persistence layer, avoiding the need to deploy separate infrastructure, and currently offers a Python package containing both client and executor. Developers write ordinary async workflows to manage control flow and mark failure-prone work - such as database queries and external API calls - as distributed actions. The system supports retries and timeouts per action, conditionals and loops, parallel execution with asyncio.gather, durable sleeps, scheduled workflows, and a web interface for inspecting executions and node load.
Its central distinction from replay-based engines such as Temporal is that Waymark compiles workflow code once instead of rerunning it after each step. The Python SDK parses a workflow’s run method into an intermediate representation, then bytecode for a durable virtual machine; the Rust runtime executes that program and saves its state in Postgres. Recovery therefore resumes from the saved execution state rather than re-executing the original workflow code, avoiding replay-related determinism requirements. The tradeoff is that workflows must use patterns the compiler supports; unsupported or non-deterministic behavior must be moved into actions, and some compiler limitations remain. Waymark targets teams already using Postgres that want durable, retryable async jobs and straightforward local-to-production deployment, prioritizing practical scale over best-in-class throughput.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.