-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace endpoint builder with ObjectStore abstraction #36
Conversation
|
||
import jakarta.ws.rs.core.UriBuilder; | ||
|
||
import java.net.URI; | ||
|
||
@FunctionalInterface | ||
public interface S3EndpointBuilder | ||
public interface ObjectStore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what to think of the ObjectStore
name. This interface only really makes sense for S3-like (though not necessarily S3) endpoints. Calling it ObjectStore
IMHO gives the impression that implementations of this interface deal with the quirks of each storage system, yet they would not.
What about S3StoreEndpointBuilder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we'll have more functionality in the future besides building endpoints. What about RemoteS3Facade
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up: we've discussed under #20 that we wouldn't support non-S3-like endpoints yet, but if the goal of this current PR is to enforce a bit of separation between the fact we are outwardly S3-like but want to be internally storage agnostic, we could go a bit further and parse the request into a common record.
We could then write the current proxy logic as an implementation of a StorageForwarder
interface - wdyt? Happy to create an issue if you'd like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#37 - done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vagaerg So for this PR, what name should we use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you prefer - RemoteS3Facade
is fine by me, though this isn't a particularly complex example of it :)
S3EndpointBuilder
sounded fine to me too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done - PTAL
9d5d4f5
to
ba0089c
Compare
01214a2
to
3752f3a
Compare
be5eae1
to
ee6e3d4
Compare
`RemoteS3Facade` is a better abstraction and will allow support for various S3-compatible object stores. Closes #20
ee6e3d4
to
c9a1e83
Compare
ObjectStore
is a better abstraction and will allow support forvarious S3-compatible object stores.
Closes #20