FlowChassis Launches as a Workflow Kernel That Survives Crashes
FlowChassis, the studio’s seventeenth project, is the engine part of a workflow engine without the platform around it. You describe a job as named steps, each with a Do and, where it changes something, an Undo. It runs inside your own program and writes a checkpoint before and after every step to one journal file. A failed step is retried with growing waits. One that fails for good undoes the steps already done, newest first. Version 0.1.0 came out on 18 October as a Go library with nothing outside the standard library, plus a command that reads journals, with binaries for Linux, macOS and Windows. It’s open source under Apache 2.0.
The promise is recovery, so the testing is mostly killing things. In the large recorded demo, a worker running 1,000 orders was killed with SIGKILL 200 times. Every order ended the way its own rules said: 750 completed, 250 compensated, none lost. A ledger of outside effects agreed with the journal, and the 46 effects of 5,296 that happened twice all trace back to an attempt a kill cut off before its checkpoint. That’s at-least-once execution, which is why every step gets an idempotency key. Another test cuts the journal at every byte of its last record, and each cut opens and resumes.
Four case studies come with runnable programs in the repository: an account signup that deletes half-made accounts, cloud provisioning that tears down a failed deploy, a video transcode you can kill and resume mid-way, and webhook delivery with a dead-letter queue. Ukue keeps a queue of jobs in one SQLite file. FlowChassis is for the job that has several steps, where a crash halfway needs the done steps kept or taken back.