-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 3 proposal: Store optional member data in a single hash
This has the benefit of not using a separate hash for every single member's data. As is updated in the documentation, you can store more data for a given member by, for example, encoding a Hash in JSON. Not only will this save on Hash-splosion if using member data in a leaderboard, it also means that when deleting a leaderboard, we can also delete ALL of the member data at once. In version 2.x, if using member data, you would have to go through and delete the member data hashes individually. Yikes!
- Loading branch information
David Czarnecki
committed
Sep 16, 2012
1 parent
9374a01
commit db1776e
Showing
4 changed files
with
39 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db1776e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgadbois Any thoughts on this proposal for version 3 of the gem? I neglected at the time to consider the implications of the large # of hashes and having to cleanup member data in an easy way when you remove a leaderboard.
db1776e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I didn't anticipate that either. I like passing a hash as the member data and having leaderboard conver it internally vs having to pass in a JSON string. Are you just trying to allow more flexibility in the type of member data?