tower-rs / tower-http

HTTP specific Tower utilities.
675 stars 156 forks source link

Add OpendalLayer to allow serving files from differnet storage services #449

Closed Xuanwo closed 8 months ago

Xuanwo commented 8 months ago

I'm interested in implementing this for tower-http.

Feature Request

Motivation

ServeDir functions properly, but is limited to the local file system. This limitation makes it challenging to serve content from sources like memory, redis, s3, or moka.

What if we expand its capabilities to include all types of storage services?

Proposal

OpenDAL is a data access layer that allows users to easily and efficiently retrieve data from various storage services in a unified way.

image

We can implement a new service that based on opendal and provide similiar features to ServeDir.

Alternatives

We can leave this feature unimplemented.

jplatte commented 8 months ago

This seems sufficiently complex to be its own crate.

jplatte commented 8 months ago

Additionally, maintenance bandwidth is very limited for tower-http at the moment, which further makes new medium-to-large features very hard to land. I'll close this for now, feel free to link to any tower OpenDAL implementations though or further discuss the topic in general.