Skip to content
The era of durable execution (Interview) episode artwork

Apr 10, 2025 1 hr 40 min

The era of durable execution (Interview)

from The Changelog: Software Development, Open Source

Stephan Ewen, Founder and CEO of Restate.dev joins the show to talk about the coming era of resilient apps, the meaning of and what it takes to achieve idempotency, this world of stateful durable execution functions, and when it makes sense to reach for this tech.

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

The era of durable execution (Interview)

0:00 1:40:03

Chapters

  1. 0:00 This week on The Changelog
  2. 0:56 Sponsor: Retool
  3. 3:46 Start the show!
  4. 6:56 Demystify Idempotency
  5. 9:09 Achieving Idempotency
  6. 11:38 Where does the word Idempotency come from?
  7. 13:53 Why solve this problem? Why you?
  8. 22:51 Leaving Flink
  9. 29:15 Sponsor: Heroku
  10. 31:56 What is durability?
  11. 39:22 When should I reach for this?
  12. 46:03 The era of Resilent Apps as a service (RAaaS)?
  13. 49:32 Marketing challenge of resilience
  14. 53:50 Tangent: Why are AI agent demos booking flights?
  15. 55:27 Sponsor: Augment Code
  16. 58:57 Adam predicts that "this is the year" of durable and resilience
  17. 1:10:46 Infra required for Restate
  18. 1:15:16 It's Schrödinger's cat
  19. 1:19:22 Publishing Changelog with Restate?
  20. 1:30:41 This new world of durable execution functions
  21. 1:36:13 Changelog.com/community
  22. 1:36:34 Closing thoughts?
  23. 1:38:24 More thoughts and closing
of matches

Transcript Auto-generated, may contain errors

Thank you. Okay, friends, it's time for your favorite podcast. Welcome to the Change Law where we feature the hackers, the leaders, and those who are building durable execution functions. Today, Jared and I are joined by Stefan Ewan, the founder and CEO of Restate, talking about the coming era of resilient applications, the meaning of and what it takes to achieve idempotency, this world of stateful, durable execution functions, and when it makes sense to reach for this tech. A massive thank you to our friends and our partners over at Fly.io. That is the home of changelog.com. Learn more at Fly.io. Okay, let's get resilient.

Well, friends, before the show, I'm here with my good friend David Hsu over at Retool. Now, David, I've known about Retool for a very long time. You've been working with us for many, many years. And speaking of many, many years, Brex is one of your oldest customers. You've been in business almost seven years. I think they've been a customer for almost all those seven years to my knowledge.

Share the story. What do you do for Brex? How does Brex leverage Retool? And why have they stayed with you all these years? So what's really interesting about Brex is that they are an extremely operational heavy company. And so for them, the quality of the internal tools is so important because you can imagine they have to deal with fraud, they have to deal with underwriting, they have to deal with so many problems. Basically, they have a giant team internally basically just using internal tools to stay in a day out. So they have a very high bar for internal tools.

And when they first started, we were in the NYC batch, actually. We're both in winter 17. And they were, yeah, maybe customer number five or something like that for us. I think DoorDash was a little bit before, but they were pretty early. And the problem they had was they had so many internal tools they needed to go and build, but not enough time or engineers to go build all of them. And even if they did have the time or engineers, they wanted their engineers focused on building external physics software, because that is what would drive the business forward. Brex mobile app, for example, is awesome. The Brex website, for example, is awesome. The Brex expense flow, all really great external physics software. So they wanted their engineers focused on that, as opposed to building internal crud UIs.

And so that's why they came to us. And it was honestly a wonderful partnership. It has been for seven, eight years now. Today, I think Rex has probably around a thousand Retool apps they use in production, honestly, every week, which is awesome. And their whole business effectively runs now on Retool. And we are so, so privileged to be a part of their journey. And to me, I think what's really cool about all this is that we've managed to allow them to move so fast. So whether it's launching new product lines, whether it's responding to customers faster, whatever it is, if they need an app for that, they can get an app for it in a day, which is a lot better than, you know, six months or a year, for example, having to schlep through spreadsheets, et cetera. So I'm really, really proud of our partnership with Rex.

Okay, Retool is the best way to build, maintain, and deploy internal software. Seamlessly connect to databases, build with elegant components, and customize with code. Accelerate mundane tasks and free up time for the work that really matters for you and your team. Learn more at retool.com. Start for free, book a demo. Again, retool.com.

We are joined today by Stefan Ewan from Restate.dev. Stefan, welcome to the Change Talk. Hey, thanks for having me. Pleasure. Pleasure to have you as well. Adam, how you doing, man? So good, Jared. How about you? I'm doing well. Always excited at the beginning of a conversation to dig into something new, something different, and something called Restate. This is supposed to be the simplest way to build resilient applications. This is a requested show, Stefan, so we do take episode requests. This listener would like to remain anonymous.

However, they say that Restate is a super exciting approach to managing distributed systems. And they say that we should get you on the show. And so we just take orders around here and our listeners often give what they want. And so that's how we found you. What's the real listener request? Awesome. That's very cool to hear. Is that open source communities at work and all that? That's right. So Restate, let's not get into Restate itself at first. Let's talk about resilient apps first. This is called Tagline, the simplest way to build resilient applications. Let's talk about that. What is exactly a resilient application in your estimation?

okay yeah so in in the way we think of it in that context of restate um we're talking mostly about the the back end of application the sort of coordination and orchestration logic a resilient application would be an application that doesn't accidentally drop your order that doesn't accidentally place it twice if you hit f5 at the wrong point when you're in the browser that doesn't you know accidentally book your uber for two people instead of for one um that doesn't you know just disconnect you from your chatbot, lose the history, make you start over. All these kind of things. This is what we're talking about when we mean resultant apps in the context of restate. So basically apps that tolerate all sorts of hiccups, errors in the infrastructure, unavailable endpoints, network failures, process failures, temporary outages, but also types of programming glitches that cause request to fall through and having to be retried in order to process reliably, but then not get duplicated, but the system understanding how to idempotently treat them as a retry and not as a second request. This is sort of the bigger picture of what we mean here with resulting applications. Can you take a moment to demystify that term that you just said, idempotently, so everyone's on the same page? What does that mean, idempotently? Yeah, I think idempotently, you can think of it as just like understanding that a repeated request is actually not a new request, but it's the same request again.

sending it again because you were maybe disconnected from the original request or you got an arrow back. It's the thing that if you don't do it correctly, that is actually accidentally placing an order twice when you did. and it did try to place it once. It's a thing that many applications don't get right, and that's why you still see too many websites saying, don't hit F5 while this is showing. Do not reload while we finish this transaction. Exactly, because it doesn't understand if you submit the thing again, that this is actually supposed to be the same thing. It's just like another submission of the same request. It has no way of identifying that, so it might accidentally treat it as a second one where it has just like a very rough way of doing this. It's a surprisingly complicated problem, and there's lots of applications that don't get it correct, and there's lots of weird ways applications work around this. As a fun fact, I think my first...

But the first bank where it was like a customer, they did only allow you to wire to a certain recipient a certain amount once per day. If you're trying to wire the same amount of the same person a second time for the day, they just wouldn't allow it because they didn't know if that was like a retry from like your browser or if that was something stuck in a queue at some point in time. That's just how they duplicated it. And yeah, so generally, it's unimpotency. It's deduplication in a meaningful way, understanding retries versus new requests. Yeah, that's called overkill, I think, when they did that. They're like, how can we just...

use a blunt tool to solve this tiny little problem. Let's just not let you do more than one per day. Not ideal, surely, for lots of uses. Okay, so same request twice, operates the first time, won't operate the second time. Generally speaking, how do you achieve this? I mean, you could just limit to one request per day, but if you're not going to do that, how do people usually implement or ensure idempotency in their applications? Yeah, so in a way, you basically have to find a way to anchor the identity of requests all the way through. There's different standards for doing that.

The HTTP standard has actually a new, has defined a header where you can put in all the potency key, and the servers, when they support this, are supposed to understand if that key is set. And a previous request with the same key has come in the same parameters, that is a duplicate request for the same operation. But then, down the road, you basically just try to... to anchor requests and the processing of different steps in each other. When you do message queues, you place correlation IDs. When you're working with databases, maybe you try to address primary keys or transaction IDs or leases or tokens. There's tons and tons of tricks people do, but it's ultimately still a very hard problem to do if you want to do it end to end. It's kind of a mindset. You have to set out to do it, don't you? Otherwise... I think you have designed from the start for it. Like if the weakest link in the chain breaks, it's one of these things, yes. Or you can just say, do not reload your page while you're hitting this API.

Exactly. It's the simplest way to do it. Just like make it the user's problem. Don't handle it in your infrastructure. Yeah. Also, as an engineer, when I've achieved item potency, I know it feels very good when you're like, OK, I'm for sure not going to do double execution in this particular code path. That feels good. And as an end user, I'm also happy when I know they're not going to get charged twice, for instance.

That's right. So you can you can actually see good API's design this design this in from the start I think the first the first API where I came across that I thought it was really really well done with Stripes payment API I can really see I think that's also why it got so insanely popular so quick. The way they made that handling just seamless for folks that embedded this into their code to really understand how to make sure I have this request once and deal with all these things like that that was really stellar. All right, so here's a harder question. Where does the word idempotency come from? And why do we use that to describe this thing? It seems unnecessarily verbose and jargony. Do you just spell it first, Jared? I-D-E-M-P-O-T-E-N-C-Y would be the adjective. Do you know? If you don't know, you can just say, I have no idea. I don't really know, but I guess it's a Latin word. It comes from Latin. I don't know. It's all Greek to me. Maybe we can get a real-time look up for that and follow up on it from some sort of LLM.

Just prompting Adam. I don't want Wikipedia as we speak. Okay, good. I'm stalling for you. You know, I don't really have the details here for you, Jared. I'm sorry I can't LLM quickly enough for you. But it says item potence is the property of certain operations in mathematics. All right. I went straight to the LLM and I got the answer to my question. So the term item potent comes from Latin roots. So Stefan, excellent call there. Item meaning the same and potent meaning having power or being able to. Put together, item potent roughly means having the power to remain the same. So there's the actual word.

And then, yes, mathematics, blah, blah, blah. I've stopped reading now, so hopefully that wasn't a hallucination, and we can all move on. That sounds about right. Like, if it's an hallucination, it's a close one. Yeah, I-D-E-M plus potence. Same plus power. There you go. It's the same power. Very cool. Well, thank you for scratching my itch, my curious itch there. Both of you and ChatGPT, I suppose, pitched in on that one. What else? So we're talking about resiliency.

I'm curious, obviously, to have a resilient app just as good, right? Like, who wouldn't want these things? And just taking one of those things, and realizing it's hard to achieve on your own throughout, especially more complicated applications, why did y'all set out to solve this problem for folks to build restate? And why did you feel like, I'm the guy for the job? Yeah, that has a long answer and a short answer. I can start with a short answer. The short answer is, it's really, I would say, the state of the art to build.

backends that are supposed to, backends that do any non-trivial state management and coordination is completely unsustainable, I think, the way we're building this today. Just to give you an example, So let's actually start with LLM because we just talked about it, right? So let's say you're building a chatbot. You're submitting something like a message there. This thing in the end has to reach the LLM, but it has to look up the context in which that chat happened before. It has to make the call, has to go back, store the context. You don't want it to just lose everything if you lose your connection in the middle. Let's go with the FI thing again. You don't want it to actually trigger the same request twice or lose the entire session, make it start over.

So you're probably just putting this as an asynchronous request that runs in the background that you're sending from your chat session from your browser. But it's a separate asynchronous request that runs that talks to the LLM. You want it to be actually retrying in case something fails or is overloaded and it's throttling you back. And then you want to be able to reconnect to that task or request in case something goes wrong or in your browser or you accidentally hit the back button or whatever. Just implementing this is a surprisingly complicated thing where you start to stitch together like probably a queue, a database, and a bunch of tasks to manage that.

uh to give you another example just talked about stride right so let's say you're sending a request there for a payment and sometimes they tell you look this is good or bad like we accepted or didn't sometimes they tell you i don't really know like off-road detectors are running or we have some weird thing in the background that you know we're still asking it hasn't told us so i'm going to send you a webhook in a moment to tell you whether this went through or not and now you have like a synchronous request there and then somewhere else an asynchronous request coming on. You just want to make those two reliably meet. Even if this one fails, you want it to recover somewhere, understand where to reconnect with that webhook that you're awaiting. This little piece, it's really just one case handling in the backend where Stripe says, OK, I'm processing instead of yes or no.

There's actually many days of work to make that look reliable, to make it work reliable. And it's like lots and lots and lots of things like this that just get in the way with so many moving pieces, so many APIs to talk to, so much work, so much more work than originally happening asynchronously in separate requests than just in the synchronous user interaction. Just gluing this all together has become such a complicated thing that we felt this doesn't need a better solution. This is the motivation more from the use case side. I can give you a motivation more from why we actually ended up doing this. I think this is a motivation that probably lots of folks stumbled across. Ultimately, this needs a better solution. I think there's different projects approaching that problem. Why are we approaching it the way we're doing this has to do with where we come from? Before we worked on Restate, we were building Apache Flink. It's a different system. It's a stream processing framework. It's basically events and analytics. You have these events coming in, often through a message queue, and you want to aggregate them, join them.

Just a few examples where this is used is fraud detection in banks. Some payment events go in, you aggregate feature vectors through a fraud model. Things like the TikTok recommender, I use Flink to actually join information from users and interactions together in real time and understand how to create, how to update the features that will go into the recommendation model. I think companies like Uber use it for determine pricing and traffic models in ETA. So it's whenever you have events and you want to analyze them in a way that you aggregate them into some sort of, yeah.

a statistical value or a material issue. This is what we were building before. It's an analytical framework. What did actually happen then is at some point in time we saw folks were using that thing to solve, so distributed transaction processing. The types of things where you would say, hey, let's assume an order processing service that takes the event, check out that order, and it has to do a bunch of steps. Let's say update the inventory, trigger payment, call the service to prepare logistics, maybe call another service to put this in the user's history, maybe more steps and so on. And we started to see folks using Flink for that because it had this interesting property that it had sort of this...

baked in way of reliable communication and state management. It was all built for analytical use cases, but they found this such an interesting property that they started to apply this to the transactional use cases as well, like auto processing. just because they found that this is otherwise way too complicated to build and way too easy to build in such a way that it is brittle and not scalable, that it has corner cases where it violates a lot of these properties that we just said. And when this started happening repeatedly, we thought, okay, but apparently there isn't really a good tool out there yet. And apparently this property of correct, stateful coordination is something people really appreciate. They feel like it makes it a lot easier to build these type of frameworks. And then we set out to build a solution for that, and that became reset. It's in many ways actually from the way it approaches things, which architecture is inspired by our work on Apache Flink.

But it's almost a complete mirror image implementation of it. It takes almost the opposite design choice in most aspects because it's really optimized for loaded transactional processing rather than hard throughput analytical processing, which was Flink. But what we retained from this idea is, yes, stateful orchestration, an event-driven foundation, and so on. This is something we should build and we should be working on. And that became Restate. What's the timing of all this? When did Flink start? How mature was it? Or is it? And when did Restate?

be born out of the idea like what's give us a context in time yeah so this is a this context is measured in decades okay that's useful so yeah i mean flink was officially founded in 2014 but the work that became flink is back to 2010 when i was still in university so it was like four years of academic work and then there's flink started 2014 i worked on it until 2022 so eight years after it became an open source project um then i left flink because i needed to work on something else like for a change and then we started working on research um Like end of 22, early 23. So Reset is a bit over two years old now. Flink has had its 10th anniversary last year. Flink is super mature. I think it's used by thousands and thousands of companies at absolutely insane scale. The probably largest installation of Flink that I know must be Alibaba, who runs tens of thousands of cores for a single processing pipeline to live compute there.

their their e-commerce search and recommender um continuously uh reset is not quite quite as old and quite as mature as it's been two years but we've uh we've um we've released our stable 1.0 last summer and we recently released our first distributed replicated highly available architecture and have a bunch of folks that actually productively use that so i would say we're we're on course to get there nice was leaving flink difficult, sad, joyous? Like, what was that like when you left? Because that's a long time to work on one thing. And then to move on to that thing, I mean, you become pretty attached, don't you? Yeah, yeah, absolutely. So it is definitely a difficult thing. And it was not just leaving Flink. So we created Flink as an open source project, but we also went to build a company around that. And the company went through an acquisition, but we actually still stayed there, started building and growing the team. So I was simultaneously leaving the open source project and the company I built and everything. And absolutely, it's a difficult thing because that becomes like your baby. It's actually two babies in a way, right? The project and the company.

But yes, I feel that at some point I felt like there's a... I don't know how to say this in English, but I felt I was getting this tunnel vision on problems. I've been working on this for so long. And I've seen so many sort of repeated things that whenever I had a problem, I was just putting it into this category that I knew. And it started happening that I did that with things, and I later realized, oh, no, that wasn't actually the right thing on that problem. That might have been for the last nine, but this one should actually have been different. And so you get this kind of, if you work too long on the same thing, you're starting to not see the forest while the trees. And I felt I was reaching that point. So it sounded like, yeah, I should probably start doing something new.

It's kind of like familiar grooves in your brain. You know, if you just go to the same thing over and over again, it's like your brain gets new grooves and then different problems fall into those familiar grooves and they just slide in there. Sometimes they don't even fit or they aren't a good fit. I certainly understand that. I think when you've focused on one thing for a very long time, it is hard to think outside that groove. And it's interesting that you're building a similar system.

spiritually similar but I guess you could say radically different architecture is that the way you describe it like it's inspired by Flink but it seems like it takes the opposite approach of the world yes I think you could you could call it like that it is and it is under the hood still an event-driven system as Flink is But it just built for completely different traders. So just to give you an example, the core of link is the way it is. It's exactly one stateful processing. So it basically has the data streams that it keeps moving, operations that, you know, do stuff, stateful stuff with events, count, join, and so on. And then there's this asynchronous process running in the background that takes these consistent snapshots. So if something goes down, you can restore the state from the snapshot and sort of like just start the flow from there and has this like kind of clever way to do this.

um in a way that maintains consistency across all the parallel machines and it is like efficiently incrementally frequently and so on but it's a very throughput optimized thing so it stays off off the critical path if you wish like runs in the background so yeah it's really good for throughput but it you know just this like persistence operation once every couple of seconds if you know If you turn it to be very frequent, most people actually run it more in the order of minutes, right? So when something goes down in a pipeline, you just replay the last minute of data, which typically doesn't quite take a minute because it replays faster than the original data rate in which the events are produced. But still, it takes you back a certain amount in time, which is usually okay for analytics. The worst thing that happens is like, okay, you know, like this.

this feature here in that vector that goes into that traffic model or that recommendation is maybe a few seconds older than it would have otherwise been. It's not such a big deal typically. On the transactional processing side, imagine you have this multi-step process. You want a really fast checkout process and you say, I do want to just start the next step after I know the payment has gone through. Before that, I'm not updating inventory. I'm not kicking off any of the other processes. Then you really need actually a persistent step to be recorded, ideally in milliseconds. Maybe it's not that critical for order processing, but we're building this for even more low latency use cases like payment processing and settlement and so on.

and there you really just want to kick off the next step after you know like the previous step is persisted like possibly in a multi multi data center replication way and only then do i start the next thing so you have to really design this completely differently it's it's it's completely optimized for low latency transactional durability rather than analytical throughput so it's yeah it's a completely different design even though both ultimately are event-driven architectures right but your your atomic unit now is like is compute right like it's logic and perhaps data that comes from that it's a transactional step And so you can't just skip a transactional step because there's a workflow here and certain things rely on other things. And so the way that you think about durability as opposed to analytical data is, like I said earlier, radically different. That makes sense to me. Yeah, exactly. The atomic step in Reset is...

is extremely fine-grained. We're really building this in such a way that you should feel comfortable in a program that you do to use Restate to persist fine-grained steps, state updates. It uses internally, actually, this durable mechanism for leader election to understand that it can lock and fence off different retries. And this is such a fine-grained nature. It's really important that recording a durable step has the lowest possible latency. Whereas in Flink, the atomic step is like a couple of million events being aggregated together in some state distributed over 10 machines. So that's one atomic step. It's completely different, yes. Well, friends, I'm here with a good old friend of mine, Terrence Lee, cloud-native architect at Heroku.

So Terrence, the next gen of Heroku called fur is coming soon. What can you say about the next generation for Heroku? Fur represents the next decade of Heroku. You know, Cedar lasted for 14 years and more. Still going. And Heroku has this history of using trees to represent ushering in new technology stacks and foundations for the platform. And so like Cedar before, which we've had for over a decade, we're thinking about fur in the same way. So if you're familiar with fur trees at all, Douglas Furs are known for their stability and resilience. And that's what you want for the foundation of a platform that you're going to trust your business on top of.

We've used stacks to kind of usher in this new technology. And what that means for FUR is we're re-platforming on top of open standards. A lot has changed over the last decade. Things like container images and OCI and Kubernetes and CloudName, all these things have happened in this space. And instead of being on our own island, we're embracing those technologies and standards that we help mobilize and pulling them into our technology stack. And so that means you as a customer don't have to kind of pick or choose. So as an example, on Cedar today, we produce a proprietary tarball called Slugs. That's how you run your apps. That's how you pack to them. On FUR, we're just going to use OCI images, right? So that means that tools like Docker are part of this ecosystem that you get to use. So with our CloudName to Build Packs, you can build your app.

locally with a tool called Pack, and then run it inside Docker. And that's the same kind of basic technology stack we're going to be running in for, so you can run them in your platform as well. So we're providing this access to tools and things that people, developers already using, and extensibility on the platform you haven't had before. But this, you know, sounds like a lot of change, right? And so what isn't changing? And what isn't changing is the Heroku you know and love. That's about focusing on apps and on infrastructure and focusing on developer productivity. And so you're still going to have that get push Heroku main experience. You're still going to be able to connect your applications and pipelines up to GitHub, have that Heroku flow. We're still about abstracting out the infrastructure from underneath you and allowing you as an app developer to focus on developer productivity. Well, the next generation of Heroku is coming soon. I hope you're excited because I know a lot of us, me included, have a massive love and place in our heart for Heroku. And this next generation of Heroku sounds very promising.

To learn more, go to heroku.com slash changelogpodcast and get excited about what's to come for Heroku. Once again, heroku.com slash changelogpodcast. This word durability is being used a lot. Durable execution, durability. What exactly is durability?

doesn't fall down doesn't break yeah yeah yes something like that i think durability is probably the same as persistence maybe with a bit of a stronger emphasis on this really doesn't get lost after it happens um so durability is the d in in acid when it comes to databases right databases say we're giving you atomicity consistency isolation durability once you do an update we're not going to lose it like no matter what crashes like the database has a mechanism to to to bring that change to the database back if it told you i've recorded that row i've recorded the change it will be there no matter what and in the context of restate um That doesn't mean, for example, if you... The core building block of restate is a stateful durable function. You can think of it like that. And the stateful durable function, when you schedule an invocation for that, or as you go through the code of that stateful durable function, has multiple steps. Recording a step. Whenever you go beyond a step that you ask restate to treat as durable.

you know that no matter what happens, you will never re-execute that step. You'll never come up with a different value. Like if your machine goes down, the reset server goes down, if you deploy it across availability zones, the data center goes down, the network gets partitioned, whatever, you'll never ever go back and re-execute that step if it once told you that it's done. That's sort of the meaning of durability. Once it says it's there, it's always going to be there. And I think that this is in a way the...

I'd say almost one of the magic ingredients is the way Reset looks at making distributed application development simple. I'd say there's two core pieces that you need to think about. One of them is the durability. Make durability extremely fine-grained and extremely cheap. So because if you can apply durability in fine-grained steps, you always have to worry about very little after failure. Let's say your durability is coarse-grained. Let's say the other workflow is just like this one durable step, right? And it crashes in the middle.

It gets retried. It's up to you to figure out, well, did I actually process the payment already or not? Maybe there's a way to just, like a super case, I can't send it again, or I might even not be able to ask the service, did I do that or not? Did I actually decrement the available kind of product already or not? Maybe I have a way to, again, make this durable or not. I don't know. These things tend to be harder than one thinks because sometimes the API gives you, you know, it might have given you an error back the first time and you thought I didn't do this and followed some control path flow. And then the next time you actually get not an error, but the real result, and then you follow different paths. So people mess up this all the time. It's really hard to reconcile if you have these multiple steps as a course atomic unit. What did I do? How did I do it the last time? How do I recover from this?

But if you have extremely vibrant durability, if you're recording every individual step as durable in the system, and when it comes back, it can tell you exactly like this was the last step that you recorded, then you just have a very small amount of uncertainty. Okay, here's this one thing that I might have tried already. I have to just worry about that bit instead of the whole history and possible control and all the choices, how I might have ended up here that I need to reconstruct in order to proceed consistently from there. So just like verifying the durability is extremely powerful and simply fine things. Let's say the second magic ingredient is then how do you anchor this in the whole retrying and resolving potentially inconsistent situations with partitions, with timeouts, with zombie processes and so on, so that there's always a very consistent view of what the last durable step was. I think that's the second sort of ingredient of reset. It's not just durability, it's actually durability and consensus and giving you a very, very crystal clear view on.

on what like where you left off where you need to continue from i think if you take those two things in conceptually you've simplified the problem massively and the rest is almost api sugar that you built on top of that that's the that's the that's the i would say the magic that happens in the restate runtime it's a very low latency durable consensus log that fuses queuing, state management, locking, fencing, creating futures, resolving futures, all these kind of operations that tend to be part of a distributed coordination process. When you say the restate runtime, what can you liken that to for those of us who don't know what a restate runtime is? Is it like a Node.js thing? Is it like a database? What is that? Yes. So using reset is a bit like, let's say, somewhere in between using a database and using a message broker. So you write your program pretty much as code, however, how you write it before.

but you're using the vset SDK. Think of it a bit like your database driver in order to sort of Repset operations as okay. This operation here should be recorded as a double step or you know attach this state to the evocation transactionally or You know like create this future complete the suit and so on So this is do these operations on like to the recent SDK reset itself is is then like Maybe message broker is the best comparison. It's on the level of the message broker So when you invoke your code, you're not calling to that directly actually calling it to restate which makes the Invocation of your function on behalf of you can the programming model that we try to provide is you're writing a service that looks like an RPC service like you're writing handlers obviously handlers And then reset almost looks like a reverse proxy for you. So the other services, instead of calling the code directly, they call it indirectly through reset, reset proxying the call. And it puts itself in the middle with its Dribble consensus log.

And when it forwards the request to the service, it just isn't forwarded naively as an HTTP request, but it actually uses an invocation protocol. It uses HTTP2 or another type of streaming connection. Holds onto that connection, allows the service to sort of synchronize fine-grained steps. It will, when it forwards an invocation, for example, tell it exactly what the supposed state of the world should be, as in, here's the steps I know you should treat as completed. Here's where you should continue. And it will then allow to use that connection, that sort of lifeline, to let the application create durable actions.

So the, yeah, it's like on the level of a broker or database, looks like a reverse proxy to the invoker, looks like a, maybe almost like a database to the, to the service that uses it. And when will somebody reach for this? Now you said distributed systems, but some people think every network attached system is a distributed system. So, I mean, if I'm building a web application, let's call it a monolith that answers HTTP requests and has a database backend, a Ruby on Rails or a Phoenix or a insert your Django, insert your backend framework here. are those folks pulling in restate and using it for certain aspects of their workflows or is that not necessary for them because they are kind of a monolith like i have to be building a services-based architecture like where does it fit in i would very much be with you on like almost any system we build is a distributed system yeah completely so so i think it becomes useful very very quickly um maybe one way to think about this is your your back end where you do where you maintain state and update it and you know run run operations and changes it usually has a database that has this sort of core business state some operations coaches like purely straight to the database that's all they do that's fine

but anytime you have to do something that's not straight against this like one like your core database but something that goes against like different api something that runs in the background yeah something that is asynchronous work that goes beyond just touching the database i think you already are at the point where it's starting to become useful then you know If the only thing you're doing is maybe following one call, yes, maybe it's overkill. But I think the usefulness starts much, much sooner than a lot of folks realize. I would say every time you think about pulling in a message queue, you should probably start to think about pulling in something like Reset. Because it gives you a way to do the things you're probably trying to do with the message queue, but in a more high level, in a more well-defined, concrete way. You're not treating events, but you're dealing with...

stateful durable invocation stateful durable functions all of a sudden which is very often what you really want if you want if you're putting something um off the synchronous path with a queue you very often want to say okay here's something where i really care about that this happens it shouldn't get lost right that's why i'm putting it in a queue um and then you you probably care about this this thing happening once having reliable retries, you quickly reach the state where the processing of this operation is actually multiple steps. And then you're again in the, okay, how do I do reconciliation of multiple steps if it failed somewhere in the middle and I don't know what I already completed or not. So I would say the moment you started pulling a message queue, you probably should think about something like we said, the point comes very quickly. Yeah. But then it's, that's the simplest use case. I would say the most complicated ones that we see people build with this right now is using this to replace

complex choreography of like multiple Kafka topics and RabbitMQQs and session servers and workers and so on, or even like a distributed sort of payment ledger keeping system. So it's really a very broad spectrum. I would say in a way you can think like all the type of work you do in the backend, that's not the central database that keeps your business state. I think it's ultimately where we sit comes in. Yeah. What about a scenario where...

It's publishing I'm thinking like a tick-tock or YouTube for example as a creator We will upload videos to YouTube. There's a process that happens There's a certain orchestration that happens it has to be compressed it has to go through certain filters Maybe there's even a content filter has to go through a copyright filter Is that an example of where you would use something like restate where you want it to go? You want the user to be able to upload properly and their server capture the data and you know all the good things But then you got to run it through a process of saying okay This is now content that can be seen by what we call the world because it's been blessed by the Copyright filter, et cetera, et cetera. Is that a scenario where it makes sense? Yeah, absolutely. This is basically a workflow, again, if you think about it, right? You're uploading the video. Let's say maybe the upload first puts it into some cloud storage. But then, as you said, you first pass it to the content filter. Then you have maybe a few steps that even run in parallel, like recoding it for different resolutions, optimizing it to be served with the CDN and so on. Then you're, I don't know, running it through a system that tries to figure out what's the best title frame to display and all these different steps that you do. And they take potentially a long time. So it's a long-running process. There's a fair chance that a container goes down in the middle and wants to be migrated. And when it comes back up, you really want this to understand.

where did i leave off like what are the processes i should reconnect to that are doing the encoding or the yeah or the analysis like this is exactly the orchestration of that process is where we said would come in you wouldn't feed the video frames to the system that's like overkill you don't need to feed the video frames you put them in whatever cloud storage or so. But the orchestration of the process of the workflow, of the pipeline, that's a very good reset use case, actually, yes. That's a great example, Adam, because it definitely makes it easy to think through. I guess as people who upload to YouTube, we are intimately familiar with all the different steps. That's why I numerated very well. And it's asynchronous, because you can go about doing the other things while it's working on the long-running tasks, for instance. And somebody coded up some nice orchestration behind that sucker to keep that thing running. Yeah, and Google has the engineers to code up reliable orchestration flows, even in a way that, you know...

They're nicely observable. You can reconnect to them. They're efficient. They know how to parallelize steps and synchronize steps and so on. It's a much harder thing to do for many companies who don't hire the same type of engineers as Google does. And I think for those reasons, it actually makes these type of things much more achievable.

If you try to embark on that journey with that. Even when you were sharing how it worked early on, you were saying that it seemed, at least from my perspective, it seemed like it was user born every time. Every new application, every new scenario, every new job, every new, you know, what have you. Maybe even in your boring scenario where you were sort of focused for a bit there. you know, you keep recreating this durable invocation world over and over and over again. And why not turn it into like you have done here with a server and a client and SDKs for different languages and a flow that every developer can grab. Is that kind of where what landed you to this point here was that frustration of the repetition and repeating and rebuilding every single time you build an application? I think that's a great way of putting it. Yes. I would say the number one alternative to reset that people do or use is roll your own. Absolutely. And it's a very repetitive process. And most of the time.

I would say folks don't realize really all the edge cases that existed, what they do. They just maybe don't even solve them. So this is basically half-baked. roll your own and it's yeah every time again and again and it's it's very often um it's very often very similar problems that you're solving like let's say you're taking a message queue to say an extra that i triggered from asynchronously and it should you know chat have reliability retries and then i'm pulling in another store like redis or other key value store to to record different steps then i might be pulling in something like zookeeper etcd to place a lock on certain operations so no no they don't have a concurrency like i shouldn't be updating certain i don't know should a retry shouldn't work on the same payment id um if the log is still being held by the original process or so. And then you're trying to sort of, going back to idempotency, trying to make an update to another system and understand how do you actually anchor the idea of that processing forwarded to the update to that other system. And you're recreating, exactly, you're recreating that type of pattern over and over and over again. And I think this is where, in a way, workflow engines were originally born, if you wish, like enterprise workflow engines, which try to say, okay, let's try to define a flow where we can have steps following, you know, a certain predefined control flow graph, and we have the workflow engine giving you the guarantees that.

step b that follows step a really only starts after step a is done and step a is actually persisted before b starts and so on there they tend to be extremely heavyweight and flexible yeah it's just not not they break all the tools and everything um when you want to interact with them and what reset does and the durable execution space there what they're trying to do in general is kind of bring this level of of guarantees in a very very lightweight way into like almost arbitrary programs because it's just such a useful such useful power to have to kind of define this these durable steps, especially if you don't have to like branch out in a different domain specific language or graphical way to define them. If you could just like write your regular code, but have it treated, have it executed with the same sort of guarantees as if it was an enterprise workflow. It seems like you might have a large education challenge in front of you because there's so much thought that has to go into this kind of architecture. I think the fact that your largest competitor is all your own means most people don't know. Like we kind of all discover this pattern slowly over time inside of our own daily work. And so I'm just curious, like how you think you can attack that or are there other people like, is there a,

a common thread or movement that you can attach to or create in which people are like, yeah, here's this new style. I thought of this because you mentioned like workflow. And I think that's sort of. in the wheelhouse or in the ballpark of what restate is message queue i mean what is there like a simple idea or concept pattern of which restate could be one or maybe restate is the the brand but have you thought through this because you have a marketing problem here or a challenge i should call it yeah so um i think i think that is that is very true in many ways the okay i think there's like lots of layers of answers to that um i would say the simplest way you can actually explain it reasonably simple if you just start from you know it's stateful durable functions which have which have guarantees that they execute, they run to the end, they're able to record steps, they're able to basically do these sort of asynchronous building blocks that you have in your usual programs, calling other functions, creating promises, resolving them, updating state, making calls, and so on, just in a fine-grained, persistent way that knows how to recover. This is sort of the basic building block, a state for durable function. Now, the harder thing is actually, in a way, making people realize that they should be using something like this rather than roll your own. It's not uncommon that, it's mostly on the junior side of engineers, that you talk to them, they say, I don't get it, I know how to write a retry loop, like what?

What is this? And then, you know, it's a journey from there. Interestingly, I think the most enthusiastic audience is often the engineers that have been burned before that know, okay, I know how to build distributed systems, but holy cow, I know how hard it is. And like, even though I'm really good at this, I tend to overlook still two out of 10 corner cases and I get paid Sunday night or so. Those are the ones that really, that often go like, yes, I know why I want to use this because I know how much time I've otherwise spent on solving all these things if I have to do it myself. So I guess that's right. Like there's definitely an education challenge there. And I would say a very...

a very sort of like in your face example of that is if we look at the ai space and agents uh right now um i think every ai company is like reinventing workflows in the context of like agents and agent yeah agentic workflows like everybody's building and i would say slowly rediscovering like all those things when there's been an entire sort of industry that has been working on this for like wait i mean we've been working on this for two years but if you ask ibm they've been working on this for probably 30 years or something like this um i mean in a very different way right but but still and i feel like the all the ai companies are kind of like bit by bit rediscovering this and like when you when you start talking to them I think some of them understand, okay, even where, if you're building agents, if you deploy them, how they ultimately end up having to solve these problems. Again, like imagine you have a chatbot that is your flight booking. There's something you have to do to make it not rebook your flight twice if the agent just crashes at the wrong point. They're ultimately going to the same problems. They actually have a perfect foundation to build on with these systems being built today. But yes, I think they're not aware yet that this is something they run eventually into. So, yeah.

I think you can see this in many places that the industry is rediscovering work in different sort of like subfields that other fields have been done just because information flow isn't perfect. Mine are off topic rant. Why are all of the AI agent like hello world examples? Why are they all booking flights for us? It's like, do you want some undeterministic, half-baked language model booking your flight? That's like a very difficult thing to roll back. You know, like I just don't. That's something when my last human out of the loop, like AI agent moves. Like, can we start with something a little bit less critical? I don't know about you, Adam, but I get like serious heart palpitations thinking that someone's going to book a flight for me. And you don't get heart palpitations, Jared. You're a pretty chill dude. I am. I'm pretty chill. I just feel like, gosh, you know how hard it is to roll back a flight. I mean, come on. Oh, yeah. Well, I think it depends. I mean, I don't mind. I think it's the human dream to have somebody or something.

Take that kind of action, right? That's specific action. Like, put me a flight. Let's simplify it. How about you just like, give me a, yeah, exactly, a restaurant reservation. Right. You know, because worst case scenario, I ghost it and feel bad. But if I don't show up for my flight, I lose my 400 bucks or whatever, you know? Yeah. Maybe there's just so much accumulated pain from people waiting in the, like, call centers for airlines that, you know, always have to be like, oh, that's a perfect example for a chat, but like, people will want to use it because they will not want a single other minute to spend on the phone with these call centers. Yeah, perhaps.

Well, friends, I am here with a new friend of mine, Scott Dietzen, CEO of Augment Code. I'm excited about this. Augment taps into your team's collective knowledge, your code base, your documentation, your dependencies. It is the most context aware developer AI, so you won't just code faster. You also build smarter. It's an ask me anything for your code. It's your deep thinking buddy. It's your stand flow antidote. Okay, Scott, so for the foreseeable future, AI assisted is here to stay. It's just a matter of getting the AI to be a better assistant. And in particular, I want help on the thinking part, not necessarily the coding part. Can you speak to the thinking problem versus the coding problem and the potential false dichotomy there?

A couple of different points to make, you know, AIs have gotten good at making incremental changes, at least when they understand customer software. So first and the biggest limitation that these AIs have today, they really don't understand anything about your code base. If you take GitHub Copilot, for example, it's like a fresh college graduate, understand some programming languages and algorithms, but doesn't understand what you're trying to do. And as a result of that, something like two thirds of the community on average drops off of the product, especially the expert developers. Augment is different. We use retrieval augmented generation to deeply mine the knowledge that's inherent inside your code base. So we are a copilot that is an expert and they can help you navigate the code base.

help you find issues and fix them and resolve them over time much more quickly than you can trying to tutor up a novice on your software. So you're often compared to GitHub Copilot. I got to imagine that you have a hot take. What's your hot take on GitHub Copilot? I think it was a great 1.0 product. And I think they've done a huge service in promoting AI. But I think the game has changed. We have moved from AIs that are new college graduates to, in effect, AIs that are now among the best developers in your code base. And that difference is a profound one for software engineering in particular. You know, if you're writing a new application from scratch, you want a web page that'll play tic-tac-toe, piece of cake to crank that out. But if you're looking at, you know, tens of millions of line code base, like many of our customers, Lemonade is one of them. I mean, 10 million.

line mono repo as they move engineers inside and around that code base and hire new engineers. Just the workload on senior developers to mentor people into areas of the code base they're not familiar with is hugely painful. An AI that knows the answer and is available 7 by 24, you don't have to interrupt anybody and can help coach you through whatever you're trying to work on, is hugely empowering to an engineer working in unfamiliar code. Very cool. Well, friends, AugmentCode is developer AI that uses deep understanding of your large code base and how you build software to deliver personalized code suggestions and insights. A good next step is to go to AugmentCode.com. That's A-U-G-M-E-N-T-C-O-D-E.com. Request a free trial, contact sales, or if you're an open source project, Augment is free to you to use. Learn more at AugmentCode.com. That's A-U-G-M-E-N-T-C-O-D-E.com. AugmentCode.com.

I'm going to go out of a limb to bring us back into somewhat left the center, but basically center. Please do. And I'm going to say that this is the year 2025 is the year where durable execution of things is more important than it ever has been. It's always been important, but more and more people are leveraging APIs. They're building out this agentic world we keep hearing about. Right. And I think you keep having more and more people program against brittle APIs, brittle latency of networks, databases, et cetera. And you need that promise. I'm going to say that this is the year where the marketing problem that you have that Jared alluded to.

is still there i'm sorry but it's less and i'll tell you why it's less because render i just talked to honor goel uh ceo founder of render and this is on their radar so they're building an application for developers did a whole show on this and during that conversation he mentioned a brand at least i think i did actually i mentioned a brand that sponsors us not this show but has been and i think still is a sponsor into q2 and maybe q3 and that brand is temporal so i'm gonna ask you to to sort of help me understand the difference between temporal, NATS, Sanadia, Restate, your open source flavors in your cloud, what Brendan may be doing for application developers. It seems like this durable execution retry model doesn't live in the language itself. It's something you have to build every single time. That sucks. And it seems like more and more people are trying to solve it. So break down all those for me, temporal, NATS, Sanadia, yourself, what Brendan's doing, and anything else that may be doing, I mean, flink, but, you know, that's a different world. Yeah. Another one called Resonate. You know that one?

shut on you know yeah no resonate i know the guy behind it um it's pretty new anyway so there is definitely like you said there's other people trying to solve this problem yes exactly um i think this starts from from the same observation like the state of how things are built if you don't rely on one of those tools it's like almost unsustainable it's hard to build it's hard to hand it over to another person that's often so much implicit and brittle assumptions and how this works so folks have been trying to come up with solutions from um from the ones you mentioned temporal is absolutely the closest maybe yeah between temporal and resonate i would say those are those are the closest to uh to restate so i would actually focus on those i'd say uh nuts goes more in the in the direction of like flexible persistent messaging together with like some state management blended in and so on but you can you can already see like folks are trying to just like figure out what are the different aspects we need when building applications and sort of like make them type work together with each other in a tighter way and if you wish i think this is the but this room for me reset is There's a couple of things that make it unique, but I would say two things stand out first. I'd say the model goes a bit further than every other system. So Reset is, if you look at Temporal, Temporal is workflows. That's really what they implement, workflows and activities. So it's like durable steps and then, you know, with sleeps in there and signals and so on. So like the full-fledged workflows, it's actually very flexible if you're a power user and know how to use that. Reset goes beyond that by saying we're not just looking at a workflow, at like one durable execution of multiple persistent steps.

well we're sort of generalizing this almost what temporal does for workflow which we're trying to do this for a distributed service architecture consisting of like multiple stateful services that interact with each other and that um you can see this from the fact that reset has like uh persistent messaging and rpc um built in it has state built in that lives across a single durable execution so again temporal terms the workflow is done the workflow is done like you know it's sort of a self-contained unit within the workflow across the durable steps it remembers context when the workflow is done it's done and then reset is a stateful model where um you could almost think of the activities are like decoupled from the work for the activities can be stateful services and entities that live for a very long time and then you have durable functions that interact with them it's it's a much more flexible and powerful model to build um things like distributed state machines we have folks that actually start ditch certain elements of databases to put their state and reset because that is transactually integrated then with the durable steps and out of the box consistent so let's say number one so think of the temporal model but generalized into distributed services to include long-lived states include uh communication like between microservices it makes for for like more powerful more flexible box that's the one thing the second thing goes a bit back to to what i said earlier when we started this project we set out with with the following you can implement durable execution i think just it's not terribly complicated to implement a durable execution api on top of the database if you make it very simple um you know have a step write it to a database you know on replay just like for the database what are the steps that are already in there

It has a lot of holes, but it gets you started. But then, okay, let's talk about the holes. All of a sudden, you have a problem with long-running processes that suspend for a long time, scaling this to zero. You have a problem that you have to worry about in your library. You have to implement your own distributed locking and mutex in case you have timeouts and zombie processes and so on. So when you try to make it a really good experience, you quickly come to the point, okay, we actually have to go a lot further than building a library on top of a database. Then you start, maybe we're building a big orchestration server that still uses a database in the background.

And then you really come to the point of, if you want to make durable execution so lightweight that you can use it almost pervasively, how low latency do you have to make these steps under load? What is the best you can actually do if you deploy this across multiple data centers, if you deploy this across multiple regions? And then you come to the point that, you know, a distributed database across multiple data centers and regions, there's a lot of coordination back and forth because the database model, it needs to, you know, guarantee integrity. It does a lot of, like, transaction time stamping back and forth and round trips. On the other hand, if you build this on a log, on a, like, optimized transaction log, you can get as good as...

make one flexible quorum right across your across your different data centers and you have a step assisted and you can continue right so it's kind of going to the point where saying if we want to make this extremely fast solo latency that it has you can actually start to use it in places we didn't think you could use durable execution before because it becomes so cheap solo latency how would you have to build a system to do that and that's that's where we went you'd have to build it from first principle starting with a low latency replicated log on top of that build it like end-to-end event driven so you don't do like batch queries on a database but you do You do the most low latency thing you can do. You do fine grant messaging and event pipelines and basically layer from there. And then the other thing is like, okay, let's not just make it really low latency, but at the same time, it has also to be an extremely lightweight thing because somebody who, you know, we just said, what's the simplest use case? Like when should you actually start looking at reset only when you have a distributed ledger to build or do you want to do this? If the only thing you want to do is like put your asynchronous email sending in the background, but reliable. So the next thing is how do we actually make this extremely lightweight? What's the most lightweight package we can give that thing? And the most lightweight package is single binary zero dependencies.

Just download that thing. It has its log built in, its orchestration layer, its metadata consensus module, everything in a single binary. Just download one command starts in a second and you're done. There's literally nothing else to do. And then you can take this thing actually and start scaling out just by adding more nodes. You want to migrate it, let it take a snapshot to an object store, start deploying the data, send us a resume, go from there. So what's really the experience that durable execution needs if you want to be able to take it from the point that it's so lightweight you almost want to embed it with almost any application to this thing powers distributed multi-regional payment processing. What's the architecture need for that?

so that's what we started building reset so the second thing that was a very long way of saying the second thing is reset is really sort of a durable executions deck built from first principles for low latency serverless operations um high throughput and just like really really nice nice operations from the small to the large scale rather than saying let's start with whatever database we have i think in temporals case when i came out of uber they started with cassandra and said let's build a server that sort of like sits on top of cassandra and like stores all all the data it needs for coordination in there and then you know you have like different pieces that you need to scale you have a database that is actually a lot more than you really need for a little execution, but on the way also sort of sacrifices the potential for optimizing. Those are the differences, I would say. Gotcha. Built for speed, basically, is what you're saying. Built to be lightweight. Scale down. Yeah, scale down, scale up.

And yeah, lightweight, simple to operate. I usually don't like to do this. I usually like to talk more about what makes Reset great and what makes other systems not great. Uh-oh, Adam pushed you on the spot. Well, you know, I think it's important. Well, if I'm going to say, if I'm going to go on a limb and say, this is the year, then you have to follow me, okay? You have to follow me and you have to answer my question because I'm reducing your marketing churn for you just by nature. So I just say, if you look at the way Reset is built and it allows you to get started.

then scale from there if you say okay i care about self-hosting this because what i what i pipe through this is like critical data it's not something i trust with as i manage cloud it really has to run in my account so i think the experience you get out of reset is vastly different than what you get that you get from many other systems and that's because it's just been this right this very thoughtfully crafted stack from the very beginning and not sort of incrementally evolved from yeah from this database and then that server and yeah right if you're directly comparing to temporal which is an incumbent which was spun off from as you mentioned uber and has different principles for which it was built on you went back the first principles okay if you want to get to the point where you can put this in almost everywhere you want so you have to be low latency you have to be fast you have to these first principles you built on have to be there yeah and you can't have the requirement to first install a distributed database before you get started What is the requirements? That's where I was going to go too. So it seems like it's client, which is an SDK essentially inside your code base making calls to a server. What is the architecture, the infrastructure required? So the reset server, which is where the low latency consensus log lives and the thing that basically becomes the reverse proxy for your service, that thing has...

Not really any requirement if you wanted to get started. So self-contained binary it embeds its own distributed log. Roxy has a storage engine, its own consensus engine. The only thing if you want to run it like as a single node is you need to give it a persistent disk. It's almost that like...

um let's say if you would want to run like sqlite or postgres it's a little bit like let's go back to the good old days where you download one binary i just like started and it's actually running it's actually good like there's nothing else you need to do um but then at the same point um it's it's also uh it's also able to go from that single process that you start with a single binary to actually cluster up um and and build a distributed um a distributed cluster and there's a very um interesting architecture in there in the we built it basically for the cloud data page where you would say um any system that you that you run at scale should not really store its own data but it should just make use of object stores for as much as it can because S3 and these systems, they're these like bottomless, insanely durable and insanely cheap storage systems. So make use of that as much as you can to put a lot of your, a large chunk of your data. So that means while you may be working with the data on your individual nodes, you're not really required to safeguard it on the nodes because you can recover it from S3 or an object store, right? So what Reset then does is it actually implements its log in such a way that it only uses this for to really give you the very low latencies for the durable steps. And then in the background, it incrementally moves data to S3, which makes the individual nodes.

like fairly lightweight to operate. So to go back to your question, like what are really the requirements when you want to run it? If you want to run it on a single node, none or a persistent volume, if you actually want to run it like in production, if you want to run it in a distributed setup, give it an S3 bucket. Those are the requirements. If you want to use it from your code, the requirement in your code is to use the SDK and to basically create a reset entry point that reset can connect to and where can use it sort of durable invocation protocol that understands how to decode that. This sort of entry point is mimicking the popular frameworks like, you know,

relatively close to expressjs if you're talking the javascript world in the java world it looks more like spring boot um and so on and then within an individual durable function service handler um you need to to use the reset context to say okay i want to run this step and record it as durable i want to create this as a durable promise for a persistent callback and so but otherwise the structure of your code is very much the same as it used to be so it's supposed to you know be as little invasive or as little to get as little in the way of how you used to do things as it can. Just sort of changing the paradigm as in, because it has this fine code durability for these operations, you can get rid of a lot of the sort of unhappy passcode. There's still cases you need to treat, but mostly you still need to treat sort of like persistent errors that come from the application where you say like, okay, you're making a call to an API where you're not authorized. There's not really a way you can recover from this. You're just trying to do something you're not supposed to. And handle this. But don't worry about handling process failures, network failures, rate limits, where that bounce you back.

