RE: Header Serialization Discussion

RUELLAN Herve <Herve.Ruellan@crf.canon.fr> Tue, 16 April 2013 16:07 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 0433A21F8EB2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 16 Apr 2013 09:07:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.249
X-Spam-Level:
X-Spam-Status: No, score=-10.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_FR=0.35, 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 qChg7HlblgsU for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 16 Apr 2013 09:07:40 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id E7C2121F9722 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 16 Apr 2013 09:07:39 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1US8Pn-0003oC-97 for ietf-http-wg-dist@listhub.w3.org; Tue, 16 Apr 2013 16:07:27 +0000
Resent-Date: Tue, 16 Apr 2013 16:07:27 +0000
Resent-Message-Id: <E1US8Pn-0003oC-97@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <Herve.Ruellan@crf.canon.fr>) id 1US8Pk-0003n4-Ku for ietf-http-wg@listhub.w3.org; Tue, 16 Apr 2013 16:07:24 +0000
Received: from inari-msr.crf.canon.fr ([194.2.158.67]) by lisa.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <Herve.Ruellan@crf.canon.fr>) id 1US8Pf-0003Ci-56 for ietf-http-wg@w3.org; Tue, 16 Apr 2013 16:07:23 +0000
Received: from mir-msr.corp.crf.canon.fr (mir-msr.corp.crf.canon.fr [172.19.77.98]) by inari-msr.crf.canon.fr (8.13.8/8.13.8) with ESMTP id r3GG6qUT002399; Tue, 16 Apr 2013 18:06:52 +0200
Received: from ADELE.crf.canon.fr (adele.fesl2.crf.canon.fr [172.19.70.17]) by mir-msr.corp.crf.canon.fr (8.13.8/8.13.8) with ESMTP id r3GG6qtJ007007; Tue, 16 Apr 2013 18:06:52 +0200
Received: from ADELE.crf.canon.fr ([::1]) by ADELE.crf.canon.fr ([::1]) with mapi id 14.02.0342.003; Tue, 16 Apr 2013 18:06:52 +0200
From: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>
To: James M Snell <jasnell@gmail.com>
CC: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Thread-Topic: Header Serialization Discussion
Thread-Index: AQHOOJXGmjMpOCwtBUqqQJWrF8FGKJjXZJiA///r4YCAAbYtcA==
Date: Tue, 16 Apr 2013 16:06:51 +0000
Message-ID: <6C71876BDCCD01488E70A2399529D5E5164113A5@ADELE.crf.canon.fr>
References: <CABP7RbfUH=U0hjcmEXKO1jJzy7pPffqFDE4TmAs-ahBX04qwJw@mail.gmail.com> <6C71876BDCCD01488E70A2399529D5E51640F0D1@ADELE.crf.canon.fr> <CABP7Rbcvqas52h8hJatDgqVQsnH3dHAkZREHTLU=ADKbx=0uSQ@mail.gmail.com>
In-Reply-To: <CABP7Rbcvqas52h8hJatDgqVQsnH3dHAkZREHTLU=ADKbx=0uSQ@mail.gmail.com>
Accept-Language: en-US, fr-FR
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.20.8.250]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Received-SPF: none client-ip=194.2.158.67; envelope-from=Herve.Ruellan@crf.canon.fr; helo=inari-msr.crf.canon.fr
X-W3C-Hub-Spam-Status: No, score=-3.7
X-W3C-Hub-Spam-Report: AWL=-3.005, RP_MATCHES_RCVD=-0.702
X-W3C-Scan-Sig: lisa.w3.org 1US8Pf-0003Ci-56 a859d6a3176dc377ad21bfdbcfa97f7e
X-Original-To: ietf-http-wg@w3.org
Subject: RE: Header Serialization Discussion
Archived-At: <http://www.w3.org/mid/6C71876BDCCD01488E70A2399529D5E5164113A5@ADELE.crf.canon.fr>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17260
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>


> -----Original Message-----
> From: James M Snell [mailto:jasnell@gmail.com]
> Sent: lundi 15 avril 2013 17:55
> To: RUELLAN Herve
> Cc: ietf-http-wg@w3.org
> Subject: Re: Header Serialization Discussion
>
> [snip]
>
> > My main concern with your proposal is about doing the LRU on both the
> encoder and the decoder.
> > I'd really like to keep the decoder as simple as possible, and so keeping all
> the buffer management on the encoder side is a real win for me.
> > In addition, the asymmetry means that the encoder is free to do whatever
> buffer management it wants. LRU is a very good default buffer management
> scheme, however I think there are cases where some clever scheme could
> beat it.
> 
> Well, it's not so much an LRU cache as a "least recently written"
> queue. The buffer essentially consists of 128 memory slots. These are
> assigned in order and rotate, with used slots deallocated and reassigned as
> the buffer fills past it's limit. The encoder, then, needs to be selective about
> just what it decides to assign to the buffer. So long as an implementation
> follows the proper assignment order, the specific implementation does not
> matter.
> 

I'm afraid that using a "least recently written" queue would have a bad impact on compaction performances. There are some headers that don't change over a whole session (e.g. the user agent), or only take a few values over the whole session (e.g. accept). With a rotating scheme, these headers would have to be periodically re-added to the buffer.

Hervé.