-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cursors and Pagination #121
Comments
What you really want (and I've been thinking about) is a cursor API. Eg, This is effectively serialization of iterator trees for those playing at home, and is tangentially related to #64, in that you're building things that may need serialization, but is really just a feature unto itself. |
Any news on this feature - i think this is a must, without it, it would be hard to consider Cayley for production on anything dependent on pagination. Also, how would the cursors be handled? Would the presence of cursors become an impediment on a live production deployment? If you have thousands of clients requesting paginated data, than you would have as many cursors as clients. |
Totally stealing @barakmich's words: You can serialize the iterators and encode them and pass them as a token to the client. Thus, the client can just pass the token back and cayley deserializes it and continues iterating for results. |
I think there should be a streamable content type for Gizmo to allow |
@iddan This would require some interactive API like WebSockets or gRPC, but it's easier to implement than serializing the iterator chain (although achievable). |
I think writing multiple chunks to the HTTP message will be good enough. In Go's |
Is there a way to offset a query, e.g: g.V().GetLimit(limit, offset)? Such a feature would be very handy for pagination purposes.
The text was updated successfully, but these errors were encountered: