-
Notifications
You must be signed in to change notification settings - Fork 37
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
Topological Sorting and Sequenced Execution #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass review
src/main/java/org/opensearch/flowframework/template/ProcessNode.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/template/ProcessNode.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/flowframework/template/TemplateParser.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #26 +/- ##
============================================
+ Coverage 0.00% 74.26% +74.26%
- Complexity 0 42 +42
============================================
Files 2 6 +4
Lines 4 136 +132
Branches 0 16 +16
============================================
+ Hits 0 101 +101
- Misses 4 25 +21
- Partials 0 10 +10
|
Signed-off-by: Daniel Widdis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together. Did a thorough review this time :)
src/main/java/org/opensearch/flowframework/template/ProcessNode.java
Outdated
Show resolved
Hide resolved
I see this PR fixes #19 as well but I don't see any RestHandler for the execution API. Am I missing something? |
Signed-off-by: Daniel Widdis <[email protected]>
Won't we need a REST API though for frontend/users to trigger the process sequencing which is already handled in this PR? Don't want to hold this PR but we should create a REST API for the execution. How about handling it in #19 and keeping the issue the open? |
Yes, we'll need a REST call to send the template in that we can't do until we have the template design finalized. I see a few scattered REST API issues, is there a META with all of the required ones listed somewhere? |
I was under the impression #19 is for the REST execution API. Based on our decided design here we will need 2 APIs:
I'll go ahead and approve the PR and we can have a new issue for the execution API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the feedback patiently. LGTM!
So exection is by orchestrate? That's what triggers the workflow using internal client stuff. The template APIs would be CRUD. We should definitely clarify all this in a new meta issue summarizing the various RFC comments. |
Execution is basically setting up the workflow which should be done by execution API. The operations to run on the workflow like Search/ingest would be done using orchestrate API.
The execution API should be able to pass the created use case template from frontend to backend as payload. |
* Topological Sorting and Sequenced Execution Signed-off-by: Daniel Widdis <[email protected]> * Add javadocs Signed-off-by: Daniel Widdis <[email protected]> * Update demo to link to Workflow interface Signed-off-by: Daniel Widdis <[email protected]> * Replace System.out with logging Signed-off-by: Daniel Widdis <[email protected]> * Update with new interface signatures Signed-off-by: Daniel Widdis <[email protected]> * Demo passing input data at parse-time Signed-off-by: Daniel Widdis <[email protected]> * Demo passing data in between steps Signed-off-by: Daniel Widdis <[email protected]> * Change execute arg to list and refactor demo classes to own package Signed-off-by: Daniel Widdis <[email protected]> * Significantly simplify input/output data passing Signed-off-by: Daniel Widdis <[email protected]> * Add tests Signed-off-by: Daniel Widdis <[email protected]> * Fix javadocs and forbidden API issues Signed-off-by: Daniel Widdis <[email protected]> * Address code review comments Signed-off-by: Daniel Widdis <[email protected]> --------- Signed-off-by: Daniel Widdis <[email protected]> (cherry picked from commit a574f47) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Topological Sorting and Sequenced Execution (#26) * Topological Sorting and Sequenced Execution * Add javadocs * Update demo to link to Workflow interface * Replace System.out with logging * Update with new interface signatures * Demo passing input data at parse-time * Demo passing data in between steps * Change execute arg to list and refactor demo classes to own package * Significantly simplify input/output data passing * Add tests * Fix javadocs and forbidden API issues * Address code review comments --------- (cherry picked from commit a574f47) Signed-off-by: Daniel Widdis <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Uses Topological Sorting to parse a JSON graph description of nodes and edges into a sequence of processes. Uses asynchronous execution with CompletableFutures to execute the processes.
Example input:
Example output showing sequencing with parallel paths:
Example showing initialized data:
And the processing:
Issues Resolved
Fixes #17
Fixes #19
Fixes #29
Fixes #39
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.