Restate cancellations
Okay okay, I made fun of restate before but this is kind of cool: https://restate.dev/blog/graceful-cancellations-how-to-keep-your-application-and-workflow-state-consistent/ having built event sourcing systems before I can appreciate how cool this is. I wonder if it’s possible to build something like this in convex.. :microsoft_thinking:
Restate
Graceful cancellations: How to keep your application and workflow s...
With graceful cancellations, it is now possible to stop service invocations and workflows while keeping the overall application state consistent.
3 Replies
Wouldn’t be able to hijack the JS runtime like restate or Temporal do but I think it probably could be replicated with a data structure of some kind
Yep. @sujayakar and I were chatting about some stuff here recently. He can probably talk about it more.
Also as an aside: We did at one point prototype journaled functions like restate/temporal.
Fundamentally since Convex has scheduled functions (which are durable) you should be able to model all of this.
The cool thing conceptually here in restate is terminal errors and compensation code paths. That's essentially helping you do rollbacks for side effects. But as they admit that is frought with issues. You really need to be working with services that you know will have the necessary semantics (e.g. free cancellation for flights etc.).
Ah this is all true. Would love to have a chat more about the possibilities that convex opens up for event driven applications