don't don't worry about many classes of race conditions about you know like the state being maintained in the database versus the logic that attracts with it in a function that can you know where you don't know where did this go through or not just if you put the state of the restate handler it's just going to be consistent for you all of those all of those things while keeping the structure of the code like close to what you used to write so let me talk about things you don't like to talk about except for me the architecture seems kind of fun to you uh what is it that you do like to talk about when it comes to defining and describing restate and why developers should consider it so now what i don't like to talk about is competitors in the sense of I don't want to say okay I don't like this about that competitor I don't like that about another competitor because number one I'm not an expert in those systems I try to be honest uh I look at them to the extent I need to look at them but actually no deeper than I need to because I found this very liberating to not have my like judgment sort of clouded or pre sort of pre-biased by having looked at something I feel if you look for example if we look in depth at how Temporal would build their APIs and so on there's like a very good chance that like oh yeah I get it this is why they did it this makes sense and so on and there's a good chance you'll probably do it the same way just because you've sort of

seen this example decoded it understood it and you're preconditioned exactly if you don't do this is the cat alive or dead in the box we won't know until we look maybe yeah but if you don't live you actually have a chance to do something to come up with your own creativity possibly possibly do something better right so that's one of the reasons why i don't like to talk about them so much because i'm absolutely not an expert i look as much as i need to but i don't usually don't try to go super deep into these systems um and the second thing is I don't know. There's so much, I'd rather talk about good things than bad things. It's more fun to say nice things than bad things. I understand your discomfort then now. Definitely, it's always, it can be tumultuous talking about competitors and what they do and what they don't do. I think in the context, the reason why the question is pertinent is because whenever, like to Jared's point, you have a marketing challenge ahead of you. And I think it's because the idea of durability and item potency is mostly well known, not always easily implemented, and there's options out there. And so when you sort of look at that challenge.

You think, well, what could someone reach for? When would they reach for it? When does it make the most sense to reach for it? And does it actually fit whenever they do try to implement it at scale across different boundaries and whatnot? And so when you compare that, you look at like, well, Nats, Nats is a whole different scenario, but they do similar things. It's kind of funny because when you mention Flink, you're like, well, it does this in a different way. And then you got to restate because of your experience there and whatnot. Same thing with Nats is like Nats does a lot of the similarity things where your broker messages, there's a lot of retries, there's a lot of key value storing in there. It's like a lot of that same principles, but it's not about durability. It's not about retries. And then you obviously have temporal.

You have Render who's trying to or going to do something like that in the same platform, which I just had the conversation with Anurag. And then you obviously have Restate and how you went back to first principles versus being spun out of something or what have you. So I think from a guide standpoint, you're the best suited guide in this conversation to explore those because Jared and I can't do that for us. Yeah, absolutely. So if you want a quick summary.

I'm not very biased, but I think there's almost no reason to not reach for restate. I think it really is this solution from first principles with amazing developer experience with a very powerful abstraction that allows you to build what you can build with workflows and signals, but also so much more. And yeah, just the journey from the beginning, downloading the binary, then migrating, getting out is an absolutely... It's a great experience. And I mean, the project is newer than other projects, so it will have a rough edge here or there, but it's also moving very quick. It's very good at reacting to community feedback fast. So I think it's a good choice. It hasn't made a lot of users happy so far. Can we use maybe, Jared, an example from our application to consider how we would pick up Restate?

I know we publish episodes, right? We publish episodes. We often will have scenarios where the slug isn't right. We've had different scenarios where we had to do things in prod to fix something. You know, it could be metadata and you've got different checks before the publish process. Is there a way knowing what you know now about restate, how you would consider implementing something like that to safeguard publishing episodes in a durable way?

i've never really used one of these tools before so it's difficult for me to say that um i do know just at a technical level that i do not believe restate has an elixir sdk so we might be out in the elixir one that that's a good ask um okay maybe i can help you um like come come up with an example here let's say you're let's say you're recording the episodes and then every time an episode is done let's say you know let's do an ai thing here or so um so you're you're building your your chat where you can chat with an episode like okay you know show me like tell me where did they talk about this so tell me what episodes talked about these topics and so on so what you're doing whenever um and whenever an episode is done you're feeding it first through a model that transcribes the audio then you're chunking it up um feed it through embeddings models or maybe in a vector database and then you have kind of a rack style um way of you know When a query comes, create the embedding, look up the similarity search in your vector database, feed it to the model to get the answer. For something like this, let's say you started just building the flow in a Node.js application in a simple way. Just said, okay, here's the episode. I have something, it gets uploaded. Let's say you're uploading it to an S3 bucket, and there's an event whenever something gets uploaded to this bucket, you have an event that represents this, and then it starts a Node.js script or something like this. And this script is of the type that if it fails, somebody would have to restart it. Now, let's say you're trying to

to implement that with Restate. I would say approach it the following way. The first thing is get a handle of Restate itself. There's a cloud service that you can use on our site, which has a free tier. Either go there or just use one of these ways to run it yourself on a single machine with an EBS volume. Then you have the server there. Then put your Node.js script. Maybe you can actually put it on something like Lambda ECS. Use a server as an option to host this. And then tell Restate, use the Restate SDK to define the entry point. Tell Restate, okay, here's the service that you now should sort of durably manage.

so reset will then go there and discover this and understand okay hey there's this uh you know like what what do we call it like video transcriber or video um and better so service and then really knows about this um and then you can you would go to to your um to your amazon uh console and say okay for this type of event i want to create a webhook to reset so that it it makes an invocation to recent says okay this thing hasn't updated um you know the kind of event that would previously call directly your no.js process or script um you know you actually make it an http call to reset and reset with that call your process you've already gained one thing right away um if you've now basically have a reliable queue in front of it right like just just that if you don't do anything special so when the weapon comes it's going to be acknowledged back and reset has this thinking of your process of the crashes it will retry this it will actually give you a nice observability like much more than you get from like your average message queue about like individual retries um configuration about about timeouts and backups and timelines and so on um the next step you would actually then go into your script and say okay let's actually identify the steps where If something fails in the step or after that step, I don't want it to go back. Like let's say forking the process that does the transcribing or like calling the LLM to create the embeddings. You introduce then the reset context that you get by using the reset SDK and just say, okay, let me wrap these API calls just with reset.run. And that will capture the results of this durably and basically turn, you've now turned it basically into a workflow. Let's say you want to do something like, let's say you want to do something like,

parallelize the different steps. typing this one by one through this embeddings model is a little tricky thing, so you want to fan out. You could then go and say, let me try and do the exact same thing I do in a regular node processor, just make a bunch of function calls, record, like remember the promises, sort of a way to promise that all for those in the end, join the results, put those in the database. You can do exactly that in your code, just again anchor this in the reset context, so you get like this durable parallelization, durable stuff like scatter, gather, and so on. And so you would then incrementally sort of like rewrite your code to say, okay, let's actually make this step durable, let's make that step durable, that step durable. So here's the next thing, maybe one of your folks wants to approve it before it really goes out.

um you then um possibly say let's do that in the simplest most possible way we just create uh we create an like an awakable or a durable promise and um and reset and say okay somebody needs to complete this actively like send an event then to make a make an http call us to complete this and say okay this is approved go through or no this is not approved like a board um you can then use for example you could put the you could put the result of transcription just in reset state somebody could look at it from the ui and then say okay yeah i'm making a and making an adi call here to prove this and continue so you can then incrementally build your process uh rebuild your process into durable steps As the next thing, you can then, for example, take it and migrate it from a long-running process to a Lambda function. Because one of the nice things you have with durable execution is when it's waiting for something else to happen, it can actually just make this thing go away. Because with durable execution, it knows how to recover it back to the place where it was by replaying the history of durable steps.

So you could then say, you know, if you're on vacation and you approve it a week later, you don't have like some process running and waiting for it. It's like it's going to go away. And when the approval finally comes, it's going to come back. Use the durable steps to replay back to the point and then do the remaining steps. And so you typically focus with incrementally and rework their non-durable services. First connect them to basically get the equivalent of a durable queue and then like incrementally rework it and say, okay, I want to ask durable steps here. Maybe parallelization, maybe a signal. And I think that's typically how you approach it.

That makes a lot of sense. I do see also you have some guides on the website about how to implement certain things. I'm curious about the observability bit. Is that a part of your hosted offering? Is that part of the open source project? How does the business end fit in? Is observability part of that open core sort of thing? Yeah. So at the moment, at the moment, what you get in the open source is very broad. You get in the open source compared to the hosted offering.

