Durable Functions: an extension of Azure Functions that lets you write stateful functions in a serverless compute environment.
You can use Orchestrator functions (OrchestrationTrigger
) with Trigger function (e.g., BlobTrigger
) & Activity Function (ActivityTrigger
) to create a Function Chaining pattern
The extension lets you define stateful workflows by writing Orchestrator functions (OrchestrationTrigger
) and stateful entities by writing Entity functions using the Azure Functions programming model.
Behind the scenes, the extension manages state, checkpoints, and restarts for you, allowing you to focus on your business logic.
As a best practice, all the connection strings must be stored on the Azure Key Vault & they can be referenced using Managed Identity of the Azure Function.
Refer the sample source code for implementing the above architecture.
The folder structure shoes below how the code is structured. This is only for visual aid.
Tree /A /F
\---Durable-Function-Chaining
+---DurableStorage.Models
| | CloudBlobItem.cs
\---DurableStorageApp
+---Functions
| +---Activities
| | SendEmailNotificationToAdmin.cs
| | SendMessageToServiceBusQueue.cs
| +---Orchestrators
| | AzureStorageOrchestrator.cs
| \---Triggers
| BlobTriggerStart.cs
- Azure Subscription
- Azure Services namely Functions, Blob Storage, Azure Service Bus, Azure Communication Service. You can add/remove any service to have your own integration.
- Azure Function Core Tools to run & test it locally. This sample uses version 4.0
- Dotnet framework. This sample uses version 6.0
On successful execution, it will run as shown below in the local environment: