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

WIP: Append two empty JSON objects to mark the end of the NDJSON stream #2763

Closed
wants to merge 4 commits into from

Conversation

anna-parker
Copy link
Contributor

@anna-parker anna-parker commented Sep 10, 2024

resolves #2724

preview URL: https://add-explicit-end-to-strea.loculus.org/

Summary

Currently we stream sequences using NDJSON for multiple endpoints, including get-released-data which sends clients all data. However, if the stream breaks off the client will not know that the server did not send all sequences. This lead to not all sequences being shown for west nile when we had high database load because the silo import script was calling get-released-data.

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

@anna-parker anna-parker changed the title Append two empty JSON objects to mark the end of the NDJSON stream WIP: Append two empty JSON objects to mark the end of the NDJSON stream Sep 10, 2024
@anna-parker anna-parker added preview Triggers a deployment to argocd and removed preview Triggers a deployment to argocd labels Sep 10, 2024
@chaoran-chen
Copy link
Member

chaoran-chen commented Sep 10, 2024

Instead of two empty objects, would two empty lines also work? I assume that the idea is that the client (our silo import script) will check for the empty objects / lines to determine whether a file is complete?

@anna-parker anna-parker added the preview Triggers a deployment to argocd label Sep 11, 2024
@anna-parker
Copy link
Contributor Author

Closing as we are going another way and this did not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Triggers a deployment to argocd
Projects
None yet
2 participants