Serverless September (3 Part Series)
This article is part of #ServerlessSeptember. 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.
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. 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, which lets you use similar patterns like you would see in an actor model style application.
In this episode, Chris Gillum and Sebastian Burckhardt sit down with Jeremy to give us the rundown on Durable Entities. They talk about the differences compared to the actor model, invoking entities via HTTP, and more.
If you liked this video and would like to see some more of our .NET content, please subscribe to our .NET Developers YouTube Channel.