New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cursors to collection endpoints #37

Closed
sderickson opened this Issue Jan 2, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@sderickson
Contributor

sderickson commented Jan 2, 2014

Set up endpoints that return multiple documents to take limit values and return cursors so the client can fetch more documents as needed. These cursors could either be directly taken from MongoDB (suboptimal since that takes server resources, but built in and workable) or they could be set up as query modifications passed to the client to be passed back for more information. For example, if the collection is sorted by date, the endpoint might return a timestamp of the last item in the collection, which would be passed back and used for the same query, but only after the given timestamp. The ideal system would be something like Google App Engine's Query Cursors, but for MongoDB queries.

Endpoints that could use cursors include versions, files, and search (which would probably just require the native MongoDB cursor system). These can be found in /server/handlers/Handler.coffee.

@sderickson

This comment has been minimized.

Show comment
Hide comment
@sderickson

sderickson Aug 29, 2014

Contributor

Should probably just use simple pagination for the time being. While it doesn't scale infinitely, it's much simpler than trying to come up with a universal cursor system, and is better than nothing.

Contributor

sderickson commented Aug 29, 2014

Should probably just use simple pagination for the time being. While it doesn't scale infinitely, it's much simpler than trying to come up with a universal cursor system, and is better than nothing.

@sderickson sderickson closed this Jan 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment