Redis, my new open source project

Friday, 06 March 09

I think it's the first time I talk of Redis in this blog, but for sure it is not the last: Redis will be the target of my hacking sessions for the next years, I hope.

So what's Redis about? It is a key-value database, but it is a bit different than memcachedb (a persistent version of memcached) and many others, since it's a bit an higher level business. For instance with a many key-value persistent databases you can do things like this:
SET mykey foobar
GET mykey
DEL mykey
And other similar operations in order to make locking free algorithms simpler like set-if-not-exists operations and so on. What's different about Redis is that the value can be a String data type, but even a List or a Set. You can push/pop elements, perform intersections between sets, and so on. For instance:
LPUSH user_100_messages "Indeed, you are right!"
LPUSH user_100_messages " .... "
LRANGE user_100_messages 0 10
The first two operations will push elements into a list, the next one will return the first 10 elements of the list. You can also add/remove elements from Sets, and ask for the intersection of N sets.

The SVN version of Redis supports master <-> slave replication, and I'm working to auto-expire of values. Redis is young but it will improve, and thanks to skilled people we have clients for Ruby, Python , Erlang, and soon PHP.

You can get more information and the source code here:

If you plan to use it make sure to subscribe to the google groups. Another way to stay updated about Redis progresses is to follow my Twitter account. Every feedback is appreciated.
Posted at 18:23:06 | permalink | 10 comments | print