W3C home > Mailing lists > Public > public-html@w3.org > November 2008

RE: Workers

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 12 Nov 2008 23:10:03 +0000 (UTC)
To: Justin James <j_james@mindspring.com>
Cc: public-html@w3.org
Message-ID: <Pine.LNX.4.62.0811122200330.1237@hixie.dreamhostps.com>

On Wed, 27 Aug 2008, Justin James wrote:
> 
> I finally figured out why I'm coming up with use cases that aren't 
> seeming clear to you... most of the code that I write that uses threads 
> is more in the "parallel processing" vein, and this concept is aimed 
> more at "asynchronous processing". So my experience is informed quite 
> heavily by running, say, 1,000,000 copies of the same block of code 
> against different values from an array, and your experience is informed 
> by maybe fetching an XML file "behind the scenes" and parsing it and 
> displaying some values from it to the user.
> 
> Do you think that it might make sense to provide guidance to developers 
> in this item that presents some information like, "Web workers are good 
> for XYZ, they are not good for ABC"?

I've added a Scope section that covers these kinds of issues.


> > > > This seems unlikely. All use cases I can think of for running many 
> > > > scripts will all be running the same one (or few) scripts, not 
> > > > many many different ones.
> > >
> > > Since as far as I can tell, the only way to pass parameters to these 
> > > scripts is via the URL itself, I think that you are missing out.
> > 
> > You can pass parameters using postMessage().
> 
> That passes data into the queue of the worker itself. But what if you 
> need to pass data to the server when you call the URL? For example, 
> maybe the code provided by URL is dynamically generated by the server? 
> I've done things like this before, and in certain situations it makes a 
> lot of sense. In those situations, you want to be able to do POST to the 
> server to retrieve the script used to create the Web Worker.

I really don't see this as a common use case, so I don't want to add 
features to the API to handle them. At least, not in this version.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 12 November 2008 23:10:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:24 GMT