Microsoft has brought the notions of states to the formerly stateless , Microsoft’s platform. The addition of states gives developers exciting new ways to take advantage of Azure Functions.
At first glance, Azure Functions is comparable to Amazon’s AWS Lambda. They both have similar event-driven programming models, but now Azure Functions is starting to show its own colors as a core feature of Azure’s PaaS offering. That’s partly the result of Microsoft’s decision to put Azure Functions at the center of a messaging-driven programming platform, part of a suite of tools that include Service Fabric and the publish-and-subscribe Event Grid.
Adding state to serverless in Azure Functions
The latest update to Azure Functions is an interesting because it takes something that was at its heart stateless and adds state. Where a standard function is best thought of as a software switch—taking data from one input, processing it, and then handling appropriate actions—the new durable functions are what Microsoft is calling “orchestrator functions.” Instead of a single switch, a durable function takes a series of functions and wraps them as a single, long transaction, building in workflow to manage actions, and handling waits by pausing the function.
One of the advantages of Azure Functions is its per-second billing model, where you pay only for the compute you use. That model carries into durable functions, where you’re charged when a workflow is running. If it’s paused waiting for an input, there’s no charge. And when it’s paused, it holds its state externally, so if the host process is reclaimed or the VM that’s hosting the function is rebooted, your function can pick up and carry on.
, it’s the key to delivering distributed applications running across Azure. For a global public cloud, these stateful functions are going to be indispensable.