I can see myself using Project Voldermort to cache results from a Traditional RDBMS query. But in this case, it provides almost no major advantage over other (Java) caching system such as EHcache Jcache etc.
Where else could I use Project Voldermort or similar Key Value stores ? How are you using this in your business applications ?
One approach to improving the speed of your database is to denormalize. Take this MySQL example:
Neat, tidy, normalized. But if you want to get users and their roles, the query is complex:
If you denormalized this, it might look something like:
And the equivalent query would be:
This improves some of the performance characteristics of your queries:
GROUP BYandCOUNT. If it were denormalized, you would store it in a different table devoted to holding roles and counts of users who have that role.NoSQL DBs are highly optimized for these cases, where you want to access a mostly-static sequential dataset. At that point, it’s just moving bytes from disk to the network. Less work, less overhead, more speed. Despite how simple this sounds, it’s possible to model your data and application so it feels natural.
The trade-off for this performance is write load, disk space, and some app complexity. Denormalizing your data means more copies, which means more disk space and write load. Essentially, you have one dataset per query. Because you shift the burden of those computations to write-time instead of read-time, you really need some sort of asynchronous mechanism to do that, hence some app complexity.
And because you have to store more copies, you have to perform more writes. This is why you can’t practically replicate this kind of architecture with a SQL database – it’s extremely difficult to scale writes.
In my experience, the trade-off is well worth it for a large-scale application. If you’d like to read a bit more about a practical application of Cassandra, I wrote this piece a few months ago, and you might find it helpful.