Skip to content
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

Pagination #31

Open
metasoarous opened this issue Dec 13, 2018 · 1 comment
Open

Pagination #31

metasoarous opened this issue Dec 13, 2018 · 1 comment

Comments

@metasoarous
Copy link

Is pagination of queries on your radar at all?

@comnik
Copy link
Member

comnik commented Dec 14, 2018

Anything involving sorting is tricky, I haven't thought much about it, and it's not at the top of the priority list right now, but here goes.

We do not want 3DF to maintain explicit order in the general case, because most input diffs (to a list of n records) can be expected to produce O(n/2) output diffs (to every connected client!). It seems a compromise would be for the backend to perform something like a top-k by the desired metric and then assign a page number to every record. Within a page, clients are responsible for presenting them in sorted order.

For pages of size k this should cut down the expected number of output diffs significantly (something like n/k * probability of any individual record moving between pages?).

How does that sound?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants