Diving into Durable Entities with Azure Functions
Tags: serverless, azure, dotnet, cloud
Published: 2019-09-17 16:25:43

> This article is part of [#ServerlessSeptember]( https://dev.to/azure/serverless-september-content-collection-2fhb). You'll find other helpful articles, detailed tutorials, and videos in this all-things-Serverless content collection. New articles are published every day — that's right, every day — from community members and cloud advocates in the month of September. 

> Find out more about how Microsoft Azure enables your Serverless functions at [https://docs.microsoft.com/azure/azure-functions](https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=servsept_devto-blog-cxa).

The concept of serverless is something that I've been fascinated with for some time now. The idea of being able to build applications without much concern for the infrastructure, with dynamic scaling based on load, and flexible pricing models totally opens us up to a new way of delivery software based solutions.

As interesting as it is, serverless does come with it's own set of constraints that you have to work around. One such constraint that you might have heard about fairly often is that you should write your serverless code to be stateless. But why??

In a serverless world, your applications get dynamically provisioned and destroyed at the discretion of the platform you're using. This makes relying on resources like local memory, local variables, or even local disk storage almost impossible. Of course, you always have the option option of using a database or a 3rd party caching service, but that may start complicating the code you have to write. 

There are some classes of problems that may require highly concurrent access to the current state of the application. This puts developers in a position where they have to carefully manage how state is read and written to. But what if you didn't have to?

The Azure Functions team has introduced an extension to their platform called [Durable Functions](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?WT.mc_id=servsept_devto-blog-cephilli). Durable Functions lets you write stateful functions in a serverless environment. 

In the latest beta release, the team has added support for a new concept called [Durable Entities](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-entities?WT.mc_id=servsept_devto-blog-cephilli), which lets you use similar patterns like you would see in an actor model style application.

In this episode, [Chris Gillum](https://twitter.com/cgillum) and [Sebastian Burckhardt](https://twitter.com/sebburckhardt) sit down with [Jeremy](https://twitter.com/JeremyLikness) to give us the rundown on Durable Entities. They talk about the differences compared to the actor model, invoking entities via HTTP, and more.

{% youtube faKZXkmJ44g?t=38s %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).

## Useful Links
* [What are Durable Functions](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?WT.mc_id=servsept_devto-blog-cephilli)
* [Durable Functions on GitHub](https://github.com/Azure/azure-functions-durable-extension/)
* [Introducing Durable Entities for Serverless State](Introducing Durable Entities for Serverless State)