Skip to content

Commit

Permalink
Merge pull request #253 from umccr/refactor/separate-storage
Browse files Browse the repository at this point in the history
refactor: separate storage and axum crates
  • Loading branch information
brainstorm authored Aug 4, 2024
2 parents 85e4ae3 + e69a863 commit 492bdb6
Show file tree
Hide file tree
Showing 59 changed files with 1,865 additions and 934 deletions.
141 changes: 103 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ resolver = "2"
members = [
"htsget-config",
"htsget-actix",
"htsget-axum",
"htsget-http",
"htsget-lambda",
"htsget-search",
"htsget-storage",
"htsget-test"
]

Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

A **server** implementation of the [htsget protocol][htsget-protocol] for bioinformatics in Rust. It is:
* **Fully-featured**: supports BAM and CRAM for reads, and VCF and BCF for variants, as well as other aspects of the protocol such as TLS, and CORS.
* **Serverless**: supports local server instances using [Actix Web][actix-web], and serverless instances using [AWS Lambda Rust Runtime][aws-lambda-rust-runtime].
* **Serverless**: supports local server instances using [Axum][axum] and [Actix Web][actix-web], and serverless instances using [AWS Lambda Rust Runtime][aws-lambda-rust-runtime].
* **Storage interchangeable**: supports local filesystem storage as well as objects via [Minio][minio] and AWS S3.
* **Thoroughly tested and benchmarked**: tested using a purpose-built [test suite][htsget-test] and benchmarked using [criterion-rs].

Expand Down Expand Up @@ -56,12 +56,12 @@ htsget-rs implements the following components of the protocol:
Htsget-rs is configured using environment variables, for details on how to set them, see [htsget-config].

### Local
To run a local instance htsget-rs, run [htsget-actix] by executing the following:
To run a local instance htsget-rs, run [htsget-axum] by executing the following:
```sh
cargo run -p htsget-actix
cargo run -p htsget-axum
```
Using the default configuration, this will start a ticket server on `127.0.0.1:8080` and a data block server on `127.0.0.1:8081`
with data accessible from the [data] directory. See [htsget-actix] for more information.
with data accessible from the [data] directory. See [htsget-axum] for more information.

### Cloud
Cloud based htsget-rs uses [htsget-lambda]. For more information and an example deployment of this crate see
Expand All @@ -86,6 +86,7 @@ This repository consists of a workspace composed of the following crates:

- [htsget-config]: Configuration of the server.
- [htsget-actix]: Local instance of the htsget server. Contains framework dependent code using [Actix Web][actix-web].
- [htsget-axum]: Local instance of the htsget server. Contains framework dependent code using [Axum][axum].
- [htsget-http]: Handling of htsget HTTP requests. Framework independent code.
- [htsget-lambda]: Cloud based instance of the htsget server. Contains framework dependent
code using the [Rust Runtime for AWS Lambda][aws-lambda-rust-runtime].
Expand All @@ -97,13 +98,14 @@ Other directories contain further applications or data:
This directory also contains example events used by a cloud instance of htsget-rs in the [`events`][data-events] subdirectory.
- [deploy]: An example deployment of [htsget-lambda].

In htsget-rs the ticket server handled by [htsget-actix] or [htsget-lambda], and the data
In htsget-rs the ticket server handled by [htsget-axum], [htsget-actix] or [htsget-lambda], and the data
block server is handled by the [storage backend][storage-backend], either [locally][local-storage], or using [AWS S3][s3-storage].
This project layout is structured to allow for extensibility and modularity. For example, a new ticket server and data server could
be implemented using Cloudflare Workers in a `htsget-http-workers` crate and Cloudflare R2 in [htsget-search].

See the [htsget-search overview][htsget-search-overview] for more information on the storage backend.

[axum]: https://github.com/tokio-rs/axum
[htsget-config]: htsget-config
[htsget-actix]: htsget-actix
[htsget-http]: htsget-http
Expand Down
Loading

0 comments on commit 492bdb6

Please sign in to comment.