This post is less of a “help” and more of a “sanity check”.
Given the known caveats of persistence is it insane to consider swapping persistence strategies throughout the lifecycle of an actor?
MOTIVATION:
Maximize the amount of time new users can experiment with my application BEFORE requesting any kind of account creation.
PROGRESSIVE PERSISTENCE STRATEGIES:
- Cookie – Store things locally while user is experimenting with basic features
- Prompt sign-up after initial tasks are completed
- Redis Cache – DB storage allows users to access their state from other browsers. No risk of losing data if they clear cache locally
- User joins a multiplayer game
- PartyKit Live Actor – Once upcoming PartyKit integration is available, individual player actors can communicate with a shared machine context
Actors can persist their internal state and restore it later. Persistence refers to storing the state of an actor in persistent storage, such as localStorage or a database. Restoration refers to restoring the state of an actor from persistent storage.