There seem to be no way to make a a top X query (top pageviews, a scoreboard, etc).
A simple use case is the following: I receive beacons from browsers, and I need to compute the top browsers (or countries) by pageviews for a particular day.
I thought about using a Large Ordered List. They record key would be “browsers-20150121” and it would be contain a LLIST. This LLIST would contain objects with two fields, the browser name and the pageviews for this browser.
Two problems here.
-
Inserting: Apparently I can’t update my LLIST efficiently when a beacon arrives. I would have to scan the whole list to find the object (with find()) matching the browser, make a +1, and then update() the object.
-
Querying: I can’t ask for a top X from 1 to 10, then 11 to 20, etc.
Did I miss something ? Is there another ways to tackle this kind of problem ?