Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically update workflow #64

Closed
wants to merge 5 commits into from

Conversation

TaoXieSZ
Copy link

I am implementing this change to help goflow dynamically update the DAG.

First, the flowRuntime uses requestID as key to store a "snapshot" of flow handler in fRuntime.ExecFlows
Then, the gcWorker removed finished flow in ExecFlows periodcally.

@s8sg
Copy link
Owner

s8sg commented Jun 24, 2023

@TaoXieSZ Thank you for the PR.

Dynamic Update

You don't need a separate functionality to update flow. Your flow definition function gets called every time a node executes.

Can you provide me an use-case that you are trying to achieve - I might be able to share an alternative approach to achieve the same

GC

I like the GC approach. Currently whenever a request is finished, flow - we are cleaning up the states. Current implementation will fail given the request would itself cleanup the states and then the GC would try to clean it again
Same can happen due to a race condition is when the GC has cleaned the state, then request execution try to clean it

Also keeping it in memory is not an option - this should be read from the redis.

ExecFlows               map[string]FlowSnapshot

I'll suggest to create issues first with the problem you are trying to solve and we can discuss accordingly
I'll close this PR for now and would reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants