Re: [hybi] ws and bwtp thoughts

Greg Wilkins <gregw@webtide.com> Thu, 22 October 2009 00:17 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 205E93A681A for <hybi@core3.amsl.com>; Wed, 21 Oct 2009 17:17:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000, 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 96F42LUtWAi2 for <hybi@core3.amsl.com>; Wed, 21 Oct 2009 17:17:33 -0700 (PDT)
Received: from mail-fx0-f218.google.com (mail-fx0-f218.google.com [209.85.220.218]) by core3.amsl.com (Postfix) with ESMTP id EB2693A66B4 for <hybi@ietf.org>; Wed, 21 Oct 2009 17:17:32 -0700 (PDT)
Received: by fxm18 with SMTP id 18so8451727fxm.37 for <hybi@ietf.org>; Wed, 21 Oct 2009 17:17:36 -0700 (PDT)
Received: by 10.103.125.17 with SMTP id c17mr3695658mun.16.1256170656397; Wed, 21 Oct 2009 17:17:36 -0700 (PDT)
Received: from ?192.168.1.117? (dsl081-052-134.sfo1.dsl.speakeasy.net [64.81.52.134]) by mx.google.com with ESMTPS id s11sm1463151mue.11.2009.10.21.17.17.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Oct 2009 17:17:35 -0700 (PDT)
Message-ID: <4ADFA49A.8060604@webtide.com>
Date: Wed, 21 Oct 2009 17:17:30 -0700
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
References: <8B0A9FCBB9832F43971E38010638454F0F1EA1D4@SISPE7MB1.commscope.com> <4ADEA997.10705@webtide.com> <8B0A9FCBB9832F43971E38010638454F0F1EA281@SISPE7MB1.commscope.com>
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F0F1EA281@SISPE7MB1.commscope.com>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] ws and bwtp thoughts
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, 22 Oct 2009 00:17:34 -0000

Thomson, Martin wrote:
> You make some good points there, but then use that as a 
> vehicle for expressing your opinion.

can't help myself :)


>> If you are concerned about reducing data usage,
> 
> That's another variable in the mix.  I personally tend to 
> value aspects like maintainability more highly.
> 
> Sure, metadata overheads are high, relative to our 
> expected payload, but given the nature of the
> problem space, I believe that there are better ways to
> spend our specification/implementation complexity budget
> than on such optimizations.

I can see both sides of this.

Needless to say that even with per message meta-data, I think we
can do a lot better than HTTP which has a lot of request/response
baggage in the accept-xyz headers.

So I don't think that we should immediately conclude that if
per message meta-data is supported, then we are going to see
hundreds of extra bytes per message.

One suggestion I have made previously is to simply define
another type byte for websocket that would mean the content
is mime encoded content with standard headers terminated by
CRLFCRLF.     To put that into my simplified websocket BNF
without channels is:

    ws1-frame           = frame-length
                          frame-type
                          octet-data

    frame-type          = 0x00    ; utf8 frame
                        / 0x01    ; mime encoded frame
                        / 0x02-FF ; undefined binary frame

    frame-length        = unlimited-integer

    unlimited-integer   = *( %x80-FF ) %x00-7F
                        ; concatenate 7 low order bits from each octet
                        ; to form a binary integer

    octet-data          = *( %x00-FF )
                        ; the number of octets is exactly the length determined
                        ; by the frame-length

But this would probably need either some websocket API changes
or some serious extra header conventions to allow transparent
sharing  of TCP/IP connections between websocket "connections",
but it at least opens the possibility.

In fact, header conventions could also be used to
implement channels and other protocol extensions without
needing to put them into the framing.

I think the cat is feeling very nervous about all
the different types of knives that can be used !

However, transporting mime encoded content is such an
obvious thing to do, that the strenuous rejection of
defining a type value for it made me even more concerned
about the non extensible nature of a fixed type byte
mapping.


cheers