refactor: separate storage and axum crates #253
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
htsget-search
to it's ownhtsget-storage
crate.data_server.rs
component to it's ownhtsget-axum
crate.htsget-axum
binary identical tohtsget-actix
, and recommend usage ofhtsget-axum
instead ofhtsget-actix
.Motivation
The
htsget-search
crate has had two functionalities from the get go, which was the actual htsget searching algorithm, and a storage interface to interact with files. This PR splits these into two separate crates, because in the future, further storage interfaces like Crypt4GH will be implemented, which will no longer fit well into a single crate.This change also moves the Axum-based
data_server
to it's own crate, which doesn't really belong inhtsget-search
orhtsget-storage
. With this crate, there is a new htsget application using Axum. This is useful because other components of htsget-rs depend on Axum, likehtsget-lambda
, and evenhtsget-actix
uses an Axum-based data block server. This means that Axum makes more sense to use within htsget-rs, and is the recommendation going forward.The
htsget-actix
crate will still be maintained because it is relatively simple to do so, and for backwards compatibility.Future work
Since
htsget-axum
is now it's own dedicated crate, other components should be migrated to Axum. This includes theDockerfile
, andhtsget-lambda
, which can use the Axum router directly. This would simplifyhtsget-lambda
significantly, as custom request parsing would no longer be required.Benchmarking between
htsget-actix
andhtsget-axum
should also be unified.I've saved this for a future PR to avoid this one getting too large.