I use the occasion of the presentation of the book from Ido Green to ask something I always wanted to know! (Maybe for some of you it will be very easy, sorry for this!)
How many threads it is possible to run at the same time? There is a prefixed limit, or it depends on the server/client resources?
I second this question, and I think it would also be great to find out how it varies between browsers as well. I love firefox because of all its plugins and extensions, but my guess is that it's a real memory hog, especially if you start multi-threading. But is Chrome, IE, Safari etc any better?
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
So it depends on the client only (supposing we are not killing the server with our calls, obviously! )!
This means that if I deploy a new website that uses multithreading, I have to pay attention to the client (I should have different limits in case the user uses Chrome, Firefox, Explorer, or it is on a mobile device!)
It is this the logic to be applied, or there is another (and better) methodology?
"...It is this the logic to be applied, or there is another (and better) methodology?..."
I would think you should use the same limitation (from the design of your site/app) because in the end of the day, you wish to use web workers for 'long-lasting' tasks that will run in the background.
Maybe I'm too old-school, but I remember when browsers limited simultaneous connections to a server to 2. I would suspect that a browser running more than 2 web workers would still throttle on 2 connections (causing the third, fourth, etc to wait), so you'd have difficulty killing a server with lots of connections from lots of web workers. May make starting up lots of web workers kind of pointless if your goal is to download lots of content in simultaneous threads. I found this page that talks about the 2-connection limit:
@Dave - today most modern browsers got 6-40 connections: http://www.browserscope.org/?category=network so I guess we are in a better shape :)
Nevertheless, you are right about the idea that you should control the number of workers and their network usage.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop