1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Introduction to Azure Functions

Durable Functions: Types and Uses

The course is part of these learning paths

play-arrow
Start course
Overview
DifficultyIntermediate
Duration46m
Students518
Ratings
4.2/5
starstarstarstarstar-border

Description

This course is an introduction to Azure Functions. It explains how Azure Functions are little bits of your application logic that live in the cloud. The course includes how to activate—or what we call trigger—your Azure Functions, how to pass data to and from them, and also how to tie different Azure Functions together using an extension of Azure Functions called Durable Functions. 

This course provides hands-on demonstrations of how to create different kinds of Azure Functions, how to create bindings to other Azure Services from those functions, and how to create a Durable Function to manage state from one Azure Function to the next.

If you have any feedback related to this course, please contact us at support@cloudacademy.com.

Learning Objectives

  • Create Azure Functions with different types of Triggers
  • Implement input and output bindings to different types of data resources
  • Create Durable Functions to orchestrate related Azure Functions
  • Log the results with Dependency Injection

Intended Audience

Software developers who want to learn how to implement Azure Functions as a part of their cloud software design.

Prerequisites

To get the most out of this course, you should have some experience will the following:

  • Event-driven programming
  • Servers and APIs
  • Coding with C# and JSON
  • Project creation in Visual Studio

Resources

The GitHub repository for this course can be found here.

Transcript

Okay that covers our introduction to Azure Functions. We got one running, we used bindings to interact with remote resources, we called functions from it, triggered functions from it and logged our activities. I spoke briefly earlier about the ILogger Dependency Injection that we were using for that.

Azure Functions 2.0 and later is much, much better at handling Dependency Injection than was version 1.0. And since it's pretty much required in a stateless environment that's a very good thing.

As I mentioned, if you're not familiar with Dependency Injection, that's okay. In this case the point of it is that Azure Functions as a runtime has some built-in tools such as Logging and Configuration that you can use for all of your Azure Function.

And you get access to those tools when you pass the right kind of object types in the Constructor of your Azure Function. Since you haven't created those objects yourself you know that Azure must be doing it for you in the background. Because those background objects are actually controlling much of what happens in your function, Dependency Injection of objects is sometimes called Inversion of Control.

The need for Dependency Injection brings us back to a point I mentioned earlier and again just now, the whole on-demand serverless model is by nature stateless. It's hard to hold state in something that doesn't exist most of the time such as is the case with your Azure Function.

But what happens when you do have several Azure Functions and you would like them to be aware of what the others have done before they execute in a smarter way than we just employed using our bindings and triggers? It's a common enough scenario and it's why Durable Functions were created.

Durable Functions is an extension of Azure Function that lets you orchestrate, or tie together in one way or another, stateful functions in a serverless environment. The orchestration is typically a sequence of logical processing. A Durable Function application is a solution you create that is composed of different Azure Functions, each one playing a different role within that orchestration.

About the Author

David Gaynes is a software and cloud architect for .NET, NodeJS, Azure and AWS. He has been developing .NET and Cloud software for more than 20 years, with some of that time spent at Microsoft, and has authored both technical and non-technical teaching materials as books and in other formats. He enjoys physics, meditation, and experiencing the natural wonders of Hawaii.