-
Notifications
You must be signed in to change notification settings - Fork 852
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
Workflow Processor - DAG Execution Ordering #2599
Comments
|
The MR is a draft MR because I am making breaking changes to the way workflow is configured so rather than: pipeline:
processors:
- workflow:
order: [ [ A ], [ B] ]
branches:
A:
processors:
#...
B:
processors:
#... pipeline:
processors:
- workflow_v2:
branches:
A:
processors:
#...
B:
dependency_list: ["A"]
processors:
#...
|
Can we then please also get rid of |
@AndreasBergmeier6176 - won't we still want to be able to use |
So far do not really understand why you would want |
In the original workflow processor it "executes a topology of branch processors". In a A I don't wish to alter this as a part of the PR. |
Maybe it is me not being a native speaker, but I did not get that difference from the docs neither from the attributes. Would it make sense to rename e.g. |
I think that you might find a number of tokens perhaps don't make sense - one in particular is the You could submit a PR to do a renaming. EDIT: Thanks for checking out my PR 😄 |
Within this new design you are now explicitly "drawing" the graph vertices via
|
I think that you might be confused about how the original In the original What you can do with the original When the node is ready to run it gets the contents of the entire message given to it at that time - you can use the You then realise that to fix the DAG execution it is required to use a different data structure then the one is being used by the original |
I also am thinking that it would be better - (though I am happy to be told otherwise) - we get rid of inferring the DAG from request_maps in the new workflow_v2 processor. I think it makes more sense to have the user explicitly state the dependents of the DAG in the config. |
I have started to think that making this alteration to the way the config is specified - is better and that the PR should be resolved with a new workflow_v2 processor. |
Issue Description
The Benthos provided processor Workflow executes a DAG of Nodes, "performing them in parallel where possible".
However the current implementation uses this dependency solver and it takes the approach: resolve the DAG into series of steps where the steps are performed sequentially but the nodes in the step are performed in parallel.
This means that there can be a situation where a step could be waiting for all the nodes in the previous step: even though all dependencies for the step are ready.
Consider the following DAG, from the workflow processor docs:
The dependency solver would resolve the DAG into:
[ [ A ], [ B, C ], [ E ], [ D, F ] ]
.When we consider the node E, we can see the that full dependency of this node would be :
A -> C -> E
, however in the stage before[ E ]
, there is the node B so in the current Benthos Workflow implementation E would not execute until B even though there is no dependency of B for E.The text was updated successfully, but these errors were encountered: