Re: [hybi] WS ABNF
Scott Ferguson <ferg@caucho.com> Wed, 17 February 2010 17:42 UTC
Return-Path: <ferg@caucho.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 AE8E03A7D1B for <hybi@core3.amsl.com>; Wed, 17 Feb 2010 09:42:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, UNPARSEABLE_RELAY=0.001]
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 WAG--WoVAEYr for <hybi@core3.amsl.com>; Wed, 17 Feb 2010 09:42:24 -0800 (PST)
Received: from smtp106.biz.mail.re2.yahoo.com (smtp106.biz.mail.re2.yahoo.com [206.190.52.175]) by core3.amsl.com (Postfix) with SMTP id B259F3A7D14 for <hybi@ietf.org>; Wed, 17 Feb 2010 09:42:24 -0800 (PST)
Received: (qmail 73326 invoked from network); 17 Feb 2010 17:44:01 -0000
Received: from dsl092-008-203.sfo1.dsl.speakeasy.net (ferg@66.92.8.203 with plain) by smtp106.biz.mail.re2.yahoo.com with SMTP; 17 Feb 2010 09:44:00 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: mv.Re9YVM1l0i7zjwq6nmnwG3m0s4c_Weni4iZCcDmXP0zVSmmy8ZootbTVVnEQfNZdnekYINM9Iitvneoch6HkfLhVcTOhxGy1OApLXCh8eqtWoAwz5N0dF56en_NNAALiCNNTM.0nI9iAXpw7BqJqXoZfSS3MOUekziK61aEDwZUcJAHyYcB6.9j4VQq3X_a_52EZ_TtZFTAuve8qmJXIDlp4PLETNR18m6YOTPILqkuPlnQZHPD2dVEgnXLLIJZMtD3M74O_zLmYO6mL8xUsQf4YufewUJMQgTPAvjyStEBg5rpi17AIyiARhL9Un1Rs9apavdq6dOk8SSwUN.lDVdZJNk4EzZ_QQXBgeAVNnpOLX4F0MFhNNy51b1AqakUKeOiJL3buiAFKunMbKawxX
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4B7C2ADF.3020705@caucho.com>
Date: Wed, 17 Feb 2010 09:43:59 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: Dave Cridland <dave@cridland.net>
References: <8B0A9FCBB9832F43971E38010638454F032E566DDF@SISPE7MB1.commscope.com> <18559.1266310165.853559@puncture> <4B7A5FD1.8090005@gmx.de> <18559.1266313683.441640@puncture> <20100217025338.GA1654@shareable.org> <14781.1266401848.423659@puncture> <4B7C216E.7040404@caucho.com> <14781.1266427136.173597@puncture>
In-Reply-To: <14781.1266427136.173597@puncture>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] WS ABNF
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: Wed, 17 Feb 2010 17:42:25 -0000
Dave Cridland wrote: > On Wed Feb 17 17:03:42 2010, Scott Ferguson wrote: >> This isn't complicated. > > Yes, yes it is. It's hugely more complex than it has any right or > reason to be. It's something like 6 lines of code to parse. I don't consider that hugely complex. Even parsing an HTTP chunk length is more complicated than this. >> Just use a chunk/fragment encoding that looks like >> >> len ::= [\x80-\xff]{0,3}[\x00-\x7f] >> >> The 0-terminating chunk takes up a single byte, small messages (< >> 128) only need two bytes of overhead, chunk lengths are limited to >> 32-bits (actually 28-bits but it doesn't matter), the total message >> size is arbitrarily large, and it's trivial to implement. >> >> > Not even remotely as trivial as encoding it as a 32-bit network byte > order integer. My point is that a compact representation is, here, > simply not needed. In UTF-8, it *is* needed, because the potential > savings are 75%, but here, the message itself is the bulk of the > transfer, and there is no point in wasting effort in making length > encoding harder than it needs to be to save a percentage point or two. The complexity is essentially the same. I agree that the savings are trivial, but the implementation is trivial as well. > >> If it's important to add message types (and that would be cleaner as >> a different layer), that's just a single extra byte of overhead. > > As I read it, there are already message types. I'm not wed to them > being there, although I can see the utility of having message types > and identifiers at a relatively low level. (It's useful both in BEEP > and XMPP, for example). Well, XMPP isn't exactly low-level :) -- Scott > > Dave.
- Re: [hybi] WS ABNF Dave Cridland
- Re: [hybi] WS ABNF Julian Reschke
- Re: [hybi] WS ABNF Greg Wilkins
- Re: [hybi] WS ABNF Thomson, Martin
- [hybi] WS ABNF Thomson, Martin
- Re: [hybi] WS ABNF Dave Cridland
- Re: [hybi] WS ABNF Julian Reschke
- Re: [hybi] WS ABNF Jamie Lokier
- Re: [hybi] WS ABNF Pieter Hintjens
- Re: [hybi] WS ABNF Dave Cridland
- Re: [hybi] WS ABNF Dave Cridland
- Re: [hybi] WS ABNF Greg Wilkins
- Re: [hybi] WS ABNF Scott Ferguson
- Re: [hybi] WS ABNF Dave Cridland
- Re: [hybi] WS ABNF Scott Ferguson
- Re: [hybi] WebSocket feedback Thomson, Martin
- [hybi] WebSocket feedback Ian Hickson
- Re: [hybi] WebSocket feedback Ian Hickson
- Re: [hybi] WebSocket feedback Greg Wilkins
- Re: [hybi] WebSocket feedback Vladimir Katardjiev
- Re: [hybi] WebSocket feedback Greg Wilkins
- Re: [hybi] WebSocket feedback Greg Wilkins
- Re: [hybi] WebSocket feedback Vladimir Katardjiev
- [hybi] Publishing drafts, Re: WebSocket feedback Julian Reschke
- Re: [hybi] Publishing drafts, Re: WebSocket feedb… Julian Reschke
- [hybi] Framing, was Re: WebSocket feedback Dave Cridland
- Re: [hybi] WebSocket feedback Greg Wilkins
- Re: [hybi] WebSocket feedback Vladimir Katardjiev
- Re: [hybi] WebSocket feedback Greg Wilkins
- Re: [hybi] WebSocket feedback Joe Hildebrand
- Re: [hybi] WebSocket feedback Greg Wilkins
- Re: [hybi] WebSocket feedback Greg Wilkins
- Re: [hybi] WebSocket feedback Julian Reschke
- Re: [hybi] WebSocket feedback Mridul Muralidharan
- [hybi] requirement: backwards compatible?. was : … Greg Wilkins
- Re: [hybi] requirement: backwards compatible?. wa… Anne van Kesteren
- Re: [hybi] requirement: backwards compatible?. wa… Vladimir Katardjiev