Re: [hybi] Proposed way forward for WebSockets

Willy Tarreau <w@1wt.eu> Tue, 27 July 2010 06:50 UTC

Return-Path: <w@1wt.eu>
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 C91433A68D6 for <hybi@core3.amsl.com>; Mon, 26 Jul 2010 23:50:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.913
X-Spam-Level:
X-Spam-Status: No, score=-2.913 tagged_above=-999 required=5 tests=[AWL=-0.870, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 21j7wMp6MJEG for <hybi@core3.amsl.com>; Mon, 26 Jul 2010 23:50:01 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 6D6013A67D1 for <hybi@ietf.org>; Mon, 26 Jul 2010 23:50:01 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id o6R6oIZZ016705; Tue, 27 Jul 2010 08:50:18 +0200
Date: Tue, 27 Jul 2010 08:50:18 +0200
From: Willy Tarreau <w@1wt.eu>
To: John Tamplin <jat@google.com>
Message-ID: <20100727065018.GA16134@1wt.eu>
References: <ECF0E97F-1DA2-4662-BA48-F68B65AA8179@apple.com> <4C4D66AF.9030905@opera.com> <Pine.LNX.4.64.1007270030120.24444@ps20323.dreamhostps.com> <AANLkTi=fx=Yfm_pe9-pdCc=5sKRP=dNfDEBYCKNHFOmH@mail.gmail.com> <op.vghnjpex64w2qv@annevk-t60> <AANLkTik5AB=UPJ47z8tEnVygJodPVAmppeXUymMBz+9n@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <AANLkTik5AB=UPJ47z8tEnVygJodPVAmppeXUymMBz+9n@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
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: Tue, 27 Jul 2010 06:50:02 -0000

On Tue, Jul 27, 2010 at 02:40:40AM -0400, John Tamplin wrote:
> On Tue, Jul 27, 2010 at 2:13 AM, Anne van Kesteren <annevk@opera.com> wrote:
> 
> > On Tue, 27 Jul 2010 06:56:27 +0200, Greg Wilkins <gregw@webtide.com>
> > wrote:
> >
> >> I would add 4: to support  the deployment of future extended versions of
> >> the protocol.
> >>
> >> Thus having a mechanism for versions and feature negotiation is key in a
> >> 1.0
> >>
> >
> > Feature negotiation is there, by means of new headers.
> 
> 
> If that is the intention, it would be good to state that in the protocol,
> especially since an earlier version specifically outlawed additional headers
> and there is confusion over the interpretation of the current version's
> stance on additional headers.

Yes indeed, that should be clarified. And BTW, saying "Upgrade: WebSocket/1.0"
would be *a lot* better than "Upgrade: WebSocket". And BTW, all Upgrade examples
in RFC2616 suggest such a version, so there is nothing unusual in doing that.
It's also what will a server know what it should consider in a handshake.

> > Breaking backwards compatibility so that you need to support two or more
> > versions forever seems like a bad idea.
> 
> 
> The alternative is simply breaking old implementations if there is no
> versioning and you find you need to make incompatible changes.  Including
> versioning now is small insurance against such a requirement.

Right, it costs nothing right now to advertise the version and to define how
each end should react to an unknown version.

> I think it is worth considering keep-alives for the initial version -- the
> alternative, if implemented at the application level, is a mess of
> incompatible implementations that can't be pooled or limited by the browser
> (such as on a phone that needs to curtail network activity to conserve
> battery) without interfering with legitimate traffic, since the browser
> can't identify it.

Indeed, and many protocols relying on long-lived sessions provide a ping
function because this is the only way to test the whole chain. Having it
available does not mean browsers will have to implement it, it just means
that when such a ping request is seen, a ping response must be emitted,
which is not something terribly difficult to implement.

Regards,
Willy