I have a question about the implementation code in the documentation for Bucket Leaderboard.
According to the documentation, my understanding is that we create an infinite tournament, and all users join this tournament. However, each user maintains a bucket data structure, which contains user IDs filtered by the bucket, based on random or other rules. In this way, the user IDs in the bucket data structure form a bucket leaderboard.
My question is, in the code, this data structure is stored under the current user ID. For example, when Player 1 joins the leaderboard, and we allocate Players 2, 3, 4, 5, along with Player 1, to form a bucket, we then add [P1-P5] as a bucket data structure under P1. However, for P2, P3, P4, P5, shouldn’t they also see the same group? Do we need to create the same bucket for P2-P5 as well? Otherwise, when P2 also tries to join the leaderboard, if he doesn’t have a bucket data structure, a random bucket might be created, and in the end, P1 sees P2 added to his group, but the bucket that P2 joined is completely different from what P1 sees.
If it’s not like this, did I misunderstand something? Are bucket data structures bound to a specific user?
After watching the video of the bucket leaderboard: https://www.youtube.com/watch?v=VbVEMsmJ3ds&ab_channel=HeroicLabs seem like the code is different with the document, where i can find the corresponding repo and sample which used in the video?