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

Add streaming support and tests for query-server. #1027

Merged
merged 8 commits into from
Nov 19, 2024

Conversation

mdwelsh
Copy link
Collaborator

@mdwelsh mdwelsh commented Nov 17, 2024

For our upcoming customer deployment, we need a REST server that will return query plans, results, and the set of retrieved docs used in a query. This PR adds this capability to the existing query-server app.

I have also added streaming responses using SSE, in order to support streaming back large result sets (and to ensure the query plan and status are streamed back to the client while the query is running). Streaming is enabled if stream=true in the query request, otherwise, a non-streamed response is returned.

I've added a unit test for the app as well.

apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Outdated Show resolved Hide resolved
apps/query-server/queryserver/main.py Outdated Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/pyproject.toml Show resolved Hide resolved
@mdwelsh mdwelsh requested a review from austintlee November 19, 2024 03:43
apps/query-server/queryserver/main.py Outdated Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Outdated Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
apps/query-server/queryserver/main.py Show resolved Hide resolved
@mdwelsh mdwelsh merged commit 70f25a7 into main Nov 19, 2024
9 of 14 checks passed
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

Successfully merging this pull request may close these issues.

3 participants