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
Dapr WF engine implementation starter #5301
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.
I have just reviewed the actors and runtime changes for now. I like that it is keeping the wf code relatively separate from the runtime code.
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 your feedback. Please see my comments.
8f12a60
to
70c891c
Compare
Codecov Report
@@ Coverage Diff @@
## feature/workflows #5301 +/- ##
=====================================================
+ Coverage 65.63% 65.64% +0.01%
=====================================================
Files 125 126 +1
Lines 13313 13400 +87
=====================================================
+ Hits 8738 8797 +59
- Misses 3946 3953 +7
- Partials 629 650 +21
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Per feedback from @artursouza, I'm going to change the design a bit. Rather than have the actor runtime worry about local vs. internal actors, we'll instead have the actor runtime support two types of app channels, the regular one and also an internal one. Internal actors will be implemented inside the internal app channel. This should reduce some of the churn in the actor runtime code. |
Can we break that up into a separate PR? |
3b4507e
to
4eebbf0
Compare
Sorry @yaron2, I only just now noticed your comment and already made this change. It reduces the complexity of the actor runtime changes slightly, so hopefully that makes things a little easier to review. |
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.
I like how the runtime changes go now. I still need to take a look at the wfengine/* code.
|
||
func NewActorBackend() *actorBackend { | ||
return &actorBackend{ | ||
orchestrationWorkItemChan: make(chan *backend.OrchestrationWorkItem), |
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.
Do you deliberately want these channels un-buffered?
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.
Let me revisit this. I didn't realize that unbuffered channels were an option.
I think this is looking pretty good overall; personally I think that we should move some of the actor-relate bits over into the actor package, and there are a few places where code will indefinitely block without timeouts (which may be okay if intentional) or we could bump into NPEs (which would probably be bad 😄) |
Having the actor package know about the workflow package feels wrong; As Workflows are a consumer of actors it makes sense to have workflow import actors only and not the other way around. |
Sounds good. This will be fixed in the next iteration. |
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 the feedback so far. Here's a quick summary of the changes in this latest iteration:
- The actor runtime now knows nothing about workflows. The only new concept it understands is internal actors.
- I made the
InternalActor
a first-class member of theactors
package that anyone can use. Seeinternal_actor.go
. - We have two
AppChannel
variables:externalAppChannel
(just a rename of the existing field) andinternalAppChannel
, which is responsible for invoking all internal actors, regardless of who creates them.
I've also responded to all comments. Let me know if anything else is required for this PR.
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.
I think we are in a pretty good place for this round -- thanks for shuffling around the actors / workflow engine relationship bits!
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
29c00fd
to
034d1b8
Compare
Thanks @johnewart and @RyanLettieri for the reviews! I made a few more small changes in the latest commits:
Let me know if anyone thinks there's anything else we need to merge this initial PR. Fingers crossed that the CI will be happy this time. 🤞🏽 |
Description
This is the initial implementation of the Dapr WF engine. This PR contains the following changes to dapr/dapr:
dapr
branch)InternalActor
abstraction that the workflow engine will rely on, including changes to the existing actor runtime to invoke thembackend
implementation for the durable task engine based on internal actors, including the first internal actor implementation (of typedapr.internal.wfengine.workflow
)I've implemented just enough of the engine to support executing a "no-op" orchestration using the existing, unmodified .NET Durable Task SDK, which tells us that the core parts are working and that the embedded engine is compatible with the gRPC protocol used by the existing Durable Task SDKs. However, I have not yet implemented any state storage, so the workflows are not yet scalable or reliable. There are also many more features that need to be implemented. However, I wanted to get this PR started to checkpoint my progress and get any initial feedback.
The most important files to review are the existing files, like
go.mod
,actors.go
,runtime.go
andserver.go
. This is a PR to thefeature/workflows
feature branch, so I don't think we don't need a full-blown review for this.I've also added a new
README.md
where I add more information, including some basic instructions for how to build and test the new feature.FYI @johnewart @artursouza @yaron2