24 releases

0.7.2 Nov 22, 2024
0.6.2 Sep 3, 2024
0.6.1 May 22, 2024
0.5.8 Jan 2, 2024
0.1.4 Feb 24, 2023

#148 in HTTP server

Download history 138/week @ 2024-08-28 40/week @ 2024-09-04 13/week @ 2024-09-11 14/week @ 2024-09-18 37/week @ 2024-09-25 177/week @ 2024-10-02 15/week @ 2024-10-09 202/week @ 2024-10-16 3/week @ 2024-10-23 1/week @ 2024-10-30 3/week @ 2024-11-06 1/week @ 2024-11-13 152/week @ 2024-11-20 12/week @ 2024-11-27

169 downloads per month

MIT license

435KB
10K SLoC

htsget-actix

MIT licensed Build Status

[!IMPORTANT]
The functionality of htsget-axum is identical to this crate and it is recommended for all projects to use htsget-axum instead.

This crate will be maintained to preserve backwards compatibility, however htsget-axum is favoured because it contains components that better fit with the rest of htsget-rs.

Framework dependent code for a server instance of htsget-rs, using Actix Web.

Overview

This crate is used for running a local instance of htsget-rs. It is based on:

  • Actix Web for endpoints, routes, and middleware.
  • htsget-http for htsget-rs specific HTTP responses

Usage

This application has the same functionality as htsget-axum. To use it, following the htsget-axum instructions, and replace any calls to htsget-axum with htsget-actix.

It is recommended to use htsget-axum because it better fits with the rest of htsget-rs. For example htsget-actix uses the actix-web framework for the ticket server, however it depends on htsget-axum for the data server. Also, components in htsget-lambda use Axum dependencies.

As a library

There shouldn't be any need to interact with this crate as a library, however some functions which deal with configuring routes are exposed in the public API.

Feature flags

This crate has the following features:

  • s3-storage: used to enable S3Storage functionality.
  • url-storage: used to enable UrlStorage functionality.
  • experimental: used to enable experimental features that aren't necessarily part of the htsget spec, such as Crypt4GH support through C4GHStorage.

Benchmarks

Benchmarks for this crate written using Criterion.rs, and aim to compare the performance of this crate with the htsget Reference Server. There are a set of light benchmarks, and one heavy benchmark. Light benchmarks can be performed by executing:

cargo bench -p htsget-axum -- LIGHT

To run the heavy benchmark, an additional vcf file needs to be downloaded, and placed in the data/vcf directory:

curl ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/data_collections/1000_genomes_project/release/20190312_biallelic_SNV_and_INDEL/ALL.chr14.shapeit2_integrated_snvindels_v2a_27022019.GRCh38.phased.vcf.gz > data/vcf/internationalgenomesample.vcf.gz

Then to run the heavy benchmark:

cargo bench -p htsget-axum -- HEAVY

License

This project is licensed under the MIT license.

Dependencies

~43–66MB
~1M SLoC