Skip to content

Persist and restore state without recorded event history #125

@mc-allen

Description

@mc-allen

Hello, thanks again for providing this library, it is super helpful!

In my use case, I frequently need to persist the state of my statechart from one thread and restore it another thread, on a different host, and the statechart will be "running" for very long periods of time, with many state transitions over the course of its lifetime. I see the event recording approach in the docs, but I'm wary of this approach due to the unbounded list of recorded events, and my need to frequently store these events and process them. Over time, this list could become very long and unmanageable/expensive.

An approach more like "Structure + configuration" or "Persisting state - serializing all internal data, active states, variables etc. from original StateMachine and applying them to restored one" would be more in line with what I need for my use case. Is there any way to approach this with what kstatemachine offers today? If not, this would be a very useful feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions