Stephan Ewen's Avatar

Stephan Ewen

@stephanewen.bsky.social

Building distributed systems and data infra. Previously co-creator of Apache Flink (https://flink.apache.org/), now building Restate (https://restate.dev/) to make distributed apps more easily resilient and scalable.

948 Followers  |  490 Following  |  28 Posts  |  Joined: 18.12.2023  |  2.1037

Latest posts by stephanewen.bsky.social on Bluesky

Restate service handler written in Kotlin, showing how to implement a scatter/gather use case with few lines of code in a resilient way.

Restate service handler written in Kotlin, showing how to implement a scatter/gather use case with few lines of code in a resilient way.

Coming up in @restate.dev 1.3: Implement scatter/gather scenarios with ease, while keeping your application resilient to failures! Those sub tasks can fail, the orchestrator itself can fail, and yet this code will run to completion thanks to Restate "run to completion" semantics.

07.04.2025 19:10 โ€” ๐Ÿ‘ 5    ๐Ÿ” 3    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

That is a good part of the motivation why we created Restate.
We built Apache Flink before and even tried to use it for transactional use cases.

Restate is the transactional event-processing twin to stream processing. With an API that looks like durable functions/execution/state/rpc.

07.04.2025 14:05 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

Exploring @restate.dev as a replacement for some long-running, complex, asynchronous orchestrators currently implemented in Step Functions. This 2023 post resonates hard. Lambda chain -> Step Functions is an increasingly common migration but comes up short vs RPC/ECS restate.dev/blog/we-repl...

26.03.2025 18:10 โ€” ๐Ÿ‘ 5    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1

To visualize the state machine across services, you could export OTEL traces and use a tool like Jaeger to get the dependency diagram.

Future versions of the UI will have a timeline view, showing when what step was executed. That is not a state machine, but still helpful.

Is any of that helpful?

07.04.2025 13:53 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Persistent serverless state machines with XState and Restate Run state machines in the cloud, and suspend them when there's no work to do.

To develop with a State Machine, you can use XState with Restate.
See here for details: e.g., using it with XState. Is that
restate.dev/blog/persist...
๐Ÿ‘‡

07.04.2025 13:51 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

True, not having an explicit state machine is a pity, but also somewhat a feature: It works with implicit state machines and dynamic control flow, e.g, as a backend for AI Agents.

But there are ways to get state machines: ๐Ÿ‘‡

07.04.2025 13:49 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Wow, what a blast from the past.
Thank you for bringing that back ๐Ÿ™‚

This is from a talk "All roads lead to Rome" - hence the helmets.

25.03.2025 22:28 โ€” ๐Ÿ‘ 6    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Is this where we currently are?

13.03.2025 14:40 โ€” ๐Ÿ‘ 4    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Thank you so much for the kind words!

12.03.2025 23:30 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Restate 1.2: a distributed durable execution engine, built from first principles Restate 1.2 adds highly-available, distributed deployments and a graphical UI.

Restate is one of the coolest pieces of software I've encountered in quite awhile. Not often a tiny, well-crafted application comes along that forces you to fundamentally rethink software design.

18.02.2025 20:30 โ€” ๐Ÿ‘ 9    ๐Ÿ” 3    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Preview
The Anatomy of a Durable Execution Stack from First Principles The architecture of Restate, a Durable Execution engine built from the ground up.

This post from @stephanewen.bsky.social is *really* thought provoking. Their architecture seems to unify both database and stream processing architecture into one thing.

I'm not totally sure what the implications of this are yet, but it seems important.

27.02.2025 17:31 โ€” ๐Ÿ‘ 17    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Itโ€™s really impressive! I almost went down the path of building a stateful functions implementation in Rust but discovered how much scaffolding was required to be useful. Really happy to see you all have put those pieces together with Restate!

27.01.2025 13:38 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

It has been quite a journey from Stateful Functions to Restate - and while Restate can do a lot more, the Stateful Functions roots are quite visible, specifically in the Virtual Objects Api.

27.01.2025 13:21 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Thank you so much for the kind words!

27.01.2025 13:20 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
A Gentle Introduction To Restate
YouTube video by Ahmed Farghal A Gentle Introduction To Restate

Restate is much simpler than Flink, however, grasping what it does isn't straight forward given how differently it works. This tutorial is fantastic and worth the time:

26.01.2025 20:49 โ€” ๐Ÿ‘ 6    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

But I would agree that BookKeeper is an underrated piece and a hidden gem of distributed systems design.

25.01.2025 13:02 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

One reason why Restate mentions Delos frequently is because our lead runtime architect worked with Delos before and adopted the vocabulary. Plus Restate internally has the heterogeneous loglet chain abstraction.

25.01.2025 13:01 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Totally - I learned a ton from the BookKeeper design and your blog posts and there is a lot of similarity to Delos. We discussed this a lot internally.

25.01.2025 13:01 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Apache BookKeeper Insights Part 1โ€Šโ€”โ€ŠExternal Consensus and Dynamic Membership Series Introduction

Regarding Restate and its distributed log, many people talk about Delos but Apache BookKeeper is also highly relevant/similar, so I like to remind people that it also exists! I've written extensively about how BookKeeper works if you're interested:
1\ medium.com/splunk-maas/...

25.01.2025 08:27 โ€” ๐Ÿ‘ 12    ๐Ÿ” 3    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

That is exactly right - what would be a better term? There is some simplification of the coordination happening here, because it centralizes it - like updating the state under a lock.

25.01.2025 12:54 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

That's a fair comment - maybe the better way to phrase this is replacing different forms of coordination with multiple independent systems, with one type of coordination, which can be also pretty transparently abstracted in the application, so you keep coordination out of your code.
Would that work?

25.01.2025 12:50 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I guess the headline is brief - I would phrase it as every system is a log and and interpreter of events stored in the log (in the broadest sense).

25.01.2025 12:45 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Maybe the biggest one is the per-key granularity in Restate, and what is conceptually conditional appends (only append if no newer retry subsumed event handler).

This can be built on top of the log (in Restate its above the physical log partition layer), but more efficient if tightly integrated.

24.01.2025 19:57 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1
Post image

I have this slide from a presentation at Kafka Summit / Current about that.

24.01.2025 19:53 โ€” ๐Ÿ‘ 3    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Great stuff. I'm watching the durable execution space closely and personally I'm quite bullish on it. I'll be writing my own thoughts on durable execution soon.

24.01.2025 16:57 โ€” ๐Ÿ‘ 23    ๐Ÿ” 3    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Every System is a Log: Avoiding coordination in distributed applications Distributed coordination makes application complex and brittle. Because all systems eventually build on logs, we can use a shared-log approach to eliminate most coordination. We discuss this conceptua...

๐„๐ฏ๐ž๐ซ๐ฒ ๐’๐ฒ๐ฌ๐ญ๐ž๐ฆ ๐ข๐ฌ ๐š ๐‹๐จ๐ 

Here is an idea on how to drastically ๐ซ๐ž๐๐ฎ๐œ๐ž ๐œ๐จ๐ฆ๐ฉ๐ฅ๐ž๐ฑ๐ข๐ญ๐ฒ ๐š๐ง๐ ๐œ๐จ๐จ๐ซ๐๐ข๐ง๐š๐ญ๐ข๐จ๐ง in distributed apps.

A fun way to look at this is similar to the idea of Turning the Database Inside Out - like Turning the Microservice Inside Out.

restate.dev/blog/every-s...

๐Ÿ‘‡

24.01.2025 13:14 โ€” ๐Ÿ‘ 53    ๐Ÿ” 13    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 5
Post image

But how is this practically usable? Our DBs and queues aren't built like this. How do we strike a sweet-spot between this model (great consistency) and maintaining healthy decoupling and separation of concerns?

The blog post discusses that and how it inspired our work on @restatedev.bsky.social

24.01.2025 13:14 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Applications coordinate with many systems (DBs, queues, locks, schedulers, ...) which are all logs underneath. Each maintains its own ground truth, without common order or conditions.

By letting all those logs build on top of a common log, many dist. sys. problems in apps virtually disappear.

๐Ÿ‘‡

24.01.2025 13:14 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Every System is a Log: Avoiding coordination in distributed applications Distributed coordination makes application complex and brittle. Because all systems eventually build on logs, we can use a shared-log approach to eliminate most coordination. We discuss this conceptua...

๐„๐ฏ๐ž๐ซ๐ฒ ๐’๐ฒ๐ฌ๐ญ๐ž๐ฆ ๐ข๐ฌ ๐š ๐‹๐จ๐ 

Here is an idea on how to drastically ๐ซ๐ž๐๐ฎ๐œ๐ž ๐œ๐จ๐ฆ๐ฉ๐ฅ๐ž๐ฑ๐ข๐ญ๐ฒ ๐š๐ง๐ ๐œ๐จ๐จ๐ซ๐๐ข๐ง๐š๐ญ๐ข๐จ๐ง in distributed apps.

A fun way to look at this is similar to the idea of Turning the Database Inside Out - like Turning the Microservice Inside Out.

restate.dev/blog/every-s...

๐Ÿ‘‡

24.01.2025 13:14 โ€” ๐Ÿ‘ 53    ๐Ÿ” 13    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 5
Post image

This is why we are building software and open-source communities. To get such messages from users, the best possible reward.

Kudos to the entire @restatedev.bsky.social team.

23.01.2025 11:51 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@stephanewen is following 20 prominent accounts