This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Performance and the fly likes how to increase the download speed in the following scenario ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Performance
Reply Bookmark "how to increase the download speed in the following scenario ?" Watch "how to increase the download speed in the following scenario ?" New topic
Author

how to increase the download speed in the following scenario ?

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 895

Please share your idea resolve below problem

How to write the file content faster using ServletOutputStream from server side? (We are using Spring framework)

We tried following ways in server side,

It takes to write around 55 Secs for 2.5 MB file content from MS-Amazon server to Java Client Code, Android Client code and IOS client code

Server Sample code 1


Server Sample code 2


Client side reader code


Please share your ideas to improve download speed

OCPJP 6(100 %) OCEWCD 6(91 %)
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16487
    
    2

It may be possible to compress the download using GZip and a servlet filter. If you use the Google keywords gzip servlet filter you should find examples, because this example shows up in almost every tutorial about servlet filters.

I hardly know anything about Spring, so I don't know how you use a servlet filter in Spring. Or whether Spring already has this (GZip) built in as an option.

And it's possible that your download data won't be compressed if you use GZip because it's already in some compressed format -- all we know is that you have a large download.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to increase the download speed in the following scenario ?
 
Similar Threads
downloading with applet from servlet
file download using servlet and showing progress
Download remote jar file using java
Problem with setBufferSize()
Download file from Servlet via Applet