AzureFunBytes Episode 65 - @Azure Durable Functions For Automation With @LBugnion
Tags: azure, serverless, azurefunctions, cloud
Published: 2022-01-13 20:18:18

AzureFunBytes is a weekly opportunity to learn more about the fundamentals and foundations that make up Azure. It's a chance for me to understand more about what people across the Azure organization do and how they do it. Every week we get together at 11 AM Pacific on [Microsoft LearnTV](https://cda.ms/226) and learn more about Azure.

![AzureFunBytes animation](https://res.cloudinary.com/practicaldev/image/fetch/s--Z7BxBMz1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2xzw2g664tj31jij13t.gif)

This week on AzureFunBytes we're diving back into serverless technology by discussing how to write stateful functions!  [Azure Durable Functions](https://cda.ms/3Cf) is an extension of [Azure Functions](https://cda.ms/3Ch) that lets you define stateful workflows with what is known as "orchestrator functions."  You can create these stateful entities by writing entity functions using the Azure Functions  programming model.

When working on Azure, and especially when it comes to automating processes, Azure Functions (aka serverless functions) are very useful. But they also have some limitations. Functions are an extension of Azure Functions that overcome some of the serverless limitations. With Durable Functions, you can run long processes, execute multiple instances of functions in parallel, and more. 

Durable Functions scale based on need which keeps costs under control when implementing complex workflows on Azure.  Some of the key features of Durable Functions include:

* Using event driven code.
* Chaining functions together
* Orchestration and coordination of functions, including the order of execution.
* State is managed for you so you don't have to write code to save state information for long-running functions.

Work on creating your code and not managing the infrastructure required. Let the Durable Functions framework take care of activity monitoring, synchronization, and runtime concerns.  You can also use many of the popular programming languages you are already familiar with.

## [Supported languages](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp&WT.mc_id=modinfra-54032-jagord#language-support)

Durable Functions currently supports the following languages:

- **C#**: both [precompiled class libraries](https://cda.ms/3Cc) and [C# script](https://cda.ms/3Cd).
- []()**JavaScript**: supported only for version 2.x or later of the Azure Functions runtime. Requires version 1.7.0 of the Durable Functions extension, or a later version.
- **Python**: requires version 2.3.1 of the Durable Functions extension, or a later version.
- **F#**: precompiled class libraries and F# script. F# script is only supported for version 1.x of the Azure Functions runtime.
- **PowerShell**: Supported only for version 3.x of the Azure Functions runtime and PowerShell 7. Requires version 2.x of the bundle extensions.

To help me learn more about Azure Durable Functions I'll welcome back to the show Microsoft Senior Cloud Advocate, [Laurent Bugnion](https://twitter.com/LBugnion).  Laurent will discuss how he used Durable functions to automate important processes at Microsoft, update web pages and help create the Learn Live series of shows.

Our agenda includes:

- Functions are awesome when combined with automation triggers
- Some of the limitations can be overcome by using durable functions
- If you do something twice, it's worth automating. In our case, we avoid a lot of copy-paste.

{% youtube pEGFW1RgiWc %}

[00:00:00 - Opening](https://youtu.be/pEGFW1RgiWc)
[00:01:19 - Azure Functions Trailer](https://youtu.be/pEGFW1RgiWc?t=79)
[00:04:03 - Welcome to the show Laurent](https://youtu.be/pEGFW1RgiWc?t=243)
[00:08:39 - The always important, "So how'd you get here?" question](https://youtu.be/pEGFW1RgiWc?t=519)
[00:14:10 - Introduction to Azure Functions](https://youtu.be/pEGFW1RgiWc?t=850)
[00:16:17 - Web API with Azure Functions](https://youtu.be/pEGFW1RgiWc?t=977)
[00:19:11 - More use cases](https://youtu.be/pEGFW1RgiWc?t=1151)
[00:21:25 - How did Laurent use Durable Functions?](https://youtu.be/pEGFW1RgiWc?t=1285)
[00:26:41 - Supported languages](https://youtu.be/pEGFW1RgiWc?t=1601)
[00:29:30 - Visual Studio 2022 and Azure Durable Functions](https://youtu.be/pEGFW1RgiWc?t=1770)
[00:48:00 - Creating a new Azure Functions Project with VSCode](https://youtu.be/pEGFW1RgiWc?t=2880)
[00:52:53 - Laurent and I chat a bit about heavy metal! 🤘](https://youtu.be/pEGFW1RgiWc?t=3233)

**More about Laurent Bungion:**

*I work as Senior Cloud Developer Advocate for Microsoft Azure after almost 10 years spent working for IdentityMine and Valorem, two leading firms in Microsoft technologies. I code in Azure, .NET, Windows, WPF, Xamarin (iOS and Android), ASP.NET (Core and Classic).*

*On my free time, I write for technical publications such as MSDN Magazine, publish technical videos on YouTube and Microsoft Channel 9, and my blog is on blog.galasoft.ch. I am a frequent speaker at conferences such as Microsoft Ignite, Microsoft Build, TechEd, VS Live, Techorama and many other international events.*

*Prior to joining Microsoft, I was a Microsoft Most Valuable Professional for Windows development from 2007 to 2017, a Microsoft Regional Director from 2013 and a Xamarin Most Valuable Professional from 2015. I am also the author of the well-known open source framework MVVM Light for Windows, WPF and Xamarin.*

------

Learn about Azure fundamentals with me!

Live stream is normally found on Twitch, YouTube, and [LearnTV](https://cda.ms/226) at 11 AM PT / 2 PM ET Thursday. You can also find the recordings here as well:

[AzureFunBytes on Twitch](https://twitch.tv/azurefunbytes)
[AzureFunBytes on YouTube](https://aka.ms/jaygordononyoutube)
[Azure DevOps YouTube Channel](https://www.youtube.com/channel/UC-ikyViYMM69joIAv7dlMsA)
[Follow AzureFunBytes on Twitter](https://twitter.com/azurefunbytes)

Useful Docs:
[Get $200 in free Azure Credit](https://cda.ms/219)
[Microsoft Learn: Introduction to Azure fundamentals](https://cda.ms/243)
[Microsoft Learn: Create serverless applications](https://cda.ms/3Cj)
[Microsoft Learn: Create a long-running serverless workflow with Durable Functions](https://cda.ms/3Ck)
[Introduction to Azure Functions](https://cda.ms/3Ch)
[Azure Functions documentation](http://gslb.ch/c580s-azurefunbytes)
[Durable functions patterns](http://gslb.ch/c581s-azurefunbytes)
[A presentation about durable functions](https://galasoft.ch/presentations/details/2021024)
[Repo with durable functions patterns (work in progress)](https://github.com/lbugnion/sample-durable-functions)
[GalaSoft](https://galasoft.ch/)