Re: [hybi] Web sockets and existing HTTP stacks

Justin Erenkrantz <justin@erenkrantz.com> Sun, 31 January 2010 16:25 UTC

Return-Path: <justin.erenkrantz@gmail.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 2568528C122 for <hybi@core3.amsl.com>; Sun, 31 Jan 2010 08:25:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.934
X-Spam-Level:
X-Spam-Status: No, score=-1.934 tagged_above=-999 required=5 tests=[AWL=-0.087, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, SARE_RMML_Stock10=0.13]
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 xYbJTt+QnZG5 for <hybi@core3.amsl.com>; Sun, 31 Jan 2010 08:25:15 -0800 (PST)
Received: from mail-px0-f186.google.com (mail-px0-f186.google.com [209.85.216.186]) by core3.amsl.com (Postfix) with ESMTP id 569C33A695A for <hybi@ietf.org>; Sun, 31 Jan 2010 08:25:15 -0800 (PST)
Received: by pxi16 with SMTP id 16so3829882pxi.29 for <hybi@ietf.org>; Sun, 31 Jan 2010 08:25:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=dxAVZByjSa5nBHdeT9OmXpft2d7dDGp+dU6SwVV+q8o=; b=frQ5nykRNhM7sNzG6S5nUq0sS9/mGMWEqC0d4pecDrXk90bFJ5mVLpnLMAsXCe00zG qMNsa+Q9iu9hWTUARnjeE8lc3/QZKCxlJ5a6HliTr8zLTZmWdlQ6nMx/EzSOSd5YTqmh B0u1pNvmwUal0KHpDgnRX6CqqVppzyARHlzbo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=ou9EOAaPH0/BazgszDc+7493a2p3LqnKNKUnmdlsa0+/iUUOAti4uQSLyhXLBmf+h6 G36BTmRZeQLuNlSw+da6Ly0j/GVd0pKXZ9RurHvqMXLxXEcCI0nRrz5wH5F67TMAcvRs OL1vf6WfmnJfZLc4dDxsY+TZx7M1Kx6zFttAA=
MIME-Version: 1.0
Sender: justin.erenkrantz@gmail.com
Received: by 10.142.195.18 with SMTP id s18mr2283413wff.325.1264955142618; Sun, 31 Jan 2010 08:25:42 -0800 (PST)
In-Reply-To: <Pine.LNX.4.64.1001310835410.3846@ps20323.dreamhostps.com>
References: <557ae280911171402v7546e5e7n93a1e57f87dc10e5@mail.gmail.com> <557ae280911200711i5493e654k67c1f5f07336bfb9@mail.gmail.com> <Pine.LNX.4.62.0912032347360.15540@hixie.dreamhostps.com> <4B2C1D52.9020505@webtide.com> <5c902b9e0912181640n497169cdrfa71f9a2908e6ef3@mail.gmail.com> <20091219005442.GA10949@shareable.org> <4B2C287E.1030006@webtide.com> <Pine.LNX.4.64.1001310835410.3846@ps20323.dreamhostps.com>
Date: Sun, 31 Jan 2010 08:25:42 -0800
X-Google-Sender-Auth: 4da8be408157d8d9
Message-ID: <5c902b9e1001310825v224e0c75we4e2bdb031119bd4@mail.gmail.com>
From: Justin Erenkrantz <justin@erenkrantz.com>
To: Ian Hickson <ian@hixie.ch>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: hybi@ietf.org
Subject: Re: [hybi] Web sockets and existing HTTP stacks
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: Sun, 31 Jan 2010 16:25:16 -0000

On Sun, Jan 31, 2010 at 1:22 AM, Ian Hickson <ian@hixie.ch> wrote:
> On the server side, if it's a Web Socket server, then HTTP is irrelevant,
> and again, the extra requirements don't matter. It can just send the Web
> Socket response (which happens to look like HTTP, but that's mostly just
> for consistency with the request). If it's an HTTP server, then Web Socket
> doesn't apply.

Given that the drafts mandate that WebSocket share a port with HTTP,
it is simply not possible to know ahead of time what the incoming
connections are going to be - unless the deployment uses separate IPs
which is the end result of these rules.

However, no reasonable deployment is going to give separate IPs to WS
versus HTTP - so, server-side implementors are left with two choices:
in the case of Jetty, we've seen them go through a whole bunch of code
contortions to implement the strict conformance rules or, what would
have to happen with httpd (because the hacks required would simply be
vetoed and it goes against the whole async server philosophy) - just
ignore them altogether.  Neither places WS on an immediate
good-feeling footing with server-side developers.

Since you brought up your employer and their "market share", I'm very
very willing to bet Google isn't going to use duplicate IP ranges just
for WS vs HTTP either.  They would have to teach their custom
front-ends how to share and route WS *and* HTTP requests as well over
the same port.  So, your colleagues are going to run into this issue
as well.  Perhaps out of courtesy, they went through the same hell
that Jetty went through - but, again, I can't go back to
dev@httpd.apache.org with a straight face and hack up the overall
architecture just for this non-feature.  The conformance that is
apparently so important would be sacrificed from day one.

As such, the draft should really make it as painless as possible to
share ports.  Either drop the port 80 requirement or drop the overly
strict conformance requirements: you simply can't have it both ways
and expect any serious buy-in from server developers.  (And, really,
altering ports isn't much better, but at least it's philosophically
cleaner.)  I realize that most client devs don't care about this for
the reasons Maciej pointed out (alas, the Serf client framework *does*
care much for the same reasons as httpd - but it obviously doesn't
have the market share of WHATWG's participants - so I don't expect
anyone to care), but this is such a ridiculously large pain point for
servers that is being constantly belittled by the person in charge of
the drafts that it makes me question even continuing to bother
providing feedback at all.  -- justin