Using jsp/servlets, a user clicks on a link in a jsp that sends a
request to a servlet to get a file list. When a user clicks on one of
the filenames' href, the servlet gets another request to download the
file. Everything is working except...

The first problem we have run into during testing is that when two users
click on the same file for downloading, the servlet locks up for one
request while handling the second request. When the first request is
finished, the second one              carries on. Not a good thing with
larger files, but, this is understandable due to servlets not being
multi-threaded.

We attempted to fix that problem by synchronizing the reading/writing of
the file. A new problem arose, when both users download the file, one
user gets a majority of the server bandwidth, while the other gets very
little.
(i.e. 400k per sec. vs. 40k per sec.)

Does anyone have a suggestion on how to manipulate the resources to
balance the download bandwidth equally amongst clients while still using
the servlet?          (Using servlets is a necessity due to the
application design)

Brian

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to