Re: [hybi] WS framing alternative

Rory Byrne <rory@jinsky.com> Thu, 29 October 2009 12:31 UTC

Return-Path: <rory@jinsky.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 C99C33A682E for <hybi@core3.amsl.com>; Thu, 29 Oct 2009 05:31:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.534
X-Spam-Level:
X-Spam-Status: No, score=-2.534 tagged_above=-999 required=5 tests=[AWL=-0.065, BAYES_00=-2.599, 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 Xco6OsbvfTEz for <hybi@core3.amsl.com>; Thu, 29 Oct 2009 05:31:08 -0700 (PDT)
Received: from almeida.jinsky.com (almeida.jinsky.com [88.198.96.187]) by core3.amsl.com (Postfix) with ESMTP id 7DA053A67A1 for <hybi@ietf.org>; Thu, 29 Oct 2009 05:31:08 -0700 (PDT)
Received: from almeida.jinsky.com (localhost.localdomain [127.0.0.1]) by almeida.jinsky.com (Postfix) with ESMTP id 00D4333B7BC for <hybi@ietf.org>; Thu, 29 Oct 2009 13:31:22 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jinsky.com; h=date:from:to :subject:message-id:references:mime-version:content-type: in-reply-to; s=meh; bh=PYsjhdvCSEqhDX8hiDRxn1/H14A=; b=A0U81YT15 LWI55dZmgSvao1dHTgKLJu7qho2T6NjOBXZWPQ3kfm/FsdUXGOH2j0LFZP4K6Rbo LmB6F29uCv+L44YhKMBYUPNlkvEblq8aBhhQC3NkOxYa07aboHCtlI5yTEmzbkrK Ik6tCyeoyyQ841zPqWuY9VByjbd387BfU8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=jinsky.com; h=date:from:to :subject:message-id:references:mime-version:content-type: in-reply-to; q=dns; s=meh; b=kTL6pxeEdyWYRM8BWdCHOi5UNv4mJvPiHR/ 4qNirdNYLt/q0HUGoWwLdU1FHSC9SyoMSFeNvdfdI5shYtm/FianP3kFQOr8p/98 n826SXCrKTLuYRWWdLAP9RM0AEDkMat6ZUAg+P5pJ2EzGnB6Nah/BMk3Ql0/60Hh L+O/lZzU=
Received: by almeida.jinsky.com (Postfix, from userid 1000) id 2C6BC33B7B4; Thu, 29 Oct 2009 13:31:21 +0100 (CET)
Date: Thu, 29 Oct 2009 13:31:21 +0100
From: Rory Byrne <rory@jinsky.com>
To: hybi@ietf.org
Message-ID: <20091029123121.GA24268@almeida.jinsky.com>
Mail-Followup-To: hybi@ietf.org
References: <8B0A9FCBB9832F43971E38010638454F0F1EA72C@SISPE7MB1.commscope.com> <Pine.LNX.4.62.0910270903080.9145@hixie.dreamhostps.com> <a9699fd20910270426u4aa508cepf557b362025ae5db@mail.gmail.com> <Pine.LNX.4.62.0910271824200.25616@hixie.dreamhostps.com> <4AE76137.8000603@webtide.com> <Pine.LNX.4.62.0910272118590.25608@hixie.dreamhostps.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.62.0910272118590.25608@hixie.dreamhostps.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Subject: Re: [hybi] WS framing alternative
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 Oct 2009 12:31:09 -0000

Hi Everyone,

I'm new to this list.

Just wanted to jump in here and throw my support in with the server
developers who want to see a byte count on all frames.

I think that Greg Wilkins is right on the money in what he says
about managing server resources. A byte count which tells a server
how much data a client intends to push to it, is a critical piece
of information. We're talking about servers that are going to have
many thousands of clients permanently connected to them for weeks,
or months, on end. To stay alive, these servers will need to be
excellent at resource management. IMO, the protocol as it stands
at the moment, is not giving these servers the information they
require to enable them to adequately manage their resources.

In a further effort to boost our chances of building robust
WebSocket servers, I would hope that we might consider adding some
sort of maximum frame length negotiation. Nothing fancy, there
could be a suitable default maximum, and a 'Max-Frame-Length' header
which enables a client to negotiate a higher maximum. Maybe something
like this:

        GET /demo HTTP/1.1
        Upgrade: WebSocket
        Connection: Upgrade
        Host: example.com
        Origin: http://example.com
        WebSocket-Protocol: sample
        Max-Frame-Length: 2097152

        HTTP/1.1 101 Web Socket Protocol Handshake
        Upgrade: WebSocket
        Connection: Upgrade
        WebSocket-Origin: http://example.com
        WebSocket-Location: ws://example.com/demo
        WebSocket-Protocol: sample
        Max-Frame-Length: 1048576

The server would only send a 'Max-Frame-Length' header if it wanted to
set the maximum to be lower than the client suggested. Any thoughts?

On the whole, I'm really excited about this effort to introduce the
Web Socket protocol. It's great to see that there's buy-in from browser
developers, and I'm really looking forward to testing out their
implementations!

Thanks,

Rory