Closed paule96 closed 9 months ago
It looks for me that I can only interact with workflows / activities that are hosted in the same instance of the application. But I can't call to other workflows hosted somewhere else in my dapr application.
@paule96 This is true, only the application that hosts a workflow can start one (and use only activities that have also been registered in that application). To have other Dapr applications interact with them you must expose a new endpoint that can be called via, for example, Dapr service invocation. That endpoint can then start/stop/manage the workflow.
With respect to scaling, I believe the note you mention refers to spreading execution across multiple replicas of the service (that registers the workflow). That is, there is no affinity for running a workflow's activities to the same node that orchestrates the workflow itself.
Hi @philliphoff,
thanks for the explanation. So the actual activities
will be run in the same application or they will be run "somewhere" inside of my dapr "network"?
Or does it just mean you have your sidecar for your application and you scale the application for example to 10 instances of your and it will spread the work to these 10 instances?
The activities will only run on the application (instances) in which they've been registered (along with the workflows themselves), but they will (should?) spread across those instances.
@philliphoff This makes sense. Thanks for your explanation and clarification 👍
Hi Dapr team,
I lately take a look into the new workflow feature of dapr. And as far as I understand is an activity in an workflow not more then an actor. And a workflow itself is like a component around the activities.
So for me every call of
CallChildWorkflowAsync
orCallActivityAsync
goes to the sidecare. This looks into the placement lookup table (or updates his own copy) and send this request to the correct instance / node that hosts thisActivity
orworkflow
to run it.It's also written in the
CallChildWorkflowAsync
documentation the following documentation:To make my issue easy to understand I created an example repo.
The example repo contains basicall 3 applications:
daprWorkflowDistributedIssue.ApiService
WeatherApi
WeatherAPI
sample with one single easy endpoint/weatherforecast
daprWorkflowDistributedIssue.DaprWorkflow1
CallWeatherWorkflow
WeatherApi
daprWorkflowDistributedIssue.DaprWorkflow2
CallWeatherWorkflow
The problem is now that the workflow
CallWeatherWorkflow
works just okay. But when the workflowGetWeatherAndMood
tries to callCallWeatherWorkflow
you will get the following response:It looks for me that I can only interact with workflows / activities that are hosted in the same instance of the application. But I can't call to other workflows hosted somewhere else in my dapr application. This creates for me also the question how to scale these workloads or even better how to scale the activities. In special in the
Fan-Out
pattern.Hope someone can help me to understand, what i miss here :)