Re: Alternative Header Compression Update..

James M Snell <jasnell@gmail.com> Thu, 11 July 2013 17:34 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0EB5921F9E1A for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 11 Jul 2013 10:34:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.537
X-Spam-Level:
X-Spam-Status: No, score=-10.537 tagged_above=-999 required=5 tests=[AWL=0.062, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nOB8bVnl4NmC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 11 Jul 2013 10:34:10 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id BD3E121F9EB8 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 11 Jul 2013 10:34:06 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UxKjz-0006Si-Qs for ietf-http-wg-dist@listhub.w3.org; Thu, 11 Jul 2013 17:33:15 +0000
Resent-Date: Thu, 11 Jul 2013 17:33:15 +0000
Resent-Message-Id: <E1UxKjz-0006Si-Qs@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UxKjs-0006Rg-Af for ietf-http-wg@listhub.w3.org; Thu, 11 Jul 2013 17:33:08 +0000
Received: from mail-oa0-f41.google.com ([209.85.219.41]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UxKjq-00045d-Ef for ietf-http-wg@w3.org; Thu, 11 Jul 2013 17:33:08 +0000
Received: by mail-oa0-f41.google.com with SMTP id n10so11808961oag.28 for <ietf-http-wg@w3.org>; Thu, 11 Jul 2013 10:32:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=/KfnxIrFShtObqD2eVmqVjCNUzibjGduX/zfhMF2SaA=; b=K+Inbq+qMq0me2/6onDYx581HHiqFHvypsHxEWoecQ1qSPtuGA5uvwj3vbqvsrteJD pzkg44K3o3wcwrW0olPx8zkiEdMtI4Xgw+lgX7A9pUzEpnljrhlUB1LLw2wEfSbW+a8n BhdrqqeiAnULPDXcxRoB2e+1yvLS8fYcGR0RbxAee5Qbjs8vT3/OMOo/a/7qxexKf72M AGZjchh0+OCRMMcbTjuej4d/heG1ZfOo2Giat5xpDbXIOHSuAvTP3vuTXGCtYrsS1TA+ yJ3JzdTZkKYr0vCaIMqsZqPJI7iLeEq/CWab0VjWRjcUpArpvratbSUFVcNskkYYvTts VMFg==
X-Received: by 10.182.87.73 with SMTP id v9mr32628023obz.90.1373563960558; Thu, 11 Jul 2013 10:32:40 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.55.8 with HTTP; Thu, 11 Jul 2013 10:32:20 -0700 (PDT)
In-Reply-To: <6C71876BDCCD01488E70A2399529D5E525EF0080@ADELE.crf.canon.fr>
References: <CABP7RbcoTSGVbGKkzwtCjKL__mC_3m91tsu=V5U8wQAMGfG=Ag@mail.gmail.com> <6C71876BDCCD01488E70A2399529D5E525EF0080@ADELE.crf.canon.fr>
From: James M Snell <jasnell@gmail.com>
Date: Thu, 11 Jul 2013 10:32:20 -0700
Message-ID: <CABP7RbcHf0=ph7U1TrMr33oYVhdpd53bgyU=_q-7m8FQTt8qsw@mail.gmail.com>
To: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=209.85.219.41; envelope-from=jasnell@gmail.com; helo=mail-oa0-f41.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.697, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1UxKjq-00045d-Ef d36b658dfe3a406a436854f03632cf27
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Alternative Header Compression Update..
Archived-At: <http://www.w3.org/mid/CABP7RbcHf0=ph7U1TrMr33oYVhdpd53bgyU=_q-7m8FQTt8qsw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18698
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Well, looking at Indexed references currently, the 256-entry table
means that every index position can be represented using a single
octet. If we represent each entry separately that means we would end
up always using two bytes to represent index positions > 127. If we
look at an example: Let's suppose we want to specify index references
for items 20, 40, 130, 140, 150 and 160...

Separately encoding using the current header compression scheme would be:

  94 a8 ff 03 ff 0d ff 17 ff 21

Using the grouped approach, we would encode as...

  86 14 28 82 8c 96 a0

Encoders are given the choice of whether to use the groups or not. If
the groups are not used, we end up encoding with 2 bytes per indexed
reference which means only two additional bytes relative to encoding
separately:

  80 14 80 28 80 82 80 8c 80 96 80 a0

While this is not as compact as the first option, I generally prefer
it because I don't need to worry about the variable length integer
encoding when I know my index position will never exceed FF.


On Thu, Jul 11, 2013 at 9:55 AM, RUELLAN Herve
<Herve.Ruellan@crf.canon.fr> wrote:
> James,
>
> The 256-entry table acting as a circular buffer is probably a cleaner solution than what is currently in the compression spec.
>
> For the low-level encoding of entries, I think I prefer encoding each entry separately using a few bits to signal which encoding is used. This is much simpler to use, and I would think slightly more compact.
>
> Hervé.
>
>> -----Original Message-----
>> From: James M Snell [mailto:jasnell@gmail.com]
>> Sent: mercredi 10 juillet 2013 02:40
>> To: ietf-http-wg@w3.org
>> Subject: Alternative Header Compression Update..
>>
>> All,
>>
>> Even tho we decided at the face-to-face to move forward with the header
>> compression draft as the starting point with header compression in http/2 for
>> the implementation draft, I definitely remain skeptical of the overall design
>> of the scheme. I have voiced my reservations in the past and after
>> implementing the current header compression scheme, my reservations
>> about it's design remain.
>>
>> Combining elements of my previous explorations here with ideas from the
>> current header compression draft, I have posted another update to the
>> "Stored Header Encoding" draft.
>>
>>   http://www.ietf.org/id/draft-snell-httpbis-bohe-11.txt
>>
>> This details an alternative scheme that ditches the differential encoding and
>> the reference set, uses a fixed range of header table indices (0x00-FF), and
>> uses a least-recently-written eviction strategy without renumbering. This
>> approach is significantly less complicated to implement at the cost of only a
>> small handful of additional bytes on the wire.
>>
>> - James
>