Re: [hybi] Redesigning the Web Socket handshake

Greg Wilkins <gregw@webtide.com> Wed, 03 February 2010 04:36 UTC

Return-Path: <gregw@webtide.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 AAFA73A67FA for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 20:36:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.499
X-Spam-Level:
X-Spam-Status: No, score=-2.499 tagged_above=-999 required=5 tests=[AWL=0.100, BAYES_00=-2.599]
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 rMcs3GeeShBi for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 20:36:42 -0800 (PST)
Received: from mail-yx0-f174.google.com (mail-yx0-f174.google.com [209.85.210.174]) by core3.amsl.com (Postfix) with ESMTP id 97FE33A6774 for <hybi@ietf.org>; Tue, 2 Feb 2010 20:36:42 -0800 (PST)
Received: by yxe4 with SMTP id 4so949614yxe.32 for <hybi@ietf.org>; Tue, 02 Feb 2010 20:37:20 -0800 (PST)
Received: by 10.100.224.15 with SMTP id w15mr5069719ang.94.1265171840662; Tue, 02 Feb 2010 20:37:20 -0800 (PST)
Received: from ?10.10.1.11? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 16sm4479422gxk.3.2010.02.02.20.37.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Feb 2010 20:37:19 -0800 (PST)
Message-ID: <4B68FD77.7020107@webtide.com>
Date: Wed, 03 Feb 2010 15:37:11 +1100
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: Jamie Lokier <jamie@shareable.org>
References: <Pine.LNX.4.64.1002012305000.21600@ps20323.dreamhostps.com> <20100203025736.GS32743@shareable.org>
In-Reply-To: <20100203025736.GS32743@shareable.org>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] Redesigning the Web Socket handshake
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: Wed, 03 Feb 2010 04:36:44 -0000

Jamie Lokier wrote:

> An interesting idea I've looked at, which would be tricky but _really_
> improve widespread support (and compatibility), would be to send
> something which looks like a valid HTTP long-polling request, and
> allow the server and any proxies to proactively signal that they'll
> convert it to the more efficient WebSocket - when they will.  When
> they won't, communication continues over HTTP long-polling, carrying
> the same messages and subprotocols over that.  I guarantee if that
> could be pulled off, everyone would start using WebSocket asap ;-)

Cometd-2 (in alpha state) is more or less doing this already.

It should be in beta release shortly and then any cometd client
will be able to use websockets if the browser has it and the
server handshake says that the server supports it.  Otherwise
it is long polling business as usual.

regards