• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to increase the download speed in the following scenario ?

 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic