File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do download managers work

 
sushant prabhu
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If http is a stateless protocol . and suppose
we click on file which is to be downloaded on the our machine download managers lik getright or gozilla or download accelator come in to picture and provide us facilities lik segment downloading , resuming partial downloads etc.
in this case we are not using any username/password system which is required in protocols lik ftp and telnet via which the state of the user is maintained hence they r stateful.
what i want to know is how download manager tools overcome the stateless feature of the http protocol .
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making only (somewhat?) educated guesses.

The download manager will (if the web server supports it) make a request for a ten MB file in ten, one MB segements. This is then ten simultaneous download streams.
The softare can use temp files on the local machine to keep track of how far into a download you progress.

If the user machine disconnects, and you've only downloaded segments 1,2,3,4,5 and 7 (and 6,8,9,10 were only *partially* completed), then it can mark in the temp file that when the user wants to resume the file, to only request from the webserver the missing segments.

The original webserver is also in the temp file, along with the file name, and the missing segments. This completes all the state required to resume the download, and the stateless nature of HTTP has been 'worked around.'

Any getRight engineers on the site wish to weigh in?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic