None. WS are not made to handle large chunks of data. There are, on the other hand, a number of options that are better suited to that task,like FTP, SFTP, or even straight HTTP. You can still use a WS for communicating the details needed to access the file, though.
Saving large files in the DB is also something that you should think hard about - it might be better to store just the metadata in the DB, and keep the files in a file system.
Agreed with Ulf.
Follwoing Ulf advicve can help in easier management of these large files later on
Oracle certified Java 8 Programmer I, Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
Joined: Sep 12, 2008
Ulf Dittmer wrote:None. WS are not made to handle large chunks of data. There are, on the other hand, a number of options that are better suited to that task,like FTP, SFTP, or even straight HTTP. You can still use a WS for communicating the details needed to access the file, though.
So after conversation with our network admin, we decided to use HTTPS. Now I have few more issues. We are going to have Tomcat clustering (i.e. multiple tomcat instance). Now typical URL to access the file would be https://www.mycompany.com/appname/.../video/<filename>. Obviously, video folder would be under webapps folder under tomcat. Now consider this scenario,
- First Request comes to server on tomcat instance 1 to download xyz.mov file. Server pulls it from database and saves it under webapps/.../video/ folder. And send OK response to caller.
How do I resolve this issue? Please let me know if I am not enough clear.
Joined: Mar 22, 2005
You could use a shared file system where files reside in one place, but are accessed from several web apps. It would be better not have those directories underneath Tomcat's web app directory hierarchy anyway. If the Tomcats are fronted by an Apache you could have the Apache serve those files out of one of its directories - it would be better suited for that task.