Subj : Re: Threading in JavaScript To : comp.lang.javascript,netscape.public.mozilla.jseng From : Gordan Date : Sun Feb 02 2003 11:26 pm Stephen wrote: >> Thank for the reply, Steve. >> >> I am already aware of the XMLHTTP method for downloading things. >> Unfortunately, it only allows the download of one file at a time, which >> is why I was looking for a different solution that allows me to download >> multiple files simultaneously. >> > > Will these (possibly as many as 100) files come from the same server or > from multiple different servers? Do you have control over all/any of > these servers' configs? No, no control over any server should be assumed. In theory, it could be any internet URL. > How do you envision "download[ing] multiple files simultaneously" > happening across TCP/IP using HTTP? What networking issues have you > considered in this context? I'm not sure what you mean by this. What I would like to do is fork a separate connection to each server and go a GET request. Then either wait for all of them to finish (not very efficient), or start processing for output as each separate download finishes (more desireable, but again, this gets academic without proper threading). While there isn't a "hard" limit on the number of pages that may be downloaded at the same time, I do not want to build in a specific limit. Ultimately, it will be limited by the bandwidth and other resources of the usre's machine. 100 files is a very extreme case. In reality, it is not likely to exceed 10, probably closer to 5 in the average case. Of course, if I could limit the number of simultaneous downloads, that is a useful and desirable feature, but that starts getting academic, unless there is a way to do parallel page retrievals in the first place. I know that this sounds like it could be dealt with through a "funnel" server, but I'm trying to come up with a solution that I will be able to re-cycle in other things that MIGHT need the extra scaleability in the future... Regards. Gordan .