Durable Function Entities
    • Dark
      Light
    • PDF

    Durable Function Entities

    • Dark
      Light
    • PDF

    Article Summary

    #ServerlessTips - Azure Functions
    Author: Steef-Jan Wiggers Azure MVP

    Durable Functions are an extension of Azure Functions and are a continuation of the open-source Durable Task Framework. With Durable Functions, you can write stateful functions, i.e. workflow and stateful entities.

    With the second version and above of Azure Functions you can write Entity functions. An entity represents state. And with an entity function you can write and update state, which can be useful when you want to distribute a workload to various entities, or maintain state of an application.

    Below you see a class representation of a counter entity.

    10

    In runtime the Counter entity can have an identifier assigned to it and state (value) written to it through the Add operation.

    20

    The above screenshot shows addition of 10 to state of a Counter entity named Serverless. When getting the state the value that will be returned is 10. Subsequently, value can be updated with the Add, or Reset to zero. You can when the entity function is running assign values to various entities (each having an unique identifier).

    You can find more detailed documentation on Entities on Microsoft Docs:

    Entity Functions
    Developers Guide

    And you can also look at Chris Gillum’s – Stateful Programming Models in Serverless Functions recording.

    Azure-functions.png


    Was this article helpful?