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

Write endpoint that returns only n points. #446

Open
3 tasks
Tracked by #444
thomcom opened this issue Nov 21, 2022 · 2 comments
Open
3 tasks
Tracked by #444

Write endpoint that returns only n points. #446

thomcom opened this issue Nov 21, 2022 · 2 comments
Assignees

Comments

@thomcom
Copy link
Contributor

thomcom commented Nov 21, 2022

To time the speed of the interface and to build the first step of building a point-budget based demo, I need an endpoint that only returns n points.

My first impulse is to create a fastify plugin that modifies the API and allows for endpoints and bounds to be specified. I'm not sure that a fastify plugin can change the endpoint schema, however.

Since only particles/:table will depend on this, it is surely faster just to modify its schema and handler to this purpose. I'll write this endpoint in a test-driven fashion, starting with the test then adding to the endpoint.

  • Viz with 'max zoom out view' (e.g. all data 'visible')

  • We have a set 'maximum # of points able to render' (this is usually lower than full dataset)

  • Currently writing this request, for the server to return a fixed number of points.

  • How do we decide and keep track of what points to show from the full dataset?

  • I originally planned on having the client do all of the point specifications, but it would be interesting to use the server for tracking what points have been displayed. It would be trivial to add metadata columns to the DataFrame about which points have been displayed, their time of display, and which request gathered them.

@thomcom thomcom self-assigned this Nov 21, 2022
@thomcom
Copy link
Contributor Author

thomcom commented Nov 22, 2022

Thinking about this endpoint, how does it sample which points are to be returned?

If no bounding box is passed, then it will randomly sample n points from the full dataset.

If a bounding box is also passed, then it will filter within the bounding region, then if the number of points is still greater than npoints, it will sample those.

@thomcom
Copy link
Contributor Author

thomcom commented Nov 22, 2022

I'm noticing that there's no random functionality in our gpu code at this time, whenever a sample is needed in python space then cupy is used. Looking into a solution....

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

1 participant