Start United States USA — software Azure Orchestrators Simplify the Creation of Stateful Serverless Workflows

Azure Orchestrators Simplify the Creation of Stateful Serverless Workflows

245
0
TEILEN

Azure Durable Functions aim to extend the paradigm of serverless computing by introducing the concept of orchestrator functions enabling the definition of more complex workflows. If you have ever fancied to use them, Microsoft has just published a good walk-through to let developers start their journey in serverless computing and orchestrator functions.
Azure Durable Functions aim to extend the paradigm of serverless computing by introducing the concept of orchestrator functions enabling the definition of more complex workflows. If you have ever fancied to use them, Microsoft has just published a good walk-through to let developers start their journey in serverless computing and orchestrator functions.
Azure Functions are Microsoft’s take at serverless computing and provide a basic mechanism that takes an input, processes it, and returns a result when actioned by a trigger. Durable Functions extends it in an interesting way in that they add state to something that is at its heart stateless. Durable functions are a set of functions that a so called orchestrator function wraps into a single logical transaction. They allow developers to write complex workflows in code and execute them.
The two fundamental concepts behind Azure Functions are functions and triggers. A function is just a single method from a static class. A trigger is an event that some code responds to. Typical triggers are Http, that responds to an HTTP request from an user, and Timer, that is able to schedule the execution of some code. On top of that, Durable Functions use two new concepts:
Note the use of an ActivityTrigger attribute with a DurableActivityContext parameter: this is what qualifies a function as an Activity function.
With this in mind, this is how you can define an orchestrator function that retrieves all repos from an organization, then sums all open issues count for each repo, and store the result somewhere:
In the example above, note the use of the OrchestrationTrigger attribute with a DurableOrchestrationContext parameter that qualifies RunOrchestrator as an orchestrator function.
What is interesting in the code above is that each call to context methods are themselves Azure Functions. This means that the workflow execution will benefit from the scalability and the reliability of Azure functions.
You can find the workflow above on GitHub and of course do not miss Microsoft tutorial for the full detail.

Continue reading...