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

VCF annotation via asynchronous request-response pattern #108

Merged
merged 20 commits into from
Dec 9, 2024

Conversation

ehclark
Copy link
Contributor

@ehclark ehclark commented Nov 18, 2024

See also #107

The annotation of a large VCF file with VRS IDs can run for a long time. A synchronous request-response pattern where the client is waiting for a response can lead to instability and dropped connections in many environments. For long running processes, a better option is an asynchronous request-response pattern. The client submits a request and receives a 202 response and polling location. The client polls at some interval, receiving a 202 if the request is still pending, a 200 and the result if the request is completed, or a 500 if the request failed.

AnyVar uses the Celery distributed task queue for task management and result caching. The asynchronous feature is optional and the changes for this PR are backwards compatible.

See the README-async.md file for detailed documentation of the async feature and how to enable it.

Closes #107

@ehclark ehclark linked an issue Nov 18, 2024 that may be closed by this pull request
@korikuzma
Copy link
Contributor

Hey @ehclark , apologies for the delay. I have been busy with grant writing. I can review this next week.

@ehclark ehclark marked this pull request as draft November 21, 2024 16:24
@ehclark
Copy link
Contributor Author

ehclark commented Nov 21, 2024

Thanks @korikuzma. No rush. I am going to need to make some additional tweaks anyway and will be out next week. I have reverted it to a draft. But if you want to take a quick look next week just to make sure it looks directionally correct that would be helpful.

@ehclark ehclark marked this pull request as ready for review November 25, 2024 18:49
@ehclark
Copy link
Contributor Author

ehclark commented Nov 25, 2024

OK this is ready for review. What I thought was a bigger problem was the result of switching to a different storage class for seqrepo data in our Kubernetes cluster. Which of course was easy to fix.

pyproject.toml Outdated Show resolved Hide resolved
korikuzma
korikuzma previously approved these changes Dec 2, 2024
Copy link
Contributor

@korikuzma korikuzma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for delay. Did quick review and seems good to me!

@ehclark
Copy link
Contributor Author

ehclark commented Dec 6, 2024

@korikuzma @jsstevenson @theferrit32

I am going to go ahead and merge this on Monday if there are no other comments/reviews. If you want or need more time to look at it let me know.

@jsstevenson
Copy link
Contributor

👍 looks good to me

@ehclark ehclark merged commit ddbfd42 into main Dec 9, 2024
5 checks passed
@ehclark ehclark deleted the feature/async-vcf branch December 9, 2024 18:05
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.

Implement asynchronous request-reply for VCF annotation
3 participants