Go-taskflow: A taskflow-like General-purpose Task-parallel Programming Framework
github.com
github.com
https://pkg.go.dev/cuelang.org/go@v0.10.1/tools/flow (cue cmd is the default implementation of this)
https://docs.hofstadter.io/getting-started/task-engine/ (custom example)
There are undocumented quirks (and documentation gaps) requiring hours of experimentation, some subtle bugs and ergonomy paper cuts.
For solution integration solution has to be approachable, and as much as I have sympathy for Cue it just isn’t one. It feels like one needs PhD in software engineering to use it.
This is IMO reason why people go for things like Airflow - popularity and ease of entry. Using Cue in distributed environment isn’t that hard. It can be used directly from Go or wrapped in Erlang/Elixir port.
A major benefit of my tool is that it ends up being pretty easy to re-wire the flows of tasks through the state tree. I tried for a ipynb type workflow as much as possible where I'm storing state on every state change, this lets me kill and restart the processing easily and often only losing the work that was in process on the in flight state changes. I find myself wiring up the first few steps of the state diagram and making the ones I haven't figured out yet temporariliy terminal. Then my computer is crunching away on pre-work and I let one item through at a time in the debugger, figure out that state, and move to the next state, and restart the flow. New items now start processing through the newly non-terminal state. I set breakpoints at all of the exceptional states and let it run working on the next step in the flow. I handle the exceptions and then open the flood gates with parallelism on the state, while also coding up the new state transitions. This lets my computer do a lot of work against things that have concurrency limits or rate limits while working, lowering the totally wall clock time of the large batch job.
What do I use it for for reals? I've been using it to check out and modify large swaths of code bases and build them against a build fleet where I'm rate limited on the build submissions and the ability to pull the code down and modify it. Or where I need to do walking of a large number of expensive apis over time to do complex calculations on small (1-5k sets of data).
I've always thought of building a dag renderer for the graph but I'm changing the graph during execution a lot, what I actually want is to render the state changes of a given task
Domain I’m working on is very prone to a failure so having simple visualization/interaction (e.g. click to inspect/retry) is an important feature.
For that task graph needs to be resolved and static before actual execution phase. Nothing prevents multi-loop resolution (i.e. task graph which result is a task graph). Just make sure artifact sits in-between.
https://github.com/noneback/go-taskflow/blob/main/examples/p...