inveniosoftware / invenio-files-rest

REST API for uploading/downloading files for Invenio.
https://invenio-files-rest.readthedocs.io
MIT License
9 stars 67 forks source link

Design question — multiple storage backends or locations #255

Open alexdutton opened 4 years ago

alexdutton commented 4 years ago

As I understand it, the current design/implementation has the following:

This seems a bit complicated, and doesn't yet necessarily meet its objectives of having a tidy interface and support for multiple storage backends.

What I would have expected:

This GitHub issue came about because I was trying to work out how one would support hooking up to multiple S3 buckets, and my assumption was that each would be a location for each bucket, but it wasn't immediately clear how to integrate this into the existing framework.

Could we improve on how this all works before we have a public release?

lnielsen commented 4 years ago

A couple of comments about some of the design choices:

I think the issue you point to is that it's hard today in Invenio to use multiple Invenio FileStorage classes. You would have to implement your own custom storage factory, that inspects the URI. I'm not sure how an ideal solution looks like, that we can discuss further IRL.