Re: [hybi] Proposed way forward for WebSockets

"Anne van Kesteren" <annevk@opera.com> Thu, 29 July 2010 07:35 UTC

Return-Path: <annevk@opera.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C3F1A3A6898 for <hybi@core3.amsl.com>; Thu, 29 Jul 2010 00:35:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.527
X-Spam-Level:
X-Spam-Status: No, score=-6.527 tagged_above=-999 required=5 tests=[AWL=0.072, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6OuGuK9YA3dT for <hybi@core3.amsl.com>; Thu, 29 Jul 2010 00:35:22 -0700 (PDT)
Received: from smtp.opera.com (smtp.opera.com [213.236.208.81]) by core3.amsl.com (Postfix) with ESMTP id B2F293A698A for <hybi@ietf.org>; Thu, 29 Jul 2010 00:35:18 -0700 (PDT)
Received: from annevk-t60 (5355737B.cable.casema.nl [83.85.115.123]) (authenticated bits=0) by smtp.opera.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o6T7Z120009552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 29 Jul 2010 07:35:22 GMT
Content-Type: text/plain; charset="utf-8"; format="flowed"; delsp="yes"
To: Ian Hickson <ian@hixie.ch>, Jamie Lokier <jamie@shareable.org>
References: <ECF0E97F-1DA2-4662-BA48-F68B65AA8179@apple.com> <4C4D66AF.9030905@opera.com> <Pine.LNX.4.64.1007270030120.24444@ps20323.dreamhostps.com> <20100727160806.GG23142@shareable.org>
Date: Thu, 29 Jul 2010 09:35:02 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Anne van Kesteren <annevk@opera.com>
Organization: Opera Software ASA
Message-ID: <op.vglgn4xh64w2qv@annevk-t60>
In-Reply-To: <20100727160806.GG23142@shareable.org>
User-Agent: Opera Mail/10.70 (Linux)
Cc: hybi@ietf.org
Subject: Re: [hybi] Proposed way forward for WebSockets
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Jul 2010 07:35:28 -0000

On Tue, 27 Jul 2010 18:08:06 +0200, Jamie Lokier <jamie@shareable.org>  
wrote:
> Critical issue:
>
> After the first deployment wave, how can client WebSocket
> implementations request features without breaking the existing
> services that *reject* and *close* connections with additional state
> in the headers?

http://www.whatwg.org/specs/web-apps/current-work/complete/network.html#reading-the-client's-opening-handshake

"Unrecognized fields can be safely ignored, and are probably either the  
result of intermediaries injecting fields unrelated to the operation of  
the WebSocket protocol, or clients that support future versions of the  
protocol offering options that the server doesn't support."


> Useful connection sharing *cannot* be implemented in script:
>
> - How do you share a connection among multiple tabs?
> - How do you report the message events back to each tab?
> - How do you avoid blocking all tabs communications when a single tab
>   has a full event queue and is too busy to empty it?
>
> Browser security makes it somewhere between very difficult and
> impossible, depending on what browser quirks you take advantage of.
> This is already a problem today, using long-get HTTP.

You can do this via Web Workers. Specifically, a SharedWorker. As for the  
concern raised by Ian Fette, that should be addressed by adding  
cross-origin support to Web Workers.


> Although I think it's a good plan, don't assume piecemeal features
> automatically results in better client-side compliance.  It makes it
> simpler to write throwaway implementations.  That is useful, but might
> also result in *less* compliance on average with the base protocol due
> to quick and dirty implementations being good enough.  We'll see.

It has worked pretty well with some HTML5 features so far and having to  
implement less will make it easier for a single person to write a test  
suite that covers most everything in not too much time. But yeah, it  
always remains to be seen what the end result will be.


-- 
Anne van Kesteren
http://annevankesteren.nl/