Azure Durable Functions is a programming model based on Microsoft serverless’ platform Azure Functions and therefore, has additional benefits over a standard function, such as state management, retry activities, and being able to easily cancel workflows that are still in progress. It allows you to write a workflow as code and have the execution run with the scalability and the reliability of serverless with high throughput.
The Orchestration Client is used to start the orchestrator function, and can also be used to check the status of the function, as well as terminate them.
The Orchestrator Function plays a major role while building the Durable function and the Orchestrator Function is considered to be the heart of the durable function solution. In this function, you need to write the workflow in code. You can call the Activity function from the Orchestrator Function inside the code. You can also call another Orchestrator Function and Sub Orchestrator Function from this main Orchestrator Function.
It automatically set a checkpoint during its execution, shut itself down while waiting for other functions to finish executing, then replays through the checkpoint to resume execution.
It is important to remember how an Orchestrator function operates differently than a standard function. While a normal function only executes once per event, the orchestrator is restarted many times while waiting for other functions to complete.
This kind of behavior means that this function needs to be deterministic. It must return the same result each time. It is crucial then to not use DateTime.Now, Guid.NewGuid() or anything generating a different result in this method
Now it will create the Project successfully. It contains 3 main files. Function1.cs file, which is the main class file that contains the Azure Function code. The next one is local.settings.json file, that is responsible to keep all the configurations that we need during the development of the project and testing the function in the local environment. The Host.json file is responsible to keep all the configuration related to your Azure Function. See below, the project created successfully with all the three files.