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

Add ability to stop/pause/resume an workflow #88

Closed
s8sg opened this issue Aug 6, 2019 · 10 comments · Fixed by #100
Closed

Add ability to stop/pause/resume an workflow #88

s8sg opened this issue Aug 6, 2019 · 10 comments · Fixed by #100
Labels
enhancement New feature or request faas-flow-template Issue applies to component: fass-flow-template SDK Issue applies to component SDK

Comments

@s8sg
Copy link
Owner

s8sg commented Aug 6, 2019

As suggested in issue-#81 by @kwojcicki
We will provide ability to stop a workflow

@s8sg s8sg added the enhancement New feature or request label Aug 6, 2019
@vtolstov
Copy link
Contributor

vtolstov commented Aug 6, 2019

does also we need to pause workflow or only stop?

@s8sg
Copy link
Owner Author

s8sg commented Aug 6, 2019

Pause would be good to have. Implementing pause will need some changes in executor.

Stop will be a implicit feature of the sdk. It can use the statestore to mark a pipeline as inactive. If a node is already started execution of its operations then it will be hard to stop, but afterwards the execution will be stopped.

pause may need to be handled by the executor. Currently we forward the intermediate state to next execution via http request. While it pause the intermediate state needs to be stored somewhere so that it can be replayed. While executing a branches all intermediate request need to be stored. We can use state store for it. Again it would be hard to pause an active Node execution but next nodes can be paused

@s8sg s8sg added faas-flow-template Issue applies to component: fass-flow-template SDK Issue applies to component SDK labels Aug 7, 2019
@s8sg s8sg changed the title Add ability to stop a workflow Add ability to stop/pause/resume an workflow Aug 7, 2019
@vtolstov
Copy link
Contributor

How can i serialize current workflow to store? Does it already have some sort of ability to export it to some representation?

@s8sg
Copy link
Owner Author

s8sg commented Aug 18, 2019

Check https://godoc.org/github.com/s8sg/faas-flow/sdk/exporter

These provide functionality to export the workflow definition in JSON

@vtolstov
Copy link
Contributor

Thanks! really helpful. How can i after that import flow by this json representation?

@vtolstov
Copy link
Contributor

as i see now is only way it to unmarshal json to https://godoc.org/github.com/s8sg/faas-flow/sdk#DagExporter after that iterate over nodes and construct DAG. Do you have some different way of restoring workflow from json?

@s8sg
Copy link
Owner Author

s8sg commented Aug 20, 2019

Now I see whats your point, no thats the only way for now.

@vtolstov
Copy link
Contributor

no problem, i'm iterate on unmarshaled struct...

@s8sg
Copy link
Owner Author

s8sg commented Aug 21, 2019

If you come up with the code to construct flow with iteration can you raise a PR adding it in the `sdk. The similar can be used for AWS State language

@vtolstov
Copy link
Contributor

vtolstov commented Aug 21, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request faas-flow-template Issue applies to component: fass-flow-template SDK Issue applies to component SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants