Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonahandersson/serverless-azure-durable-function-chaining-dotnet-template
Starter template for a mini hands-on lab created with Azure Durable Functions with Function Chaining application pattern and with example integration with Azure Storage, Azure Service Bus, Sendgrid API and Twilio API
https://github.com/jonahandersson/serverless-azure-durable-function-chaining-dotnet-template
azure azure-functions azure-storage azurefunctions dotnet durable-functions serverless
Last synced: 6 days ago
JSON representation
Starter template for a mini hands-on lab created with Azure Durable Functions with Function Chaining application pattern and with example integration with Azure Storage, Azure Service Bus, Sendgrid API and Twilio API
- Host: GitHub
- URL: https://github.com/jonahandersson/serverless-azure-durable-function-chaining-dotnet-template
- Owner: jonahandersson
- Created: 2021-10-22T11:38:25.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-29T20:48:58.000Z (almost 2 years ago)
- Last Synced: 2023-03-05T22:58:25.179Z (over 1 year ago)
- Topics: azure, azure-functions, azure-storage, azurefunctions, dotnet, durable-functions, serverless
- Language: C#
- Homepage:
- Size: 87.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Azure Durable Functions (Function Chaining Example) in C# .NET (Starter Template)
##### Starter Template for Azure Serverless Durable Functions .NET Core
*Author: Jonah Andersson*#### DESCRIPTION:
This is a starter template for Serverless deveöpment with Azure Durable Functions available to those you wants to try it out.
A hands-on lab created with Azure Durable Functions with [Function Chaining](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-sequence?tabs=csharp) application pattern.This template is prepared as starter template that allows you to develop Azure Functions (Durable Functions) serverless workflow with integration to other APIs such as Twilio API and Sendgrid API and Azure services - Azure Storage, ServiceBus etc.
#### OVERVIEW OF WORKFLOW
Azure Durable Functions - Function Chaining Example with Azure Service Bus, Twilio API, Sendgrid API and Azure BLOB Storage### EXPECTED RESULTS
- Orchestration get trigged by an image or BLOB uploaded to the Azure Storage
- Chain 1 - Sends queue message to Azure Service Bus
- Chain 2 - Send SMS or make call using Twilio API
- Chain 3 - Send email to configured email address using SendGrid API
- Chain 4 - Lab Exercise to send to Azure Cosmos DB etc. (Guide: How to create Azure Cosmos DB Trigger)
#### PREREQUISITES AND LAB ENVIRONMENT SETUP* Basics concepts of Azure Serverless Computing, Azure Functions and Durable Functions
(*If you are a student of Forefront's Serverless course, great. Otherwise, check *Recommended Learning* below*)
* Microsoft Azure account - Private or Organization subscription account
(*If you don't have any Azure Account, sign up https://azure.microsoft.com/en-us/free/*)
* Latest version of [Visual Studio](https://visualstudio.microsoft.com/) or [VS Code](https://code.visualstudio.com/)
* Azure Storage Explorer (https://azure.microsoft.com/en-us/features/storage-explorer/)
* Programming Language C# .NET (You can code in other supported languages as well - see supported languages)
* Install latest .NET Core 3.1 (LTS) or latest supported like .NET 6 https://dotnet.microsoft.com/download
* Install [Azure Functions Core Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v3%2Cwindows%2Ccsharp%2Cportal%2Cbash%2Ckeda)
* If you are using .NET Core 3.1 it will not be supported by the end of 2022 and you need to upgrade to functions version 4.0
* Postman for HTTP Requests/Triggers
* DEVELOPMENT LOCALLY use file local.settings.json with your own configuration strings, API keys#### local.settings.json (Local Development Only)
*RECOMMENDATION:* Use [Azure Key Vault](https://docs.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli?WT.mc_id=AZ-MVP-5004251) and Managed Identities to secure your function application for Azure Durable Functions```yaml
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": ""
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"StorageConnectionString": ""
"AzureServiceBusConnectionString": "",
"ServiceBusQueueName": "blobstoragenotifierqueue",
"Twilio_SID": "",
"Twilio_Secret": "",
"Admin_Email": "",
"Admin_Mobile": "",
"Twilio_Verified_Number": "",
"SendGridAPIKey": "",
"CosmosDBEndPointUri": ""
}```
### REQUIRED AZURE SERVICES AND API INTEGRATIONS
- Azure Storage Account for Azure Function App and a BLOB container to upload image files and for the Blob Storage Trigger
- How to create an Azure Storage Account
- How to create a Azure Blob Storage Container
- How to create a Azure Blob Storage Trigger
- Azure Service Bus Namespace with a queue name that matches the queue name of your app configuration
- How to create a queue in an Azure Service Bus Namespace
- Twilio API Account - API Keys and Secret are used to code the logic to send SMS and make call from the function app
- Instructions for TwilioAPI
- SendGrid API Account - API Keys and Secret are used to code logic in sending email
- Instructions for SendGrid### WHEN DEBUGGING AND DEVELOPING LOCALLY
When developing Azure Functions locally using this project. You should see similar like this when it is finished.
It logs what is happening with your orchestration. You may also check on### TALKS - Azure Durable Functions at NDC Oslo Developer Conference 2021
Click on the image below to watch the recording of my talk for this session at the NDC Olso Conferene
Watch session on YouTube https://www.youtube.com/watch?v=C199S4R7cy8
#### RECOMMENDED LEARNING AND HANDS-ON RESOURCES
- [Azure Durable Functions Documentation](https://docs.microsoft.com/en-us/azure/azure-functions/durable?WT.mc_id=AZ-MVP-5004251)
- [Microsoft Learn](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-create-first-csharp?pivots=code-editor-vscode?WT.mc_id=AZ-MVP-5004251)
- [Azure Functions University on YouTube by Marc Duiker](https://www.youtube.com/channel/UCmoWqg6T-c8zEGm4sZdnwbA)
- [Azure Functions University Lessons on GitHub by Marc Duiker and Community](https://github.com/marcduiker/azure-functions-university)
- [My article about Azure Durable Functions at DEV Community Blog](https://dev.to/jonahandersson/azure-durable-functions-developing-serverless-stateful-workflow-4787)
- [Serverless .NET Development with Azure Durable Functions by Jonah Andersson at Philippine .NET User Group (PHINUG)](https://www.youtube.com/watch?v=zByq3wB7fIQ&t=31s)
- [Azure Durable Functions Fundamentals at Azure User Group Sundsvall by Jonah Andersson](https://www.youtube.com/watch?v=fDej9n-kzNM)
- [Azure Serverless Community Library](https://serverlesslibrary.net/)
- [Azure Storage Account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview)
- [SendGrid with Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-sendgrid?tabs=in-process%2Cfunctionsv2&pivots=programming-language-csharp)