Skip to content
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

S3 support, take 2 #513

Closed
wants to merge 4 commits into from
Closed

Conversation

vgskye
Copy link

@vgskye vgskye commented Feb 24, 2024

replaces #512. Adds S3 support using my fork of s3-lite to be significantly lighter than aws-sdk, weighing at 100KiB-or-so when using URLConnection and about 1.5MB-or-so when using the supposedly higher-performance Apache HttpComponents client.

@vgskye
Copy link
Author

vgskye commented Feb 24, 2024

apparently something's broken, sec

@vgskye
Copy link
Author

vgskye commented Feb 24, 2024

yeah s3-lite's signer seems broken

@vgskye
Copy link
Author

vgskye commented Feb 24, 2024

all fixed now, seems to be perfectly functional

@TBlueF
Copy link
Member

TBlueF commented Jun 6, 2024

So ...

BlueMap v5.0 (Snapshot) now supports not only native-addons (addons loaded by bluemap), but it is also possible to register new storages or compression etc. via an addon that depends on BlueMapCore/Common.
With that it should be possible to create a plugin that adds S3-Storage support to BlueMap :)

For example here is an addon that adds brotli-support to bluemap: https://github.com/BlueMap-Minecraft/BlueMapBrotli

For S3, you could implement the Storage interface in your addon, and then register it to the StorageType.REGISTRY.

I didn't test it but in theory it should be even possible using a library like: https://github.com/elerch/Amazon-S3-FileSystem-NIO2 or https://github.com/carlspring/s3fs-nio/ to aquire a java.nio.file.Path object and then use that to simply create a new FileStorage(root, compression, false).. If that works, you wouldn't even need to implement the Storage interface at all.

BlueMap 5.0 is still a snapshot, so it's not well tested yet.. but that also means that if you encounter any issues, just tell me and the path to a fix should usually be rather short :)

I will close this PR, since as we already discussed on discord, implementing this as an addon instead of in BlueMap directly is the preferred way :)

@TBlueF TBlueF closed this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants