BlueMap
BlueMap copied to clipboard
S3 support, take 2
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.
apparently something's broken, sec
yeah s3-lite's signer seems broken
all fixed now, seems to be perfectly functional
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 :)