Re: [hybi] frame length encoding

Salvatore Loreto <salvatore.loreto@ericsson.com> Sun, 22 August 2010 18:45 UTC

Return-Path: <salvatore.loreto@ericsson.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 155003A693F for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 11:45:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.707
X-Spam-Level:
X-Spam-Status: No, score=-103.707 tagged_above=-999 required=5 tests=[AWL=-1.423, BAYES_00=-2.599, SARE_MILLIONSOF=0.315, USER_IN_WHITELIST=-100]
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 3oIJUw3mQDAC for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 11:45:22 -0700 (PDT)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id AE7383A694C for <hybi@ietf.org>; Sun, 22 Aug 2010 11:45:18 -0700 (PDT)
X-AuditID: c1b4fb39-b7b91ae000001aef-5e-4c71705fabc4
Received: from esealmw127.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 3F.8D.06895.F50717C4; Sun, 22 Aug 2010 20:45:51 +0200 (CEST)
Received: from esealmw127.eemea.ericsson.se ([153.88.254.175]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Sun, 22 Aug 2010 20:45:51 +0200
Received: from mail.lmf.ericsson.se ([131.160.11.50]) by esealmw127.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Sun, 22 Aug 2010 20:45:29 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id B6894253E for <hybi@ietf.org>; Sun, 22 Aug 2010 21:45:29 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 7D8724FD0B for <hybi@ietf.org>; Sun, 22 Aug 2010 21:45:29 +0300 (EEST)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 0A4234ECF5 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:45:28 +0300 (EEST)
Message-ID: <4C717048.5020309@ericsson.com>
Date: Sun, 22 Aug 2010 20:45:28 +0200
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6
MIME-Version: 1.0
To: hybi@ietf.org
References: <AANLkTimKbmcpgx8k0uXUWvCO=8w9pPrtV=3y4qh6363k@mail.gmail.com> <20100820192927.GA32620@1wt.eu> <4C6EEA55.2050205@hs-weingarten.de> <AANLkTinHqxUOZaVANFpC52t8FfgNw2L5_A-s9Az3Fm7p@mail.gmail.com> <AANLkTinvkxMP8FYz9xjDu_Kt9FfzYotgsqXUDB4MZMEo@mail.gmail.com> <AANLkTim3KRq1arso7wN_b+1TH3sWabYW6uFu7AbYw6-P@mail.gmail.com> <AANLkTikhhajho895WyEoJMwMk9GJ98kA0Mjy5qr4apC8@mail.gmail.com> <AANLkTi=kdk6BRvza_7bpoLNTFzUkjcRRijGLMe_NGXZV@mail.gmail.com> <AANLkTi=VE298Tg+qyfufhzMswE5pBxtPZhA0t2k=sf2A@mail.gmail.com>
In-Reply-To: <AANLkTi=VE298Tg+qyfufhzMswE5pBxtPZhA0t2k=sf2A@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-OriginalArrivalTime: 22 Aug 2010 18:45:30.0037 (UTC) FILETIME=[31B7A650:01CB422A]
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] frame length encoding
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: Sun, 22 Aug 2010 18:45:24 -0000

On 8/21/10 9:59 PM, Pieter Hintjens wrote:
> On Sat, Aug 21, 2010 at 9:34 PM, John Tamplin<jat@google.com>  wrote:
>
>    
>> But those are going to be highly compressible, and will easily compress to
>> under 126 bytes, even with some application level framing around them.
>>      
> Compression is not an option for low-latency cases (where volumes are
> in the millions of messages /second).  We're already finding that
> zero-copy techniques halve the cost of processing.  So the sweet spot
> for these really high volume messages remains above 127 bytes IMO.
> However, websockets is not intended for the financial markets, and
> probably won't ever be used for such volumes.
>
>    
>> The main difference between #0 and #1 is that #0 uses one of three reserved
>> bits.  They are easy to spend, but then when we find out we need them it
>> becomes much more expensive to get them back.
>>      
> Indeed.  Adding another 8 reserved bits in the header does not seem wasteful.
>    
(as individual)

I agree on the fact that with the fact that adding an extra byte to the 
WebSocket header would
cost very little also for very small payload.

I don't understand because 4bytes basic header (+length field +payload) 
as defined in http://tools.ietf.org/html/draft-ietf-core-coap-01#section-3.1
is good for constrained devices and constrained networks: btw 
constrained devices are the one usually just exchanging 1byte payload

and we can not define a 2byte basic header (+length field +payload) for 
WebSocket, reducing the complexity present in the previous proposals
using 1 or 2 bits to indicate the length header,
and also providing more room (bits) for future extensions (actually we 
could also think to use 2bits for version the protocol)

cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com