← Back to team overview

openstack team mailing list archive

Re: Conclusion on Pagination (hopefully!) :)

 

Jay,

+1 on this,  however, I would also add linking to the API layer -- as we do in compute 1.1. Links make it supper easy for language bindings to traverse pages -- especially in the case that Thorsten points to, where you want to traverse all items in the collection.  In this case, a client can keep following the next link until there aren't any. Links  are less error prone, and easier to use in that  they keep clients from having to mess with markers at all.  The href is based on a marker of course, but the client doesn't have to construct the URL. 

-jOrGe W.

On May 27, 2011, at 11:00 AM, Jay Pipes wrote:

> Thanks all for some awesome input on the pagination thread. I wanted
> to summarize what I think were the conclusions to come out of it.
> Please do let me know if I got it right.
> 
> Proposal:
> 
> 1) Push the LIMIT variable into the database API layer
> 2) Ensure that all queries that return a set of results have an ORDER
> BY expression to them
> 3) Push the marker into the database API layer. Continue to have the
> marker variable be a value of a unique key (primary key for now at
> least). Use a WHERE field > $marker LIMIT $pagesize construct.
> 
> I *think* this is what's agreed upon? It's basically the Swift model
> with a variation that the order of results is not static (it can be
> specified by the user).
> 
> Please ++ if that looks good and I'll draw up a blueprint
> 
> Thanks!
> jay
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp



Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at abuse@xxxxxxxxxxxxx, and delete the original message.
Your cooperation is appreciated.



References