clj-3df icon indicating copy to clipboard operation
clj-3df copied to clipboard

Pagination

Open metasoarous opened this issue 6 years ago • 1 comments

Is pagination of queries on your radar at all?

metasoarous avatar Dec 13 '18 20:12 metasoarous

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?

comnik avatar Dec 14 '18 13:12 comnik