Archive for the ‘Jedis’ Category

Redis (and Jedis) – delightfully simple and focused NoSQL

Sunday, March 4th, 2012

Redis (and Jedis) – delightfully simple and focused NoSQL by Ashwin Jayaprakash.

A very nice reminder that Redis may be the solution you need.

Redis is an open source NoSQL project that I had not paid much attention to. Largely because it didn’t seem very special at the time nor did it have a good persistence and paging story. Also, there is/was so much noise out there and the loudest among them being Memcached, Hadoop, Cassandra, Voldemort, Riak, MongoDB etc that it slipped my mind.

Last weekend I thought I’d give Redis another try. This time I just wanted to see Redis for what it is and not compare it with other solutions. So, as it says on the site:

Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

Seemed interesting enough to warrant another look. There are so many projects that need:

  • Simple, fast, light
  • In-memory (with optional checkpointing)
  • Fault tolerant / Sharded / Distributed
  • Shared access from many processes and machines
  • Some real data structures instead of just wimpy key-value
  • Flexible storage format – without needing crummy layers to hide/overcome limitations
  • Clean Java API

So, I downloaded the Windows port of Redis and Jedis JAR for the Java API.

  1. Unzip Redis Windows zip file 
  2. Copy the Jedis JAR file
  3. Go to the 64bit or 32bit folder and start “redis-server.exe”
  4. Write a simple Java program that uses Jedis to talk to the Redis server
  5. That’s it