question

dominiquecanzeri avatar image
dominiquecanzeri asked

preventing multiple linked devices from logging to playfab

hello,

I'm trying to figure out a solution on how to do this with playfab.

i've read past threads that talk about this:

https://community.playfab.com/questions/487/206936647-How-to-Prevent-Users-from-Logging-in-on-Multiple-Devices.html

https://community.playfab.com/questions/382/206721757-How-to-prevent-duplicate-login-.html

they date from 2015 and 2016.

2020 is upon us soon, and I was wondering if playfab finally managed to provide a solution for this.

The proposed polling solution is not good, as playfab userData is not atomic.

since it takes minutes for playfab to replicate the data on all the "shards", this would be added on top of the 2 minutes suggested in the solution above.

I think this is unacceptable.

Ideally, I would like to simply invalidate all active sessions with the latest one. Surely, this is something that playfab could handle?

if it's not possible on your end, how to you propose we do it?

thanks!

1 comment
10 |1200

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

dominiquecanzeri avatar image dominiquecanzeri commented ·

trying to answer my own question :)

could I use GroupSharedData? it seems it's unsharded, so it would work.

maybe?

0 Likes 0 ·
Citrus Yan avatar image
Citrus Yan answered

Sorry, the functionality of allowing titles to choose whether they allow users to have multiple simultaneous logins hasn’t come out yet, and there is no ETA on that right now.

And, you’re saying that it takes minutes for PlayFab to replicate the UserData on all shards, however, the truth is that UserData are not sharded as Title Data, so you don’t need to worry about adding on top of the 2 minutes in that suggested solution. For now, I would still recommend the solution provided by Brendan.

By the way, you are talking about using SharedGroupData, how would you plan to implement that specifically? I am wondering if I can give you some help with that.

10 |1200

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

dominiquecanzeri avatar image
dominiquecanzeri answered

I read that SharedGroupData is uncached and unsharded, which I interpret as anyone in the group can obtain the real value immediatly.

I guess the idea is the same as Brendan's, but using SharedGroupData, since it's more reliable.

UserData is not reliable, as SethDu mentioned in a previous question I asked:

https://community.playfab.com/questions/36372/conditional-updateuserdata-with-dataversion.html

1 comment
10 |1200

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

Citrus Yan avatar image Citrus Yan commented ·

Reading the doc: "Shared Group Data is a simple way for players to share some information with a tightly constrained list of other players." However, in your case, technically speaking, multiple linked devices are considered as a single player, therefore, I don't think the concept of Shared Group Data fits your scenario.

I think the key feature you prefer is the capacity of concurrency control, which is provided by the Entity Programming Model. Using the SetObjects API, you can specify the previously returned value of ProfileVersion(VersionNumber) from GetProfile API, in this way, you can ensure that the object set will only be performed if the profile has not been updated by any other clients since the version you last loaded.

0 Likes 0 ·
dominiquecanzeri avatar image
dominiquecanzeri answered

hello,

I know Shared Group Data is not meant for handling multiple connection. But I think it does fit my scenario. My tests so far seems conclusive.

I didn't know about the entity programming model. I will definitly look at it.

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.