Hi, I am evaluating the use of playfab and have a question regarding storage of player data.
The docs suggest the use of entities for new titles but the usage limitations for it are confusing to me.
Entities: 5 json objects of 1,000b size
Key Value: 1,000,000 bytes for k/v pairs
I saw entity files as well, but we are not storing huge amounts of data.
1,000b is not a small amount but also not a huge amount either. We want to store the following data:
SaveGUID | Unique id to identify the save |
GameVersion | Latest version of the app used to save the game |
PlayerXP | The amount of xp the player has for the current level |
PlayerLevel | The current player level |
Hero Levels | [hero_id][hero_level] map If hero_level is 0, that hero is not unlocked |
World Progress | [world_id][max_level_completed] map Indicates what levels are completed on each world |
Talent Levels | [talent_id][talent_level] map If talent_level is 0, that talent is not unlocked |
Certain things like SaveGUID / GameVersion / PlayerXp, PlayerLevel seem to be more efficient to store as a simple key/value pair.
The maps would be ideally stored as json (as to be human readable) but if the limit per blob is 1000b then it makes me pretty cautious to store it that way. For example:
{ "WorldProgress": { "0": "50", "1": "30", } }
So this is 70~ bytes (mostly because of the syntax of json, but having a label "WorldProgress" makes this blob much more human readable.
To optimize that, should we do something like (strip the label, use comma to separate key/value). In that case it's almost like just use proto or binary instead of json.
{ "0": "0,50,1,30" }
So am I missing something here? It seems key / value allows much more storage (up to 1,000,000b) versus just 3 json objects and we need to be really careful of how to store them.
Thanks for the help