FAQ
For everyone. Short answers, each with a link to the full explanation.
Does Dwarf Need Its Own Server?
No. Dwarf is a library that runs inside your application. The only infrastructure is the SQL database it stores flows in, and replicas of your application coordinate through that database. See How Dwarf Works.
Do Tasks Have to Be Written in Go?
No. The engine and its host are Go, but the host can reach tasks written in any language, for example over HTTP with JSON in and out. See Tasks in Other Languages.
Which Databases Does It Support?
PostgreSQL is recommended for production. SQL Server and MySQL/MariaDB are supported. SQLite serves tests, and an application that runs a single replica at a modest rate. See Choosing a Database.
Is Execution Exactly-Once?
No, it is at-least-once, as in every durable execution engine. In normal operation each task runs once,
but after a crash or a lost database connection it can run again. Each step’s recorded outcome is unique,
and f.StepKey() gives you a stable key to make side effects idempotent. See
At-Least-Once Execution.
What Happens When a Replica Crashes?
Its in-flight tasks are picked up by another replica once their claims expire, within the task’s time budget plus about a minute and a half. See Crash Recovery.
What Happens When the Database Goes Down?
Work pauses and resumes on its own when the database is back; there is no need to restart replicas. See The Database Was Down. The exception is failing over to an asynchronous standby that lost recent writes: restart every replica afterwards, as Failing Over to a Standby That Lost Writes explains.
How Do I Know When a Flow Finishes?
There is no completion callback. Wait for the flow with Await, check on it with Poll, or make the
follow-up part of the workflow itself. See Detecting Completion.
Can I Change a Workflow While Flows Are Running?
Yes. Each flow keeps the graph it started with, so in-flight flows finish on their original shape while new flows use the new graph. Task code can change too, as long as it still accepts the state of flows already running. See Graph Evolution.
Is There a Built-In Scheduler for Recurring Work?
No. Use the scheduler you already have to call Create on a schedule. See
Recurring Work.
Can a Flow Have a Deadline?
Each task has a time budget. For a deadline on the flow as a whole, check its age in your tasks, as A Deadline for the Whole Flow shows. To cap how long any flow may stay open, set an engine-wide flow expiration.
How Much Can It Handle?
In the Cloud Benchmarks, one 32 vCPU PostgreSQL database ran 18,900 to 24,300 steps per second, depending on the instance, and shards added throughput linearly: four ran 91,800 steps per second, 3.8 times one. Plan each such database at about 18,000 steps per second sustained, as Sizing a Deployment explains.
Is Dwarf Ready for Production?
Dwarf is v0.x: there is no backward-compatibility promise yet, so upgrading Dwarf itself means stopping and restarting the fleet rather than a rolling deploy. Its behavior under load and failure is measured and published. See Upgrading.
How Does Dwarf Relate to Microbus?
Dwarf is the workflow engine inside Microbus, and it stands on its own: it depends only on a SQL database and the OpenTelemetry API. See About.