Created
February 5, 2015 17:58
-
-
Save mmcdaris/af3ede874257c38d7d53 to your computer and use it in GitHub Desktop.
Simple Redis ScoreBoard with a sorted set
This file contains hidden or 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
127.0.0.1:6379> ZADD FEB-SCORES 0 "JP" | |
(integer) 1 | |
127.0.0.1:6379> ZADD FEB-SCORES 0 "MORGAN" | |
(integer) 1 | |
127.0.0.1:6379> ZINCRBY FEB-SCORES 10 "MORGAN" | |
"10" | |
127.0.0.1:6379> ZINCRBY FEB-SCORES 20 "JP" | |
"20" | |
127.0.0.1:6379> ZREVRANGE FEB-SCORES 0 -1 WITHSCORES | |
1) "JP" | |
2) "20" | |
3) "MORGAN" | |
4) "10" | |
127.0.0.1:6379> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ZADD is what we can run when a user opts in
ZINCRBY is what we can use when they complete their daily scrum
ZREVRANGE will give us the scoreboard data!