Advanced Scenarios in Azure Functions

Durable Functions

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

This video segment describes Durable functions.

Keywords

  • Azure
  • Azure Functions
  • Durable Functions

About this video

Author(s)
Sahil Malik
First online
20 December 2019
DOI
https://doi.org/10.1007/978-1-4842-4408-1_4
Online ISBN
978-1-4842-4408-1
Publisher
Apress
Copyright information
© Sahil Malik 2019

Video Transcript

Sahil Malik: Next let’s talk about a very exciting capability of Azure Functions called Durable Functions. Durable Functions is an extension of Azure Functions and Azure WebJobs. Basically they let you write stateful functions in a serverless environment. So where you have a lot of functions interacting with each other and they need to be orchestrated together, here’s a function that runs, it’s waiting for another function to get called and then three more functions get called and then a fan in, fan out operation occurs, you monitor something, and when a light blinks then the function gets called, all that sort of orchestration is what Durable Functions is supposed to do. Now it is important to note that everything that Durable Functions allow you to do, you can do that with plain Azure Functions as well. It’s just that Durable Functions make things a whole lot easier.

So what are the kinds of things that Durable Functions allow you to do? Well, they allow you to define workflows in code. Yes, so you don’t need to have any complicated JSON schemas you need to remember or any complicated designers, point-and-click, drag-and-drop, none of that. You define your workflows in code. That’s what we’re used to, right? They allow you to call other functions. And you can call these other functions either synchronously or asynchronously and you can call them in a sequence, in a pattern that you defined. And the output from the other functions can be saved as local variables. So this is really where you can start writing some really compelling applications using Durable Functions.

And they automatically ckeckpoint their progress whenever the function awaits. So the important thing here is that local state is never lost and you don’t have to worry about things like process recycles or V.M. reboots or any of that. So behind the scenes it is provisioning a storage for you and it is storing all those details in an Azure Storage, but again, you don’t need to worry about that. All that is blind for you. You just work with a very simple programmatic API and that’s really the value of Durable Functions.