cschleiden / go-workflows Goto Github PK
View Code? Open in Web Editor NEWEmbedded durable workflows for Golang similar to DTFx/Cadence/Temporal
Home Page: https://cschleiden.github.io/go-workflows/
License: MIT License
Embedded durable workflows for Golang similar to DTFx/Cadence/Temporal
Home Page: https://cschleiden.github.io/go-workflows/
License: MIT License
Provide an API to access a PRNG that allows usage of "randomness". Perhaps record the seed of the PRNG and reuse this across, so that workflows remain deterministic despite using randomness.
Depends on #58
Instead of duplicating events in the history
and pending_events
table, events should be stored in a single events
table. history
and pending_events
should contain only references to the events.
Implement by adding a cache to the workflow worker that keeps workflow executors in memory for some time. Extend the executor to execute new tasks on top of an in-memory workflow state.
Add support to backends to try to deliver subsequent workflow tasks to the same worker instance.
For mysql and sqlite backend:
Only one of the sub-workflows will be canceled
Similar to timer cancellation, cancel sub-workflows when the context used to create them is canceled.
Should check whether the usage is in a workflow.
We need to give workflow a chance to clean up
A CLI or a UI to admin & debug workflows would be useful.
See if generics can make the Future
and Channel
handling easier. Especially avoiding the interface{}
types in the Get
calls for serialization/deserialization.
Extend the analyzer to also check for:
chan
in workflowsWaitGroup
in workflowstime.Now()
and time.Sleep
Workflow instances queue
Lock workflow instances
Activity queue
Delayed (timer) events
[ ] Sticky session behavior postponed for now
There are some flaky tests around sub-workflow cancellation propagation. We need to investigate and resolve those.
span
to CreateWorkflowInstance
span
with the instanceCurrently timer cancellation follows a model similar to DTFx: for timers only Scheduled
and Fired
events are recorded. Timer cancellation is solely handled in the workflow state. That means when a timer is cancelled, it must have been because inputs for the workflow (inputs, signals etc.) lead to the timer cancellation. A cancelled timer is recorded in the state and when at a later point it still fires (because the backend wasn't notified about the cancellation), the Fired
event is recorded in the history, but since the timer is already cancelled, nothing is done in the Executor
.
This works, but ideally we would give the backend a chance to clean up the timer. This is also going to be more in-line with "Sub-Workflow Cancellation", which DTFx doesn't support at all.
Keys:
history:<instance_id>
pending-events:<instance_id>
state:<instance_id>
Supports: #28
When root context is canceled, stop polling for new work, complete in-progress work, and then exit.
Have some kind of timeout.
Today the worker just panics
. Instead a better error message should be shown.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.