eigr / spawn

Spawn - Actor Mesh
Apache License 2.0
283 stars 13 forks source link

[Feat] New implicit Actions #242

Open sleipnir opened 1 year ago

sleipnir commented 1 year ago

Describe the feature I would like to propose two new implicit actions. checkpoint and restore they would be responsible for managing the state of the actor with a finer granularity.

Why would that be important to you? Better manage the state

Additional context Checkpoint would save the state synchronously. Restore would be used to replace the actor's current state with another revision entered by the user. This would depend on statestore support

Also this should serve as a continuation of the work done on #231

It would possibly require a new type to pass the revision information. For example, when calling the checkpoint action, the actor could return the status of the operation in addition to the current revision number. Similarly to calling restore the user should be able to see which revision he wants to return. I propose that we create different protocol files to store this type instead of the protocol.proto file because I understand that this can be treated as an extension of the original protocol, thus facilitating the implementation by the different sdks

sleipnir commented 1 year ago

Ping @eliasdarruda @marcellanz