Re: [hybi] WS framing alternative

Ian Hickson <ian@hixie.ch> Tue, 27 October 2009 21:21 UTC

Return-Path: <ian@hixie.ch>
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 5CC133A6873 for <hybi@core3.amsl.com>; Tue, 27 Oct 2009 14:21:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.562
X-Spam-Level:
X-Spam-Status: No, score=-2.562 tagged_above=-999 required=5 tests=[AWL=0.036, 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 BJMpip7DsT+s for <hybi@core3.amsl.com>; Tue, 27 Oct 2009 14:21:54 -0700 (PDT)
Received: from looneymail-a2.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 5E59B3A67AA for <hybi@ietf.org>; Tue, 27 Oct 2009 14:21:51 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id 3C98D16D3F7; Tue, 27 Oct 2009 14:22:06 -0700 (PDT)
Date: Tue, 27 Oct 2009 21:22:12 +0000
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <4AE76137.8000603@webtide.com>
Message-ID: <Pine.LNX.4.62.0910272118590.25608@hixie.dreamhostps.com>
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>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Cc: "hybi@ietf.org" <hybi@ietf.org>
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: Tue, 27 Oct 2009 21:21:55 -0000

On Wed, 28 Oct 2009, Greg Wilkins wrote:
> 
> Having a protocol optimized for ease of perl implementation, but that is 
> difficult to optimize for scale is not ideal.

Agreed, but this isn't the case here. If you're willing to use advanced 
techniques, then there's lots of things you can do to avoid copying -- for 
example, the same thing as people do now to avoid copying HTTP headers 
around. After all, HTTP headers are sentinel based; they don't have length 
declarations. And those are longer than most WebSocket messages likely 
will be.


> Besides - you say that there are quality utf-8 libraries available. So I 
> don't see the argument that says it is hard to know the length that is 
> being sent?

The existence of quality UTF-8 libraries does not imply that everyone will 
competently use them. Many uses of WebSockets will likely not need 
anything beyond basic ASCII -- it's only when the script is sending user 
data and you want to interpret it on the server-side that you need to 
decode the data.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'