B4J Question [BANano] [BANanoServer] Upload progress etc

pecket

Member
Hi!

Just recently discovered the BANano and BANanoServer projects and I'm completely thrilled.

I looked around a bit, and couldn't find any examples or hints on how to do the following stuff:
  • Multiple simultaneous uploads (an asynchronous solution that is) that allows me to show the upload progress for the files.
  • Can I make the files upload simultaneously?
  • If I install this on a VPS service, such as AWS, and set up multiple servers with a load balancer in front of it, is there any way to spread out the uploads? Simultaneous (asynchronous) uploads would be a must of course, and if I can do this pointed to the load balancer it should be possible to configure so that the connections go to the server with the lowest current load/amount of connections. That would just mean I need to pass some sort of nonce/id to tell the server that the upload was "initiated" from another instance and that it should accept the upload. Where the files end up will then be my own problem to handle (towards a shared bucket or similar).
 

alwaysbusy

Expert
Licensed User
Longtime User
For points 1 and 2, you may wrap a project like this: https://github.com/LPology/Simple-Ajax-Uploader. Looks like it could handle multiple concurrent uploads and show some progress. On the server side you would need to write a handler to handle the uploads. If I find some time, I see if I can wrap it into the BANanoSkeleton library as a component

This is just an idea: As for point 3, I would think you somehow have to break down the file to upload in chunks first in the browser. Each part should have some identifier in it that allows grouping the parts back in order once they have all be handled by the server to rebuild the original file. This info could maybe be in the headers. Some info on how to split the files: https://stackoverflow.com/questions...ed-file-into-multiple-chunks-using-javascript.

Alwaysbusy
 
Upvote 0

pecket

Member
Thank you so much for your reply. When it comes to point 3, I was thinking more along the lines to spread the uploads out per file and not break down the files. If uploading three large video files each file could be uploaded to their separate "node" behind the loadbalancer. Just thought that could be pretty efficient. Would also enable scalability on a whole new level without requiring any downtime or even code updating. Just cloning one of the nodes, add to the loadbalancer and voilá, done.

It's absolutely no stress with the multiple upload part, but might there be a way to have a progress bar with the current upload functionality? I didn't really understand if the upload handler could be used for this or not?

Thank you once again for your impressive libraries. Most generous of you to share with the community in this way!
 
Upvote 0

pecket

Member
That point 3 question is of course only relevant when having simultaneous/asynchronous multiple uploads running. Sequential multiupload wouldn't really need this, I think. Don't know how smart or dumb the loadbalancers are tbh.
 
Upvote 0
Top