pretty much everything except the fact that you would have you would self-host it and you know the whole authentication and api tokens and so on that that exists only in the managed offering but other than that we've started with an open source first approach so the open source has pretty much um the full suite at the moment the observability this there's two two things about observability and reset like number one it can actually give you an amazing amount of observability itself out of the box because It funnels all these durable steps through its consensus logs. It has all the information of what happened. It's not just function call, but like to the granularity of here's a step that happened or it's actually failed. This is the last step that completed in this failure. And since then I've retried so many times and this is the last exception I've seen. It has all that information available because it also is connected to the service and understands, okay, what type of errors are happening? Is this like a retryable error or not? And it gives you access to all that observability data in its own UI. It's actually a fascinating way that this is implemented. I can show you one or two technical details. Sure.

So there's this durable log that recalls all the actions. Then everything is indexed into Roxy V instances to sort of retain it in a scalable way. And we've built a SQL query engine using the data fusion project around this that allows you to basically do SQL queries against all of that invocation and transaction journal state and so on. So what the UI actually does is basically issue SQL queries. It's almost like back to the good old days when all your state was in a single Postgres database, and if you wanted to find out why your application is stuck, you just sort of open the SQL shell and start querying. And we kind of lost that, because we went into distributed microservices, and if you want to find out what happened, you now have to do a murder mystery with 20 services. Yeah, and bring it back. And we're kind of bringing it back, like your SQL query for the win, like for your distributed application state. So this is one of the things. You get an amazing amount of insights right out of just the restate journal. The second thing is because all the operations go through there, reset can also just, out of the box, generate open telemetry traces and spans for you. So you give it an OTEL endpoint that it should push those to.

um to just give you the the traces right away without um without you needing to configure anything you can then extend it and augment it with your own traces but yeah so those are the two things um the two things you can do and so the business end is basically cloud hosting for restate the business end is going to be a lot more than that but that's I don't think we can go into this yet. Interview us again in six months. Interview us again in six months. It's not ready to be announced. But what's available right now is most of it, what we have built is also the open source. So yes, on the business side, we do currently only hosting. For the next six months or so. Maybe. Fair enough. Cool. Well.

I think it sounds like a really cool system. I'm excited about this new world of durable execution functions and some way to slap a name on that that brings all of the junior engineers to the yard along with us seasoned engineers who have felt these pains for all these years. You know, like the serverless folk did. You know, they just said it's serverless and they're like, oh, okay, cool, serverless. Maybe I should try it. I feel like Restate and Friends need some sort of a marketing term to just...

simplify the overall concept of what you all are building. But I do think it's very interesting tech and very promising. I do like the term resilient apps, so I think maybe it's something with resiliency involved. But that's all for me, Adam. Any other questions from you before we let them go? I was liking durable, personally. I don't know if you want to wordsmith that a little bit here, but I like durable. I think that seems to have... So if you're interested, we've actually gone through a few iterations. We started with something, just calling it durable async await, because in many ways, that's what...

it's underneath the hook it's like yes durable asynchronous operations like a function vocation as an asynchronous operation made durable a step like that's sort of an asynchronous with the api call with the durable result so and and there were like some sort of like expert programmers that are like oh that's really cool i get it like you know it's like distributed durable event loops uh it's very cool um but then 90 percent of the folks did not get that right and we just went with durable execution and then it turns out that's a very that's a term that's maybe increasingly more recognized but it also undersells a little bit what we said yes because folks actually think like oh yeah so it does the same thing as temporary but actually does a bit more um so yeah we're we're still on the wordsmithing side like yes distributed durability resilient apps uh resilient distributed state management like there's so many things on the table um right at the moment um i used this earlier in the talk um like stateful durable functions is something we've used i think this is maybe increasingly getting recognized because of a lot of the efforts that let's say um cloudflare does with its work like durable objects um there's a construct in reset called a virtual object that is surprising amount of similarities with durable objects and we would have called a durable object if that term hadn't been trademarked by cloudflare um and azure azure durable functions is probably even closer to reset than temporal so if you i think you can actually think like temporal azure durable functions so reset is a bit more than that i think it combines a bit more of like orchestration and stateful logic even in a more flexible way than durable functions does yeah um but yeah so safe durable functions is where i've currently landed at um

But look, it's a journey. I think honestly, even Temporal hasn't figured that out after five years. Well, that's why I feel like it's a challenge that I think maybe, you know, restate shouldn't solve it. But I feel like maybe everybody who's in this category, like you need it. There's a missing category. It's almost like a style of application or an architecture, you know, where it's like, well, what architecture is it? Well, it's model view controller. Okay, it's MVC. I can build an MVC style app, you know, where this is like...

I don't know what to call it. I'm missing a word. But it's almost like, you know, it's restate style or something like maybe you have to turn it after yourself if you want to really own the market. That's durable function style or it's, yeah. Durable function doesn't speak to me personally at all. Sounds really boring. But that's just me. I mean, it's working on other folks. Adam likes durable. Durable to me just sounds like cool. Stateful durable functions. That's what you said. Is that right? That's what I said earlier. Stateful durable functions. SDS. SDS style. Make an acronym or something like that. TDD. SDS. MVCS. Yeah, I mean, model view controller, it doesn't have any sort of appeal to it either on its face. So maybe that wasn't a bad example. Anyways.

We could continue to workshop it till we're blue in the face. But obviously you've been working on it longer than that. This is the year. This is the year of it. The year of the what? The year of whatever this is. The durable function. Whatever this is, it's the year. I feel there's something about durable in itself that's not recognized by lots of folks. I think you actually asked about that earlier as well. What does durable really mean? Maybe a stronger emphasis on persistent or so. But I think there's something to be said about resilience. I think resilience is a much more attractive word, generally speaking. And one that to me.

calls and says like is your app resilient i'm like oh i don't know if i want resilience so because durability can show somewhere whereas resilience is like you know what no matter what happens i'm gonna succeed i'm gonna i'm gonna try until i bounce back yeah and i'm and i think you're right in the sense of durability as a means to an end like it's very implementation detail if you wish i reset achieves resilience by doing a lot of fine-trained durable operations which make it easy to bring it back to a consistent state and that drives resilience there you go now you're getting your ass down love it now we're deep listen hey you know we have a fun place to hang it's called zulip Oh, that's true. And then if you have some ideas about this name or this world that Stefan is creating, then, you know, pile on, share your thoughts, all the good stuff. What else? What's left? Anything left unsaid about this durable, resilient world we're going to live in? What's unsaid about the durable world that we live in?

I think it's inevitable to come. The question is mostly in what shape is it coming? I think it's been worked on actually from multiple dimensions. They're like folks like us that work on this from the reset side, like here's a lightweight or a block that sort of is easy to integrate with other functions. I think that sort of the serverless folks and the Wasm folks are working on that from a different side, like saying, okay, hey, let's compile everything to Wasm and let the system sort of use the Wasm interpreter to snapshot things. And I think there's folks that kind of use container engines to implement this.

it's so the thing what they all share is just understanding of it's completely unsustainable to not have anything like this it's harder it's hard um it gets increasingly more important the more moving parts and the more asynchronous processes you have and i think if we all believe what the ai people tell us that like 80 of all this is anyway it's going to be some agentic stuff in two years and i think you've just like created an even bigger problem and an even bigger need for these type of systems So I think this is coming in one shape or the other. This is our sort of, our bet of how to best achieve it. And it's going to be fun to see. It's going to be fun to see what happens. There you go. Thank you so much for sharing the journey, sharing the love, sharing the things. Appreciate you. Thanks for having me. Cheers.

Okay, very fun conversation today with Stefan. Very big idea of resilient applications. Love the idea of restate. The idea of stateful, durable execution functions is awesome, but it's just four words too long for me. I do agree with Jared on the marketing challenge ahead, but resent applications. I'm down with that. I think you are too. If you haven't yet, check them out, restate.dev. Okay, big thank you to our friends over at Augment Code, our friends over at Retool, and of course, our friends over at Heroku, Heroku.com. Actually, I think it's Heroku.com slash Change Law Podcast. If you want to use the URL they gave us,

there you go but the next gen platform fur is coming and i heard it's awesome okay bmc thank you so much for those beats you are awesome we'll see you soon

Frequently asked questions

How long is this episode of The Changelog: Software Development, Open Source?

This episode is 1 hour and 40 minutes long.

When was this The Changelog: Software Development, Open Source episode published?

This episode was published on April 10, 2025.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this The Changelog: Software Development, Open Source episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.