Is there a way to log changes made to User Data? UpdateUserData doesn't seem to register an event. The concern is around being able to roll back to a previous version of the data, in case of bugs. Is there any way to get the history of all changes?
Is there a way to log changes made to User Data? UpdateUserData doesn't seem to register an event. The concern is around being able to roll back to a previous version of the data, in case of bugs. Is there any way to get the history of all changes?
We do a daily backup of all data in PlayFab to protect against catastrophic failure of all availability zones in AWS (exceedingly unlikely, but the belt-and-suspenders approach is never wrong - at least, when it comes to engineering). But we don't provide a 'roll back to previous version' for data, and user data can be fairly massive, which would make it impractical to make an event in the service. In order to protect yourself against potential bugs and recover your user's data when if something should happen, there are a couple of things you can do:
First, use a schematized data set in a JSON format (or similar). That way, if you introduce a new element, it's distinct in the schema and won't impact other data (or at least shouldn't - see the next item).
Second, if you want to be extremely safe, "rotate" your data when you version your schema. In other words, say you write your player save to a key named "Save". Add a revision number to that - "Save.1.0", for example. Then, when you revision your data system, load that data and update it to the new version, in a separate key ("Save.1.1"). Obviously, you'll want to use as few keys as you can, and clean up old ones as you go (older than the last one, that is), but that's a good thing, since fewer large keys are more efficient than lots of small keys, in terms of query times. But this way, if you introduce a change which causes an issue with your user data, it'll be easy to roll back to the previous version.
1 Person is following this question.
Is PlayFab (and its Player Entity Data system) able to support my city builder game?
How to import and export user's data from Playfab?
Frequently change title data by players (Online jackpot feature)
Find Parameters of Executed Function for Clients
What would be the best way to sync user database with external analytics database?