Re: [hybi] how to improve websocket
Joshua Bell <josh@lindenlab.com> Thu, 22 October 2009 16:39 UTC
Return-Path: <josh@lindenlab.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 53FAA3A67FA for <hybi@core3.amsl.com>; Thu, 22 Oct 2009 09:39:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.426
X-Spam-Level:
X-Spam-Status: No, score=-1.426 tagged_above=-999 required=5 tests=[AWL=0.550, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=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 RNd8ZiNBKwpQ for <hybi@core3.amsl.com>; Thu, 22 Oct 2009 09:39:31 -0700 (PDT)
Received: from mail-iw0-f186.google.com (mail-iw0-f186.google.com [209.85.223.186]) by core3.amsl.com (Postfix) with ESMTP id 2247F3A687C for <hybi@ietf.org>; Thu, 22 Oct 2009 09:39:31 -0700 (PDT)
Received: by iwn16 with SMTP id 16so4583961iwn.29 for <hybi@ietf.org>; Thu, 22 Oct 2009 09:39:38 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.231.120.30 with SMTP id b30mr4569147ibr.15.1256229578005; Thu, 22 Oct 2009 09:39:38 -0700 (PDT)
In-Reply-To: <4ADD2FAC.9050902@webtide.com>
References: <4ADD2FAC.9050902@webtide.com>
Date: Thu, 22 Oct 2009 09:39:37 -0700
Message-ID: <f72742de0910220939j33d9d72cudad96857b592b801@mail.gmail.com>
From: Joshua Bell <josh@lindenlab.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: multipart/alternative; boundary="0016362850ecc0de5b047688bdde"
Subject: Re: [hybi] how to improve websocket
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 16:39:32 -0000
On Mon, Oct 19, 2009 at 8:34 PM, Greg Wilkins <gregw@webtide.com> wrote: > > http://blogs.webtide.com/gregw/entry/how_to_improve_websocket > > I agree with nearly all of of the critiques contained in that analysis. I do think it would be *possible* to defer the orderly close, message fragmentation/multiplexing, and extensibility suggestions and still produce a clearly understandable spec, but believe the rest is fundamental - specification style (as ABNF), simplified framing (see below), and semantic specification. In addition: * I seem to recall that one of the desires for sentinel-based frames was to allow octet streams for which the length was not known in advance. For example, streaming byte-oriented data from an input or other interface device, and not wanting to use a whole frame for each octet, nor wait until a certain amount of data had been buffered. That said, only UTF-8 (i.e. character-based) data is transmissible via the sentinel (without a separate encoding layer) per section 4.2, which limits the utility * My reading of section 4.2 (supported by the non-normative section 1.2) in draft-hixie-thewebsocketprotocol-50 is such that length-based binary data (frame types 0x80-0xff) are actually deprecated(?) - "6. Read /length/ bytes." "7. Discard the read bytes." - the data is never actually to be interpreted by the client! (Contrast step 5 in the sentinel frame section of the algorithm, which explicitly calls out when to indicate a message is received or discarded) Is this intentional, or an error in the WebSockets Protocol draft? Is this intentionally deprecated? (i.e. are there implementations which implement this such that the behavior must be reserved but is not advocated?) Assuming my reading is not mistaken, the result is confusing; efficient length-based transmission - which would be most applicable for sending chunks of data such as text (e.g. JSON-encoded data structures) - is not supported, yet sentinel-based transmission - most applicable for raw octet streams of unknown length - is supported but only when constrained to character-based transmission (as UTF-8 sequences). So... am I confused? (probably...)
- [hybi] how to improve websocket Greg Wilkins
- Re: [hybi] how to improve websocket Joshua Bell
- Re: [hybi] how to improve websocket Ian Hickson