question

daniel@penseit.com avatar image
daniel@penseit.com asked

locking Tile or Group Data to update safely

Hi,

 it is necessary to lock Tile or Group Data to update safely? If so, how can I do this?

Thank you!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

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.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

daniel@penseit.com avatar image
daniel@penseit.com answered

Ok! Thank you for your help.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.