Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Redis + RDBMS use cases?
2 points by kermatt on April 17, 2012 | hide | past | favorite | 3 comments
I have seen a few instances of projects establishing or moving to a Redis + PostgreSQL combination, instead of a pure NoSQL platform.

I am curious to know from those who have implemented this, what was the idea behind the design, and what problems did such an implementation solve?



To me the question betrays a fundamental misunderstanding of NoSQL. For the most part, NoSQL isn't a categoric replacement for relational databases but rather an additional set of potential tools. For a lot of system, you'll only need a single solution, and a given NoSQL product might provide a number of benefits over relational databases. There are, of course, benefits to a single solution, like simplicity.

However, there are solutions that relational databases tend to be better suited for than most NoSQL solutions. Compared to a number (but certainly not all), NoSQL solution, RDBMS tend to provide better ACID guarantees. They were also meant to work well with data on disk, versus only data in RAM. They are obviously suited for highly structured data. Finally, the biggest advantage in my mind is reporting. You can argue that map reduce is more powerful and, properly implemented, scales infinitely better, but for people not dealing through terabytes of data a day, relational databases are better for reporting simply because they have better tooling. Not only is the tooling support (like excel) better, it isn't uncommon to find a business analyst tweaking a GROUP BY or WHERE clause to achieve what the want.

Why pick redis + something? Two common cases: large data, ad-hoc querying. If you are doing a time series, you'll often see people store just the ID in a redis sorted set, get the range of Ids they want, then go to something else and pull out the full records based on those ids. This can be a must-implement solution if you are dealing with large, of numerous records. As for ad-hoc queries, if you are familiar with Redis, this should be obvious. Maintaining a lot of secondary indexes manually can be a pain.


My question stems from the concept that NoSQL is not a categoric replacement for the RDBMS. In some cases a MongoDB, CouchDB, Cassandra, etc. could serve as an application's only data store. In most of the scenarios I deal with, the ad-hoc capabilities presented by an SQL interface to common reporting or analytic tools are very important.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: