Re: downloading a single file using multiple threads



"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message news:1175082625.991826.242090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 28, 10:30 am, "Willy Denoyette [MVP]"
<willy.denoye...@xxxxxxxxxx> wrote:
<keerthyragavend...@xxxxxxxxx> wrote in message

news:1175057072.261471.167010@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> hi

> i'm downloading a single file using multiple threads...
> how can i specify a particular range of bytes alone from a single
> large file... for example say if i need only bytes ranging from
> 500000 to 3200000 of a file whose size is say 20MB...
> how do i request a download which starts directly at 500000th byte...
> thank u
> cheers

Simple answer: you can't *download* a file in chunks, unless you implement a client/server
protocol for this.

Note that there already protocols which *do* support this, including
FTP and HTTP, both optionally as far as the server is concerned.


A *single file* download from an FTP or HTTP server? How do you indicate what chunk of the file you want when say using FTP? As far as I know this is not part of the FTP neither of HTTP protocol.


The question is - what makes you think you need multiple threads to *download* a file? If
you think you can speed-up the download by doing this, then you are wrong. The bottleneck
will always be the network, so if you download the file in one chunk, you'll get the maximum
throughput, introducing multiple threads will actually slowdown the whole process.

That depends - some servers may throttle per connection, at which
point it may make sense to have multiple connections (although
somewhat naughty). Also, in a more advanced way, if the same file is
available through multiple mirrors, it may make sense to get different
bits from different mirrors.

This is a fairly common thing to do - a lot of web "download managers"
do it.


Per file? I mean, retrieve a *single file* from multiple servers in chunks? Say the first 10 MB's from server A the next 2MB from server B, the next 3 MB from server C? Never heard of something like this.
All I know that there are download managers that download file A from server A, file B from server B etc.. in case of multi-file downloads.

Willy.



.



Relevant Pages

  • Re: Scsi VS Sata for a download server
    ... > a very important download. ... It's not a single file. ... > We're getting a Dual xeon 2.8 GHZ server with 2 GB ram and I'm not ... I would recommend SATA 2 drives. ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Scsi VS Sata for a download server
    ... > My company is spending a whole bunch on money on a server just to ... > a very important download. ... It's not a single file. ... > We're getting a Dual xeon 2.8 GHZ server with 2 GB ram and I'm not ...
    (comp.sys.ibm.pc.hardware.storage)
  • Scsi VS Sata for a download server
    ... My company is spending a whole bunch on money on a server just to host ... It's not a single file. ... where users download whatever part they need using our software client. ... We're getting a Dual xeon 2.8 GHZ server with 2 GB ram and I'm not sure ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Now, another question about Xnews
    ... you're allowed several connections simultaneously to ... > your server, and each connection has a speed-cap individually, ... > newsrc)and download parts of a post in one, ... instead of opening multiple aliases (or whatever ...
    (news.software.readers)
  • Re: List of Hotfixes to fix DX10/SLI/GPU/Memory in Gaming
    ... 'KB933590 - Fixes issues when running multiple monitors when playing ... Request Download: ... Download the AMD 64 Multiple Core Optimizer (Enhances performance while ... nHancer - The Advanced Control Panel and Profile Editor for ...
    (microsoft.public.windows.vista.games)