-
Notifications
You must be signed in to change notification settings - Fork 284
Description
Is your feature request related to a problem? Please describe.
In our .NET 6 architecture, we use a DurableClientFactory in ProjectA, which is a public web API, to create a DurableClient which starts an orchestration in ProjectB. ProjectB is a C# functionApp running in InProcess-mode. ProjectA was able to do this using the package Microsoft.Azure.WebJobs.Extensions.DurableTask.ContextImplementation. But, it seems that Azure Functions .NET is moving away from WebJobs and moving towards Worker.
We chose for this solution, becuase ProjectA is a public WebAPI and that WebAPI first had to send exactly the same HTTP request to ProjectB, where only then we could start the orchestration. So for us it prevented a lot of code duplication.
Are there any existing GitHub discussions or issues filed that help give some context to this proposal?
The feature for WebJobs was implemented in PR #1125. I reckon a similar approach can be taken here.
Describe the solution you'd like
Basically exactly the same as what PR #1125 had implemented. Thus a IDurableTaskClientFactory interface and a DurableTaskClientFactory implementing it. And it would return a DurableTaskClient which would enable one to start an orchestration outside of Azure Functions.
Describe alternatives you've considered
The alternative is going back to our old architecture, passing the same HTTP request around via our public facing WebAPI in projectA, which would then send basically the same HTTP request to our private orchestrated FunctionApp ProjectB.
Right now I'm in the process of checking whether it is possible to start a Worker Orchestration using the DurableClientFactory from the WebJobs package.
Additional context
Since I'm asking for an almost exact 1:1 copy of a pre-existing feature in WebJobs I don't think much more information is necessary. I am curious as to whether this was considered. If it was deemed a bad idea I'd like to know why.