tonbo-io / fusio

Fusio provides file operations on multiple storages across various async runtimes.
Apache License 2.0
169 stars 6 forks source link

Implement monoio-based HTTP client over hyper-tls #41

Open ethe opened 3 weeks ago

ethe commented 3 weeks ago

In the current, there is no S3 suppor on the monoio runtime, implementing remotes::http::HttpClient for monoio https client over hypter-tls should be a possible way.

a10y commented 1 week ago

Capturing convo from Discord:

The monoio project does maintain an HTTP(S) client crate at https://github.com/monoio-rs/monoio-http

Running a minimal test to connect to the Umbra open satellite imagery S3 bucket, behind HTTPS, seems to succeed.

use monoio_http_client::Client;

#[monoio::main(enable_timer = true)]
async fn main() {
    let client = Client::default();
    let resp = client
        .get("https://umbra-open-data-catalog.s3.amazonaws.com/")
        .send()
        .await
        .expect("request fail");
    let http_resp = resp.bytes().await.unwrap();
    println!("{:?}", http_resp);
}
image

However, it's possible that there is a better pathway, e.g. writing custom executors over hyper-tls that maybe leads to more code sharing between the monoio and tokio-uring impls