You are viewing content from a past/completed QCon -

Presentation: Stateful Programming Models in Serverless Functions

Track: Microservices Patterns & Practices

Location: Ballroom A

Duration: 1:40pm - 2:30pm

Day of week: Tuesday

This presentation is now available to view on

Watch video

What You’ll Learn

  1. Hear about how Azure does serverless, how they make the code durable. 
  2. Learn what and what cannot be done with serverless.


Most will agree that Serverless is the future of cloud computing. But when most people think of Serverless, they think of FaaS (Functions as a Service), and when they think of FaaS, they think of functions that are ephemeral, stateless, and short-lived. But does this always need to be the case? Is it possible write functions that are stateful and long-running on top of ephemeral, Serverless compute platforms?

In this session, we'll explore two stateful programming models: workflows and actors. We'll discuss how they can simplify development and how they enable stateful and long-running application patterns within ephemeral, Serverless compute environments. We'll also explain why we're making a bit bet on these programming models in the Azure Functions service.


What are you doing these days?


I work on the Azure Functions team within the Azure organization. We focus on building programing models that run on a serverless compute platform. My team in particular focuses on advanced programming models, Durable Functions being one of them. My team also owns some of the platform pieces of Azure Functions, such as the elastic compute backend that your code runs on - we automatically scale out and scale in for you.


When you talk about durable services, what does that mean?


The term durable typically means that you want to write some code and you want it to be resilient to failure. For example, if the VM crashes underneath you, you want to know that that code is going to come back up on some other VM and it's going to continue running where it left off. You're not going to lose any data or lose any progress. That's what we mean by durable. There's a lot more to it. We chose just to use the word durable as the main descriptor of what this is. But, I'm hoping within my talk to go into more details about what else that includes, such as long-running, and whatnot.


When you talk about durable, you don't mean persisting something off? You mean not losing what's in memory, if a function were to crash?


It's a mix of both in the sense that when you write a durable function, like a durable orchestration, you're writing just regular code. It's going to have some local variables. It's going to call some other functions. Behind the scenes, we do store some state persisted somewhere for you. Your code doesn't really have to know about that, but it is there. And then we have some techniques where if the process crashes or the VM crashes, we can actually restore your function, including the local variables, back to the last known good state.


Do you go into the details of the techniques that you use to maintain that running state?


Yeah, absolutely. One of them is going to be the pattern known as event sourcing, which I assume people will be familiar with. We use that pretty heavily to accomplish some of this.


What do you want someone to walk away from the talk with?


I want someone to walk away with a broader picture of what serverless and functions as a service can be. I think there are a lot of assumptions out there that, when we say serverless, when we say functions as a service, we're talking stateless and that everything is completely ephemeral. It puts it into a box a little bit. I want to expand people's ideas of what can be accomplished. For example, you can solve stateful problems on a serverless platform using functions. When I say functions I mean that generically regardless of what platform you're actually running on. But I want to expand people's concepts on what can be solved with serverless.

Speaker: Chris Gillum

Principal Engineering Manager @Microsoft, helping lead the Azure Functions Team

Principal Software Engineer at Microsoft working on Azure App Service and Azure Functions (especially #DurableFunctions).

Find Chris Gillum at

Last Year's Tracks

  • Monday, 16 November

  • Architecting for Confidence: Building Resilient Systems

    Your system will fail. Build systems with the confidence to know when they do and you won’t.

  • Remotely Productive: Remote Teams & Software

    More and more companies are moving to remote work. How do you build, work on, and lead teams remotely?

  • Operating Microservices

    Building and operating distributed systems is hard, and microservices are no different. Learn strategies for not just building a service but operating them at scale.

  • Distributed Systems for Developers

    Computer science in practice. An applied track that fuses together the human side of computer science with the technical choices that are made along the way

  • The Future of APIs

    Web-based API continue to evolve. The track provides the what, how, and why of future APIs, including GraphQL, Backend for Frontend, gRPC, & ReST

  • Resurgence of Functional Programming

    What was once a paradigm shift in how we thought of programming languages is now main stream in nearly all modern languages. Hear how software shops are infusing concepts like pure functions and immutablity into their architectures and design choices.

  • Tuesday, 17 November

  • Social Responsibility: Implications of Building Modern Software

    Software has an ever increasing impact on individuals and society. Understanding these implications helps build software that works for all users

  • Non-Technical Skills for Technical Folks

    To be an effective engineer, requires more than great coding skills. Learn the subtle arts of the tech lead, including empathy, communication, and organization.

  • Clientside: From WASM to Browser Applications

    Dive into some of the technologies that can be leveraged to ultimately deliver a more impactful interaction between the user and client.

  • Languages of Infra

    More than just Infrastructure as a Service, today we have libraries, languages, and platforms that help us define our infra. Languages of Infra explore languages and libraries being used today to build modern cloud native architectures.

  • Mechanical Sympathy: The Software/Hardware Divide

    Understanding the Hardware Makes You a Better Developer

  • Paths to Production: Deployment Pipelines as a Competitive Advantage

    Deployment pipelines allow us to push to production at ever increasing volume. Paths to production looks at how some of software's most well known shops continuous deliver code.

  • Wednesday, 18 November

  • Java, The Platform

    Mobile, Micro, Modular: The platform continues to evolve and change. Discover how the platform continues to drive us forward.

  • Security for Engineers

    How to build secure, yet usable, systems from the engineer's perspective.

  • Modern Data Engineering

    The innovations necessary to build towards a fully automated decentralized data warehouse.

  • Machine Learning for the Software Engineer

    AI and machine learning are more approachable than ever. Discover how ML, deep learning, and other modern approaches are being used in practice by Software Engineers.

  • Inclusion & Diversity in Tech

    The road map to an inclusive and diverse tech organization. *Diversity & Inclusion defined as the inclusion of all individuals in an within tech, regardless of gender, religion, ethnicity, race, age, sexual orientation, and physical or mental fitness.

  • Architectures You've Always Wondered About

    How do they do it? In QCon's marquee Architectures track, we learn what it takes to operate at large scale from well-known names in our industry. You will take away hard-earned architectural lessons on scalability, reliability, throughput, and performance.