Before writing my own custom implementation, I have been googling for a complete example of a simple tree-like JTree/JDialog that allows me to dynamically load and expand the contents of a S3 bucket or sub-S3-object-keys.
In other words, I don’t want to recursively prefetch all the objects from different buckets beforehand and populate a JTree. The reason is that there are too many (sub-)objects and keys to have a smooth UX experience, in the order of millions/billions of objects spread in different S3 buckets that don’t need to be opened by the user during a session.
Put simply, the ideal solution would be like a regular filesystem FileChooser
but for Amazon S3 buckets. For more context, here is the closest I’ve got to finding what I need.
But unfortunately it doesn’t implement the on-expanding of subtrees usecase. On the other hand, this other SO example is a close match, but very incomplete… I suspect that better snippets should be available, perhaps it’s just my google-fu failing me on this one?
I am aware that buckets/keys are not filesystems, but for my usecase and purposes, that’s what I need.
Any suggestions are very welcome!
Advertisement
Answer
Well, we managed to solve this problem, for more pointers see the following github repo for a barebones example not integrating AWS S3 buckets:
https://github.com/reisingerf/SwingDynamicTree
and the final integration with S3 browser:
https://github.com/igvteam/igv/pull/620
Hope that helps somebody wondering the same 🙂