forked from redis/redis-rb
-
Notifications
You must be signed in to change notification settings - Fork 0
REmote DIctionary Server Overview
ipoval edited this page Aug 24, 2011
·
3 revisions
– disk-backed in-memory database
- Very fast, key / value, NoSQL store
- Implementation: C / C++
- Communication protocol: Telnet
- Persistence: Snapshotting, AOF
- Replication: Master-Slave
- Atomic operations: Yes
- Expiration: Yes
- Usage: Rapidly changing data with a foreseeable database size (should fit mostly in memory)
- License: BSD
- Authors: Salvatore Sanfilippo, Pieter Noordhuis
- Main site: http://redis.io
- Support of many different abstract types:
Strings, Lists, Sets, Sorted Sets, Hashes
-
How to Install:
brew install redis
-
How to Start it Up:
redis-server /usr/local/etc/redis.conf
- We have an online game with a zillion of users. We want to display a leader board in real time. Every time an user plays a game, if it’s his best score, perform update:
ZADD board 10000 player123
. To display the leader board:ZREVRANGE board 0 99
. Sorted sets are very powerful and can substitute with much better performance manySELECT * FROM ... ORDER BY ...
queries.