A couple of interesting tips of putting Redis to work to get charts and reports:
- using “smart” keys for storing data in Redis
- retrieve all keys using a pattern (note: as pointed out in the article this is not really recommended, except the case where the key space is reduced in size)
- using existing Redis commands for getting set length, instead of fetching and counting
“Elementary, my dear Watson”.
Related to last point, I have found this ☞ old post on the Redis mailing list suggesting the unification of all Redis size-related commands:
ZCARD, etc. and I must confess that I kind of like the suggestion.
As a side note, this other ☞ post, promising to tell more about reporting in NoSQL got me really confused.
Update: Just found another ☞ article presenting a reporting solution based on the ☞ Event Sourcing pattern. While it looks interesting, I’m wondering if for high volume data this would not be overkill though.