vstirbu/fsm-as-promised

Suspend/Resume state machine

vstirbu opened this issue · 2 comments

This feature would enable a state machine object to be suspended. Ideally the state machine should have a suspend method that returns an object containing the current state as well as the internal state.

A suspended state machine can be resumed using the object returned by the suspend method.

Curious about what is the use case for this feature.

On Saturday, 29 October 2016, Vlad Stirbu notifications@github.com wrote:

This feature would enable a state machine object to be suspended. Ideally
the state machine should have a suspend method that returns an object
containing the current state as well as the internal state.

A suspended state machine can be resumed using the object returned by the
suspend method.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#56, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABeCB6Sl4O23OBJIBI3lM_088s5atDkHks5q4k-WgaJpZM4KjyYY
.

Basically, I want the application domain state to be saved on each successful state change so that I can restore the state machine object later on, in case the process/hardware crashes. So, I'm looking for an enabler for high availability/fault tolerance.

Of course this can be done in do it yourself fashion but I want to see if we can identify a pattern here. Maybe the suspend is not a good name but the intent is to have something that formalises capturing the current state and the object properties that are essential to recreate the state later.