Hi,
it is necessary to lock Tile or Group Data to update safely? If so, how can I do this?
Thank you!
Hi,
it is necessary to lock Tile or Group Data to update safely? If so, how can I do this?
Thank you!
Locking isn't viable with shared data in an online service where you have a large number of players. What this would cause is delays in the play experience as clients have to back off and re-try their writes over time. At scale, this can lead to conditions where players aren't able to update the data at all, bringing the player experience to a halt.
When writing to data in a backend service from multiple sources, it's important to make sure that either a) you don't mind writes stepping on each other, or b) you're writing to distinct keys which can then be used to aggregate the info later. For example, if you have a clan-like system, you would write to the clan data using the PlayFab ID of each player as part of their Key. That way, two different players writing to the shared data space can't overwrite each others' updates.
No one has followed this question yet.