Re: [hybi] Proposed way forward for WebSockets

Willy Tarreau <w@1wt.eu> Tue, 27 July 2010 08:45 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 12CD73A6BB3 for <hybi@core3.amsl.com>; Tue, 27 Jul 2010 01:45:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.891
X-Spam-Level:
X-Spam-Status: No, score=-2.891 tagged_above=-999 required=5 tests=[AWL=-0.848, 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 YsC8D103inYe for <hybi@core3.amsl.com>; Tue, 27 Jul 2010 01:45:07 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id CEDF33A6BAA for <hybi@ietf.org>; Tue, 27 Jul 2010 01:45:05 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id o6R8jLZN017520; Tue, 27 Jul 2010 10:45:21 +0200
Date: Tue, 27 Jul 2010 10:45:21 +0200
From: Willy Tarreau <w@1wt.eu>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20100727084521.GC16965@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> <20100727065018.GA16134@1wt.eu> <2378.1280217989.251681@puncture>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <2378.1280217989.251681@puncture>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <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 08:45:08 -0000

On Tue, Jul 27, 2010 at 09:06:29AM +0100, Dave Cridland wrote:
> FWIW, I think current thinking has swerved away from versions - if  
> you need to actually change version incompatibly, then you may as  
> well define a new protocol. If you need to incrementally add  
> features, then proper feature negotiation works fine.
> 
> The only advantages of bundling such features is where it makes  
> little practical sense to have feature B available without feature A,  
> and for political/marketing reasons, to encourage deployment of a  
> package of features.
> 
> The latter can be addressed by defined profiles of features (rather  
> like "WiFi" is a package of IEEE 802.11 features, or XEP-0243  
> packages up XMPP featuresets).
> 
> I'm not against versions, mind, I just think they're generally a last  
> resort, and a simple "I support these optional features" statement  
> from one or both sides works much more effectively in most cases.

I understand your point but I'm not convinced at all. A version is
a short way to advertise a feature set. Once you have to send all
of your requests with "WS-supported-feature: XXX, YYY, ZZZ", then
you'll find it a lot cheaper to define a new version which sets the
most commonly used sets by default so that we don't have to enumerate
them all. For instance, in HTTP, since version 1.1 we don't advertise
support for keep-alive nor do we advertise support for transfer-encoding,
those are covered by default by the version.

> There's keepalive frames - ie, I send you data, and you throw it on  
> the floor - and pings - ie, I send you data, and you send something  
> back.

yes you're perfectly right, I tend to merge them but they're distinct.

> These are two distinct cases, and although in general terms, TCP will  
> make both of them a two-way communication, a "real" ping can be used  
> for substantial diagnostics, whereas I suspect that the TCP ACK will  
> sneak under various thresholds.

And also the application will not be aware of the TCP ACK, it's only
the system. The application only knows it could successfully push the
data to the system's buffers and that the connection was not yet
detected as being broken.

Regards,
Willy