问题
We built our platform using a Java-based database developed by Jetbrains, it is called Xodus. However, it is designed for a monolith platform that Jetbrains provides as a service, if I remember correctly, YouTrack and Hub platforms. So we banked on that production use when we built our own platform.
Xodus is very lightweight and very fast, really performant, pound per pound to other databases out there.
Xodus provides efficient blob storage that we use to store all sorts of files, the main reason is, Xodus blobs can be tied-up with database entities (or records flawlessly) making our queries more efficient and fast.
Our biggest concern is most cloud operators is storage cost and using Xodus (with its blob storage support) our data, in the end, will live in a very costly volume (something that would really break our service and bank):
The cost of S3 from Wasabi is just $5.99 per month per terabyte vs. $100 per month per terabyte on block storage (cheapest one I know and use from Linode) so using S3 in the option we are looking for to scale in the future.
So we did our homework and used s3-fuse, as expected it did not work out for limitations described here: https://www.linode.com/community/questions/18817/how-do-i-use-s3fs-on-linode-object-storage
So we are back in using the higher cost block volume storage. We can work for this for now, but we are unable to push our service out of alpha because of this inherent problem. So being the programming team, I have options in mind:
- Make Xodus use S3 when storing data -- best idea but even Jetbrains developers themselves were not able to finish their S3-backed implementation so not a good option for me.
- Implement a wrapper to Java File I/O interface and implement something like an
S3File
implementation that will replace the File I/O calls, using like ByteBuddy or something. I found this project http://www.squeakysand.com/projects/aws/0.1.0-SNAPSHOT/squeakysand-aws-s3/xref-test/test/squeakysand/aws/s3/S3FileTest.html which seems had progressed but not seem to be complete. - Or just figure out a way to mount S3 as a file without the limitations describe above.
I want to ask expert Java developers here for ideas which of the 3 options do make sense and worth doing the programming tasks and which one is actually technically viable?
来源:https://stackoverflow.com/questions/62330339/using-amazon-s3-as-a-database-storage-for-use-with-xodus