Consider refactor #73

Closed
opened 2023-08-25 14:19:57 +00:00 by dkirillov · 0 comments
Member

It's getting harder maintain and introduce new features (caching for example, see this function) because of separating uploader and downloader though both requires quite a lot common codes

Describe the solution you'd like

I suggest either

  • merge uploader and downloader into one structure (e.g like hander in s3-gw)
  • move common logic into separate structure (e.g. layer in s3) and provide it to both (downloader and uploader) as param on creating

Also it would be nice to have repo structure more like in https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw (don't store code in root directory of repo, move it to cmd folder)

Describe alternatives you've considered

Don't change anything

## Is your feature request related to a problem? Please describe. It's getting harder maintain and introduce new [features](https://git.frostfs.info/TrueCloudLab/frostfs-http-gw/pulls/70) (caching for example, see this [function](https://git.frostfs.info/dkirillov/frostfs-http-gw/src/commit/300425042c3d2875a890fbd48b6d24836f2547b8/utils/util.go#L64)) because of separating [uploader](https://git.frostfs.info/TrueCloudLab/frostfs-http-gw/src/commit/cc69601b32a09290dae3ccdeab4eb39515251172/uploader/upload.go#L31) and [downloader](https://git.frostfs.info/TrueCloudLab/frostfs-http-gw/src/commit/cc69601b32a09290dae3ccdeab4eb39515251172/downloader/download.go#L203) though both requires quite a lot common codes ## Describe the solution you'd like I suggest either * merge uploader and downloader into one structure (e.g like [hander](https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/b5fce5c8d2c021bf3d64bfe4054c9ac150bc0557/api/handler/api.go#L20) in s3-gw) * move common logic into separate structure (e.g. [layer](https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/b5fce5c8d2c021bf3d64bfe4054c9ac150bc0557/api/layer/layer.go#L53) in s3) and provide it to both (downloader and uploader) as param on creating Also it would be nice to have repo structure more like in https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw (don't store code in root directory of repo, move it to `cmd` folder) ## Describe alternatives you've considered Don't change anything
dkirillov added the
refactoring
label 2023-08-25 14:19:57 +00:00
mbiryukova self-assigned this 2023-08-30 09:52:24 +00:00
alexvanin added this to the v0.28.0 milestone 2023-09-08 10:27:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-http-gw#73
No description provided.