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
- Unzip Redis Windows zip file
- Copy the Jedis JAR file
- Go to the 64bit or 32bit folder and start "redis-server.exe"
- Write a simple Java program that uses Jedis to talk to the Redis server
- That's it
This is what the program looks like:
This is what the output looks like:
Redis offers many of the things you'd have to look for in separate products like cache, expiry, key-value, flexible column-family store, load and data distribution, fault tolerance and more. You can also experiment with transactions, pub-sub, sharding, master-slave, persistence etc.
It cannot do super heavy data volumes (like multi-terabyte) as it's disk persistence is quite primitive, lacks complex querying and indexing features (which is a common limitation in NoSQL), multi-threading, more advanced/robust/consistent sharding/replication/distribution/expansion.
Having said that we as architects sometimes over engineer things or try to look for tools that can do everything well, which really ends up as "everything mediocre".
Some useful links:
Until next time!
Looks interesting, thanks for sharing.
ReplyDelete