You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We are trying to access objects with query parameters, which can include things like formatting options for the object, or authentication keys.
An imaginary example would look like:
https://cats.server/kitten.jpg?color=black&api_key=1234 to get a picture of a black kitten.
At present, it appears the URI is parsed and the parameters are stripped.
Describe the solution you'd like
A basic solution would be to allow the URI parameters to pass through.
A more flexible implementation would allow for passing parameters as an argument.
Describe alternatives you've considered
I could not find any alternative, but have considered that objects described by parameters may be anti-pattern or out of scope.
I think there's a difference between query parameters for authentication can potentially be in line with the existing ObjectStore APIs, but using query parameters to find specific objects would be a departure from what the S3 API provides.
Could you perhaps expand upon the use-case for this. Why do you want to access an HTTP API as an ObjectStore? Are the query parameters static? Does the server support listing or any APIs other than basic retrieval?
On the face of it this seems like a bit of an unusual ask, and might suggest a missing abstraction somewhere - e.g. using ObjectStore as opposed to a more targeted trait
The structure of these files is especially suited for http access from cloud storage from S3 so object_store fits the base use case very well.
However, in my case we have an API that emulates a file in cloud storage. It behaves like an image file stored in S3, but the image is processed on the fly as the file is accessed.
At it's core, there is a single "object" - the raw sensor data of the image, but the processing options to create a final image are passed as parameters.
So conceptually it's not a great fit for an object store abstraction, but if it's not problematic to allow parameters to slip through, we could use this library, understanding it's "out of spec". Allowing parameters for the stated goal of authorization feels like a harmless ask.
I have also considered that we instead pack the parameters into a URL structure to make the API behave more RESTfully. Perhaps that's a better direction in general for these times but right now we have parameters.
If it's simply not a good fit, that's OK, but I thought I'd ask anyway.
In the short term you could implement the ObjectStore trait yourself, and leave a lot of the methods unimplemented, but this is a bit of an ugly solution. Ultimately your API is not an object store, nor does it behave like one.
Activity
drwelby commentedon Jan 16, 2025
cc @kylebarron
kylebarron commentedon Jan 16, 2025
I think there's a difference between query parameters for authentication can potentially be in line with the existing ObjectStore APIs, but using query parameters to find specific objects would be a departure from what the S3 API provides.
tustvold commentedon Jan 18, 2025
Could you perhaps expand upon the use-case for this. Why do you want to access an HTTP API as an ObjectStore? Are the query parameters static? Does the server support listing or any APIs other than basic retrieval?
On the face of it this seems like a bit of an unusual ask, and might suggest a missing abstraction somewhere - e.g. using ObjectStore as opposed to a more targeted trait
drwelby commentedon Jan 18, 2025
The use case stems from @kylebarron's development of using
object_storeto achieve high-throughput, high-concurrency reading of geospatial images using a Rust-based core: https://github.com/developmentseed/aiocogeo-rsThe structure of these files is especially suited for http access from cloud storage from S3 so
object_storefits the base use case very well.However, in my case we have an API that emulates a file in cloud storage. It behaves like an image file stored in S3, but the image is processed on the fly as the file is accessed.
At it's core, there is a single "object" - the raw sensor data of the image, but the processing options to create a final image are passed as parameters.
So conceptually it's not a great fit for an object store abstraction, but if it's not problematic to allow parameters to slip through, we could use this library, understanding it's "out of spec". Allowing parameters for the stated goal of authorization feels like a harmless ask.
I have also considered that we instead pack the parameters into a URL structure to make the API behave more RESTfully. Perhaps that's a better direction in general for these times but right now we have parameters.
If it's simply not a good fit, that's OK, but I thought I'd ask anyway.
tustvold commentedon Jan 18, 2025
The primary goal of this library is to provide portability across stores, introducing APIs that are inherently not portable is somewhat problematic.
This sounds like the library in question is missing an abstraction like https://docs.rs/parquet/latest/parquet/arrow/async_reader/trait.AsyncFileReader.html that would allow you to provide your own IO implementation.
In the short term you could implement the ObjectStore trait yourself, and leave a lot of the methods unimplemented, but this is a bit of an ugly solution. Ultimately your API is not an object store, nor does it behave like one.
drwelby commentedon Jan 18, 2025
Thanks for your insights and suggestions!