Persistent Coroutine Workflows
Is your feature request related to a problem? Please describe.
It is a sketch of an idea of an alternative persistence approach to for the same problem the Temporal is trying to solve which could be easier to use than Event Sourcing. I think, the Event Sourcing pattern makes Workflows' versioning harder than it could be. Also storing and replaying the whole log seems ineffective and limits the Workflows' duration.
Describe the solution you'd like
For that you would need a language with the support for not only coroutines, but their suspension and serialization/deserialization at continuation points. Then instead of Event Sourcing the framework could persist the Workflows' coroutines states into the persistent storage.
If the Workflows' coroutines parts between the persisting continuation points are idempotent, then the Workflows would be consistent. For Workflows versioning a serialization format with an explicit schema could be used (e.g. protobuf). This would require the workflow definition to contain some sort of annotations: for each persistence point and every persisted field/variable, including nested coroutines which could also have their persistence points.
Describe alternatives you've considered
I know that this project is a successor to Orleans. I am not sure if I got that right, but looks like it also uses Event Sourcing, thus suffers from the same problems – https://dotnet.github.io/orleans/docs/grains/event_sourcing/index.html. Still, its documentation mentions async/await, but it looks like it is in the different context – https://dotnet.github.io/orleans/docs/grains/external_tasks_and_grains.html.
It looks like SecondLife was doing something like coroutines persistence: https://tirania.org/blog/archive/2009/Apr-09.html, https://secondlife.blogs.com/babbage/2006/05/microthreading_.html
I understand that you have probably invested a lot into the Event Sourcing approach and won't switch from it that easily, but still I want to know if this idea looks promising to you, considering you are tackling the same problem. I want to try implementing this approach for Kotlin, which does not support the required coroutine serialization at the moment.