parallel downloading

Discuss general web development questions. Help others and get help from others.

Moderator: kfury77

parallel downloading

Postby mapleleaf » Thu Mar 03, 2011 8:55 am

OK! Let's open up a can of worms.

Has anyone ever considered using a technique called 'parallel downloading' when they have a large number of images to display and/or to download?

Parallel downloading is a great concept to use.

Here is how to implement the technique.

1. make sure your images are between 80-120K in jpeg.
(if needed use a utility called Advanced jpeg compressor)
A size between 80-120K will not be a hindrance to those with a
connectivity to the internet being not a high speed broadband connection.
all images are in the 'images' sub-directory

2. setup three sub-domains for your domain
(ie) if your domain is http://www.domain.com
then the three sub-domain may be
http://www.s1.domain.com
http://www.s2.domain.com
http://www.s3.domain.com

3. let's for example use eight images in your html as follows:

<img src="http://www.domain.com/images/pic1.jpg">
<img src="http://www.s1.domain.com/images/pic2.jpg">
<img src="http://www.s2.domain.com/images/pic3.jpg">
<img src="http://www.s3.domain.com/images/pic4.jpg">

<img src="http://www.domain.com/images/pic5.jpg">
<img src="http://www.s1.domain.com/images/pic6.jpg">
<img src="http://www.s2.domain.com/images/pic7.jpg">
<img src="http://www.s3.domain.com/images/pic8.jpg">
...
...
...

Therefore, what is happening is that four http calls are being active rather than a single http call downloading
an image, completing its download and then proceeding to download the next.

In the example above when pci1.jpg is downloaded then the next image to download is pic5 and so on

Possible uses may be
1. online catalogues
2. shooping carts
3. image galleries

comments, anyone?

mapleleaf

http://www.mirana.net
User avatar
mapleleaf
 
Posts: 121
Joined: Thu Oct 14, 2010 2:21 am
Location: Ashcroft, BC Canada

Re: parallel downloading

Postby Capricorn » Sat Mar 05, 2011 12:54 pm

Does this really work? I think it is based on the browser settings, how many calls a browser creates.
User avatar
Capricorn
 
Posts: 63
Joined: Fri Aug 06, 2010 11:37 am
Location: Germany!

Re: parallel downloading

Postby mapleleaf » Sat Mar 05, 2011 7:53 pm

Capricorn wrote:Does this really work? I think it is based on the browser settings, how many calls a browser creates.


Yes it does work. I've used this technique in the past many times in addition to IP spoofing particularly in satellite/computer networks

Perhaps you should read more about it as there is lots of information, it is available just "Googlise". :D

In fact you can get up to a 40% increase in performance. This increase is due to the fact that overall there are less http calls made

I do recommend no more than three sub-domains for a total of four which is well within any limitation set by a browser(which btw you can adjust).


mapleleaf

http://www.mirana.net
User avatar
mapleleaf
 
Posts: 121
Joined: Thu Oct 14, 2010 2:21 am
Location: Ashcroft, BC Canada

Re: parallel downloading

Postby notuo » Wed Mar 09, 2011 5:21 pm

Yes, this works. It is recommended all over in some specialized sites.

The limitation within the browser is mainly for 1 domain and sub.domain is another domain, so it downloads in parallel.
User avatar
notuo
 
Posts: 258
Joined: Sat Jul 09, 2005 8:07 pm
Location: Tlalpan, Mexico City, Mexico

Re: parallel downloading

Postby mapleleaf » Fri Mar 11, 2011 1:51 am

notuo wrote:Yes, this works. It is recommended all over in some specialized sites.

The limitation within the browser is mainly for 1 domain and sub.domain is another domain, so it downloads in parallel.


The ideal is 1 domain and 3 sub-domains for parallel downloads which is very useful for online catalogs, shopping carts and the drag n drop carts, also good for preloading images. As mentioned previously, (ie) they are all the same domain
domain.com
image1-domain.com
image2.domain.com
image3.domain.com


I agree there is a browser limitation but four simultaneous download any browser can easily handle.

mapleleaf

ps. I've simplified the 3D cube with a JavaScript function paramter call so that a function call with parameters will change the image and the video to play, if you'd like to see this pm me.

http://www.mirana.net
User avatar
mapleleaf
 
Posts: 121
Joined: Thu Oct 14, 2010 2:21 am
Location: Ashcroft, BC Canada


Return to Web Developer Talk

Who is online

Users browsing this forum: No registered users and 13 guests