W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: What changes to Web Messaging spec are proposed? [Was: Re: Using ArrayBuffer as payload for binary data to/from Web Workers]

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 21 Jun 2011 00:54:01 -0700
Message-ID: <BANLkTikbD075O9PC3bqEQyUQtrJ7jt25Uw@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: Andrew Wilson <atwilson@google.com>, Kenneth Russell <kbr@google.com>, David Levin <levin@chromium.org>, Arthur Barstow <art.barstow@nokia.com>, Glenn Maynard <glenn@zewt.org>, Dmitry Lomov <dslomov@google.com>, ben turner <bent.mozilla@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>, Travis Leithead <Travis.Leithead@microsoft.com>
On Tue, Jun 21, 2011 at 12:39 AM, Ian Hickson <ian@hixie.ch> wrote:
> On Mon, 20 Jun 2011, Jonas Sicking wrote:
>>
>> If data appears both in the .ports array and the .data property, then
>> people will be tempted to create protocols which only work if the array
>> buffer is transferred, i.e. if the receiver only looks in .ports. I.e.
>> people will likely end up with equally ugly solutions like:
>>
>> postMessage('vend-reply', [createClone(arraybuffer)]);
>
> Yeah, that's a very good point.
>
> It really seems like part of the problem here is that ports and
> arrayBuffers are quite different (in that one will always want to be
> transferred, but for the other you might want to sometimes transfer and
> sometimes not).

I don't think we should worry too much about suboptimal syntax when
transferring ports. We can always add more syntax sugar later if
people think it's annoying. Better keep the initial version simple
than to try to guess which use cases will be the most common ones.

/ Jonas
Received on Tuesday, 21 June 2011 07:54:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:45 GMT