[webkit-dev] Parallel JavaScript: Why a separate ParallelArray types

Filip Pizlo fpizlo at apple.com
Sat Apr 13 10:33:44 PDT 2013


On Apr 13, 2013, at 10:01 AM, Ian Hickson <ian at hixie.ch> wrote:

> On Sat, 13 Apr 2013, Filip Pizlo wrote:
>>> 
>>> It doesn't imply you can't have locks, it implies you can't have 
>>> unprotected shared state.
>> 
>> Same difference. I think this is overly harsh. Nobody will hold a gun to 
>> your head and force you to use threads. The bumbling fools will probably 
>> ignore it.
> 
> You vastly underestimate the scale of the problem.

You vastly overestimate it.

It's a subjective statement.  I think this discussion would work better if we focused on the particulars of why, or why not, various approaches to concurrency, or lack thereof, work, or don't work.  I don't think general statements about scales of problems and under or overestimations will get us anywhere.

> 
> 
>> And even if the fool did use shared mutable state, the worst case 
>> outcome is a flaky webpage. It's not the end of the world.
> 
> Users don't blame the page. They blame the browser. The browser that 
> implements the API that lets authors get data corruption and deadlocks 
> ends up being "broken" relative to the browsers where authors can't do 
> those things. Users then migrate to the other browsers.
> 
> When it comes to the Web, this basically _is_ the end of the world.

I think this is a big leap.  Shared mutable state is not an "API that lets authors get data corruption and deadlocks".  You already conceded that it does not lead to deadlocks any more than message passing.  Any API lets authors get data corruption - this is just a natural outcome of there being no such thing as proven-correct software.

> 
> 
>> I don't think that shared mutable state is that bad for bumbling fools, 
>> particularly when compared to the status quo.
>> 
>> But on a higher level, I think that the bumbling fool argument ignores 
>> the level of sophistication that web developers are already capable of 
>> achieving.  The stuff people build with web technology never ceases to 
>> amaze me.  The web platform already has its warts, and people already 
>> find ways around them; they do so because on the whole, these are smart 
>> people.  Giving them a useful too that is already available and 
>> well-understood in other languages can only be a good thing.
>> 
>> I personally do not like thinking of the people who use the stuff I 
>> build as fools; I don't think it's constructive.
> 
> I didn't say authors were all fools, any more than I said they're all 
> genius hostile attackers.
> 
> However, that doesn't mean we can pretend that all Web authors are Jeff 
> Dean. There's a wide range of authors, from the nation-state-resourced 
> attacker literally trying to explode nuclear centrifuges or break into 
> e-mail accounts of political dissidents in order to kill them, to the 
> amateur programmers who make really elementary mistakes with a frightening 
> regularity yet manage to exercise all kinds of APIs in the Web platform.
> 
> What you are suggesting is a change to the entire design philosophy of the 
> platform, a philosophy that has made it one of the, if not the single, 
> most successful platform(s) in the history of computing. This isn't 
> something to be done lightly.

I appreciate the philosophy.  But are you suggesting that the true virtue of the web is the fact that it doesn't support concurrency, and that adding concurrency would annihilate all of the hard work that people have done?

Seems extreme.

> 
> (As a general note, by the way, I would recommend making proposals for new 
> features in a vendor-neutral forum like one of the WHATWG or W3C lists, 
> rather than in webkit-dev.)

I hear you loud and clear.  This thread emerged somewhat organically from a tangentially related proposal to add ParallelArrays.  I do have a preference for this to be discussed with a wider audience sooner rather than later, though I do appreciate the feedback on webkit-dev, and it's good to see such lively discussion coming even from non-WebKittens.

-Filip

> 
> -- 
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the webkit-dev mailing list