[twsocket] Threaded FTP Client

Sandy Ganz sganz@bizrate.com
Wed, 14 Jun 2000 10:14:49 -0700

Thanks for the info. The multi FTP client is necessary for what I'm doing as
we have  batch of downloads of very large files, if one is going slow (as is
often the case), the other will proceed to use the bandwidth of the several
T1 lines we have. So bandwidth is not the issue since we are FTP'ing from a
different site for each download and it is more of a keep the pipe full at
all times issue. Also since these downloads are time sensitive (from when
they must start, no download time) the multi-threaded approach (or Async)
will be more important. So I guess if I were 'Smut-Netting' and hitting one
site not a huge benefit.

Thanks for all to good tips, I will get at some coding and see how I make


-----Original Message-----
From: twsocket-admin@elists.org [mailto:twsocket-admin@elists.org]On
Behalf Of Davie
Sent: Tuesday, June 13, 2000 3:07 PM
To: twsocket@elists.org
Subject: Re: [twsocket] Threaded FTP Client

The different clients you have downloading normally DOES IMPACT the other
ftpclients you have running. Think about it. You have a modem that can
data at 5K persecond and you open a ftpclient up and start to download, so
get it normally at about 5K per second!!! That's fine, but now let's say
you open 10 ftpclients, then you would be silly to think that ALL 10 of them
would download at 5K per second. You are limited by your bandwidht which is
by your modem 99% of the time. So in the case of 10 instances of ftpclient,
each would get around 512bytes per second.

So basically it doesnt matter if you are single thread or multi thread, they
will ALWAYS IMPACT on each other!!!

What I was talking about earlier is, IF YOU connect to a ftp server which
down the transfers to a rate that is SMALLLLLLER than what your connection
handle, then I was saying it would be BENIFIAL to use similtaneous downloads
screw the peoiple at the ftp site and achieve a higher bandwidth anway :)


"Alexander J. Fanti" wrote:

> What?  I don't get it.
> The speed at which one FTPCli works (transfer rate) shouldn't impact the
> other one weather they are in the same thread or two different threads...
> right?  Or am I wrong here?
> Alex
> ----- Original Message -----
> From: "Davie" <smatters@smatters.com>
> To: <twsocket@elists.org>
> Sent: Tuesday, June 13, 2000 4:50 PM
> Subject: Re: [twsocket] Threaded FTP Client
> > personally it depends on the users of the resulting program. For
> if
> > you want a commercial grade program, then you need to put them into
> seperate
> > threads, because let me give you an example:
> >
> > Let's pretend you are downloading from a site that has a lot of nudy
> and
> > this site is hit heavily. WEll, a lot of times the server will THROTTLE
> the
> > speed at which you can download from the site. So for example, even
> you
> > may have a 50K per second connection, maybe the server will only send
> file
> > at 5K per second :) So, if you had 10 100K files, then it would take
> 100*10/5 =
> > 200 seconds. Now let's say you SIMULTANIOUSLY downloaded them , ie: 10
> a
> > time, then EACH ONE COULD get downloaded at 5K per second, thus your
> thru
> > put would be 50K per second :) And thus your total download time would
> 20
> > seconds. Very rarely will you see a site that not only throttles the
> bandwidth
> > of a connection AND the bandwidth of the IP connection. Actually I have
> only
> > seen one site that did that. What that means is not amtter how many
> transfers
> > you have going, the server is smart enough to detect that they are all
> from you
> > (a single IP) and then throttles the entire bandwidht on you so that you
> only
> > get the 5K per second total.
> >
> > Davie
> > P.S. So, basically, YES put them in seperate threads!
> >
> > Sandy Ganz wrote:
> >
> > > I may have made the question too complicated so here it is rephrased -
> > >
> > > I want to have several FTPCli components that download a list of
> required
> > > files, would it be better to put each one in a thread, or just create
> them
> > > and use them in sync mode and be done with it.
> > >
> > > Suggestions. I'm just making a program that will look at a queued list
> of
> > > FTP download requests and send them to the next available FTPCli
> component.
> > >
> > > Thanks
> > >
> > > Sandy
> > >
> > > _______________________________________________
> > > TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
> > > Visit our website at http://www.rtfm.be/fpiette/indexuk.htm
> >
> >
> > _______________________________________________
> > TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
> > Visit our website at http://www.rtfm.be/fpiette/indexuk.htm
> _______________________________________________
> TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
> Visit our website at http://www.rtfm.be/fpiette/indexuk.htm

TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
Visit our website at http://www.rtfm.be/fpiette/indexuk.htm