September 3, 2010 Redis 2.0
unnoticed. There are many interesting features. Some of them expand the boundaries of advanced key-value storage to queuing and more. Translation of the list of new features from the Redis website:
Redis 2.0 release is the main stage in the development of Redis. Apart from the endless list of new features, there are several major ones that deserve special mention.
It is worth mentioning that Redis 2.0 has just reached its first stable release, Redis 2.2 is close to freezing new features, so be prepared for new delightful pieces soon!
MULTI / EXEC
The MULTI / EXEC command family was added to fill the need to execute several commands as one atomic unit (from the translator: in general, this is an analogue of transactions in ordinary databases). Because all the commands inside the MULTI / EXEC block are serialized and executed sequentially, it is impossible for another client request to be executed in the middle of the execution of this block. All commands are executed one after another when EXEC is called. This ensures that either all commands are executed, or none, regardless of the connection status with the client.
More about MULTI / EXEC:code.google.com/p/redis/wiki/MultiExecCommand
Note that the WATCH, CAS (check and set) MULTI / EXEC version will be available in 2.2.0 and is not part of 2.0.0.
The BLPOP and BRPOP commands have been added to allow selection from the list with blocking. This means that the connection with the client will be blocked for a certain time until another client adds an item to the list. These commands are often used in a producer / consumer scenario.
More about blocking pop:code.google.com/p/redis/wiki/BlpopCommand
Publish / Subscribe
The publish / subscribe command family allows the client to post messages to the feed and subscribe to receive all posts that are posted to the feeds. It also includes commands that allow you to receive all messages for which the channel corresponds to a given pattern.
Read more about posting / subscribing:code.google.com/p/redis/wiki/PublishSubscribeantirez.com/post/redis-weekly-update-3-publish-submit.htmlrediscookbook.org/pubsub_for_asynchronous_communication.html
This is a new data type that allows you to save multiple keys / values in one key. Along with a list of regular teams you would expect for this type (HSET, HGET, HDEL, HLEN, HKEYS, ...). It is also possible to use the values inside the hash for any SORT operations.
More about hashes:code.google.com/p/redis/wiki/HsetCommandantirez.com/post/redis-weekly-update-1.html
Redis Virtual Memory allows users to grow their data set beyond their memory.
More on virtual memory:code.google.com/p/redis/wiki/VirtualMemoryUserGuideantirez.com/post/redis-virtual-memory-story.html
Original article: code.google.com/p/redis/wiki/Redis_2_0_0_Changelog