Redis is an advanced key-value store that supports additional data types like lists, sets, sorted sets, and hashes. It offers features like persistence, replication, atomic operations, and high performance - often handling over 100,000 operations per second. While simple like memcached, it adds additional commands, data types, and persistence. Common uses include caching, sessions, pub/sub, and building unique applications and services.
4. memcached
The canonically simple example
a networked “hash in the sky” behind a simple
protocol
Values
page:index.html <html><head>[...]
user:123:session xDrSdEwd4dSlZkEkj
login_count “7464”
user:100:last_login_time “102736485756”
Everything’s a string (or a “blob”)
Commands just set or get data (mostly)
34. Atomicity
Redis is single threaded
No locking necessary
In other words, commands like INCR
won’t tread on each other’s toes coming
from multiple clients simultaneously!
36. Redis Factoids
BSD licensed (free, open)
Sponsored by Vmware
Written in ANSI C
Good community (list, IRC & wiki)
Works on all POSIX-complaint UNIXes
37. Performance
Depends a lot on configuration and operation
complexity.
Common range from 5000 to120,000 rps for
basic ops. GET/SET/LPUSH/LPOP, etc.
(ultra low end to high end hardware)
comparison with other no-sql implementations
http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis
38. Persistence
Dump data to disk after certain conditions are
met. Or manually. SAVE and BGSAVE commands
AND/OR
An append only log file
(which can be optimized/rebuid automatically) but needed to set this up in a config file
39. Language Support
Ruby, Python, PHP, Erlang,Tcl,
Perl, Lua, Java, Scala,Clojure,
C#, C/C++,JavaScript/Node.js,
Haskell,IO, Go
40. Missed a lot, now where?
Google “redis”
for the great official site
http://www.redis.io