mirror of
https://github.com/nspcc-dev/neofs-s3-gw.git
synced 2026-03-01 04:29:15 +00:00
Revise internal/neofs package #235
Labels
No labels
I2
I2
I3
I4
S2
S3
S4
S4
U0
U1
U2
U2
U3
U4
U4
auth-mate
blocked
bug
config
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
question
security
test
tree-service
tree-service
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-s3-gw#235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cthulhu-rider on GitHub (Jun 3, 2022).
Initial idea of creating a type
nspcc-dev/neofs-s3-gw@dbfac29171/internal/neofs/neofs.go (L34)was to have a mediator between NeoFS system and all S3 needs.After subsequent refactors its orientation has been changed to providing application-specific features. I suggest to revise this architecture.
I can think of two possible approaches
internal/neofs - global window into NeoFS
We get rid of any app-specific info from
internal/neofspackage. It imports only NeoFS SDK Go functionality.NeoFStype provides full functionality required within the framework of S3 needs, but can be used as an autonomous entitiy (true mediator). Each application implements its NeoFS-related needs locally through singleinternal/neofs.NeoFStype. Seems likeSome local dependencies can be similar, but the are not the same.
internal/neofs - collection of implementations
Differs with previous approach that each type in the
internal/neofspackage is an implementation of one dependency of one application. The mediator mentioned in the first approach is also present, but it is not exported from the package. Seems likeAs for me, first approach looks clearer. In both approaches, I consider it important to loosen the coupling of types between applications.
@cthulhu-rider commented on GitHub (Jun 3, 2022):
Future proposal
We can go further and develop
internal/neofslayer into a full-fledged intermediate layer between NeoFS (SDK actually) and S3 needs. I find it extremely useful for the following reasons:Cons: it takes time to implement in the current code base. But if the proposal comes in, I can contribute to the implementation.