The NoSQL movement has produced a range of contenders for the crown of “best cloud data store,” and one of the prime candidates, Redis, was updated to 2.0 on Monday. It adds the ability to store hashes, support for saving datasets to hard drives, and new blocking pop commands to allow clients to safely change data without interference.
The commands BLPOP and BRPOP were added to support popping from a list in a blocking fashion. This means the client connection will be blocked for a certain amount of time until another client pushes an item on a list. These commands are frequently used in producer/consumer scenarios.
Redis’ short history is dotted with corporate sponsors. In the past, Citrusbyte and Engine Yard both channeled funds to the development of Redis. Today, however, VMware is the primary sponsor of the project.
Tom Mornini, CTO of Engine Yard, said the primary reason his company was involved with Redis was its flexibility as a data store. He said Redis’ creator, Salvatore Sanfilippo, is incredibly focused on simple, small, stable code.
“The real thing I like about it is there’s a tug-of-war in developers’ minds between transactionality and speed,” said Mornini. “SQL databases have always had transactionality in spades, but they don’t scale horizontally.
“Most of the key value pairs that do scale are eventually consistent. The interesting thing about Redis is [Sanfilippo] drew a fine line in making the design of the server and its evented model. He provides extremely high throughput, which reduces the need for large-scale parallelism, which allows for transactionality in a very consistent manner. You don’t have to work through the concerns of ‘What if two people change this key simultaneously?’ because that’s impossible in Redis. Normally that would be a performance bottleneck, but because of its design, you never run out of processor, you run out of network ports first.”
That’s a big difference between Redis and other NoSQL databases, said Mornini: Redis is a jack-of-all-trades. “One of the best descriptions I’ve heard is that it’s a network-accessible CS101 data store server,” he said. “It’s not just ‘throw it in a key and get it back,’ it’s a list server, a hash server, a test and a set server, all these basic primitives that are required to build highly distributed transactional applications.”
Engine Yard was initially a sponsor of Redis because the company wanted to implement virtual memory in the NoSQL database. With Redis 2.0, that work has been completed. VMware has now taken the reins of dictating features through funding.
For this version, the big changes were focused on extending the capabilities of the server itself. The addition of publish/subscribe functions and the new blocking pop commands allow developers to use Redis more like a message queue than a key-value store. The publish/subscribe commands, in particular, allow information stored in Redis to be pushed out to necessary services when changed.
Finally, version 2.0 adds MULTI/EXEC commands that allow developers to queue up functions to run in serialized order. Once queued for execution, no other user actions can be inserted into the command chain, ensuring developers a method of executing their actions in an exact order without interruption.