Redis 2.0.0 is around the corner, but many of us are already using 1.3.x even in production. The new version has a lot of goodies, and of special interest for libraries that map objects to Redis is the hash data type.
By using hashes, Ohm is able to squeeze all the object attributes in a single key instead of using one key per attribute, a common pattern in key/value datastores (for some history, check the article that inspired Ohm almost one year ago: case study for a Twitter clone).
This release candidate uses Redis-rb 2.0.0.rc3, the new client that is faster, binary safe and no longer relies on method_missing for building the commands.
Upgrading your database
You will need to migrate your database if you want to use Ohm 0.1.0. It comes with a helper just for that, follow the example code to upgrade.
You will also need Redis 1.3.10 or newer, grab it from http://github.com/antirez/redis.

{ 0 comments… add one now }