Riak Adoption - What can we do better?

Gideon de Kok gideondk at me.com
Sat Apr 21 13:41:51 EDT 2012

> In order to do paging, you really need a way to grab a set number of 
> items in order. For example, give me the first 25 documents that match 
> this secondary index. Or give me 25 documents starting at document 50 in 
> the ordered list.
> Today, we're working around this by grabbing all of the items and doing 
> the paging client side (in javascript). That obviously won't scale past 
> a few hundred items, however.

For best performance and scalability, think different about paging.
Most of the times, a paging method without a specific count of items will suit a Riak architecture better.

It's easy to implement paging through endless scrolling (like Facebook or Twitter) without limiting your MapReduce jobs (which is quite slow):
- Use timestamps as secondary indexes and do range queries on a specific time frame and sort those values.

If you really need to implement paging in the traditional way, just use something like Redis to keep a sorted list of your keys.

Gideon de Kok
Sent with Sparrow (http://www.sparrowmailapp.com/?sig) 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120421/43c1e7e0/attachment.html>

More information about the riak-users mailing list