Re: delta encoding and state management

James M Snell <jasnell@gmail.com> Thu, 17 January 2013 20:01 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 7A34B21F8919 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 17 Jan 2013 12:01:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.085
X-Spam-Level:
X-Spam-Status: No, score=-9.085 tagged_above=-999 required=5 tests=[AWL=1.513, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aNWqZy1e8tnD for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 17 Jan 2013 12:01:38 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 695FC21F88F7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 17 Jan 2013 12:01:33 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Tvvdr-0007T3-LE for ietf-http-wg-dist@listhub.w3.org; Thu, 17 Jan 2013 20:00:51 +0000
Resent-Date: Thu, 17 Jan 2013 20:00:51 +0000
Resent-Message-Id: <E1Tvvdr-0007T3-LE@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Tvvdl-0007SJ-CJ for ietf-http-wg@listhub.w3.org; Thu, 17 Jan 2013 20:00:45 +0000
Received: from mail-ia0-f175.google.com ([209.85.210.175]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1Tvvdh-0001sq-7p for ietf-http-wg@w3.org; Thu, 17 Jan 2013 20:00:45 +0000
Received: by mail-ia0-f175.google.com with SMTP id r4so743948iaj.34 for <ietf-http-wg@w3.org>; Thu, 17 Jan 2013 12:00:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=GprccPfWcbp6yEr8zOtClt6muDouDnFMvyKjCdWLHyw=; b=SDpHStWKVkq17XbDGeNMbArG+B5pqnJjOB/NKRexeaA2liHVjj6gXf0/B9l2OwdN5O 82s0ygp5Yma0RYNV9DBl/uP2DsfLwLN8+YBi6r7JUEpqpJGxpU5Qxfr8y4VtdLL7o2uc bTiCQNvCOTKYLo1EDq+f1DwokfepZk32nkD1FS0c1jOYkCea5ezXJFPLmltESKADMQaz p7YqFUGv/+jX1zeMKV2V/wM1HSlbZuTX5iFV9O3j8NQ0EN4JqPukTCiqKcEwFSUBpYsA 5XiBNzYE4yLCU6hhW6VAP6N4ts5rvHHVowuql3VeAipK/12t8c+Xyl/Divhr6aAw1IV+ OpbA==
X-Received: by 10.50.236.38 with SMTP id ur6mr67047igc.19.1358452815013; Thu, 17 Jan 2013 12:00:15 -0800 (PST)
MIME-Version: 1.0
Received: by 10.64.26.137 with HTTP; Thu, 17 Jan 2013 11:59:54 -0800 (PST)
In-Reply-To: <CABP7RbcG-h5tgU-m8dAo-K+TGcDoH2HpR_q3d8h_8tf2Gs2BrA@mail.gmail.com>
References: <CABP7Rbf-_Of0Gnn7uaeuPiiZ6n+MxbpJjbggmD3qjykWX3gaXQ@mail.gmail.com> <CAP+FsNcF0n3cpPho0+WPM1-grRSEy92EMnJaGYA4j0WyvUm8Ng@mail.gmail.com> <CABP7RbcDRpfwfTOGS_aNjG4LtWkabvrGYcfwKqajT3hGKzBO6Q@mail.gmail.com> <CAK3OfOg3sv9gERgX-vO6mdX6ateDTgkP4F_efGdCk5VLG8FhOg@mail.gmail.com> <CABP7RbcG-h5tgU-m8dAo-K+TGcDoH2HpR_q3d8h_8tf2Gs2BrA@mail.gmail.com>
From: James M Snell <jasnell@gmail.com>
Date: Thu, 17 Jan 2013 11:59:54 -0800
Message-ID: <CABP7RbcCF-3zKdP-h5W_Y0xEhNWoDm9F8xHYWza+R_+Ucmd_hQ@mail.gmail.com>
To: Nico Williams <nico@cryptonector.com>
Cc: Roberto Peon <grmocg@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="14dae9340bb37ba7ca04d3817121"
Received-SPF: pass client-ip=209.85.210.175; envelope-from=jasnell@gmail.com; helo=mail-ia0-f175.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.666, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1Tvvdh-0001sq-7p 23911dae79975fb1e0f8da0ada62a0a3
X-Original-To: ietf-http-wg@w3.org
Subject: Re: delta encoding and state management
Archived-At: <http://www.w3.org/mid/CABP7RbcCF-3zKdP-h5W_Y0xEhNWoDm9F8xHYWza+R_+Ucmd_hQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15966
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>

On Thu, Jan 17, 2013 at 9:56 AM, James M Snell <jasnell@gmail.com> wrote:

>
> On Thu, Jan 17, 2013 at 9:49 AM, Nico Williams <nico@cryptonector.com>wrote:
>
>> On Thu, Jan 17, 2013 at 11:21 AM, James M Snell <jasnell@gmail.com>
>> wrote:
>> > My main concerns with this approach are (a) even tho the decoder gets
>> to set
>> > limits on the amount of state used, keeping that state around is still
>> > relatively expensive compared to what we have now, and (b) keeping it in
>> > sync with the client, server and any number of intermediaries along the
>> path
>> > is likely going to prove difficult at best. We need to make sure we
>> have a
>> > good understanding of the worst case scenario with this approach (i.e.
>> > nothing stored in context anywhere along the path).
>>
>> If the compression is hop-by-hop then there's no synchronization
>> issues.  But then middleboxes may have to decompress and always
>> re-compress (even if the headers are left unmodified) in each
>> direction.
>>
>>
> That's the exact problem I'm having really. Middleboxes will be required
> to maintain a complete compression state (for requests and responses) as
> opposed to just passing things through. Maintaining that state could become
> quite expensive. If we don't maintain it, tho, the potential sync issues
> become too messy.
>

Correction on this (the bits thankfully just kind of snapped together in my
brain finally)... a middlebox would have separate decompression and
compression contexts for each request and response and would translate
between the two. If it receives a kvsto, it can choose not to store
anything and pass those along as kvsto or eref, getting by without storing
any of the actual values, but still having to maintain some amount of state
for the translation to occur. So that part (finally) clicked in my head
correctly but we still need to make sure we have a solid sense of just how
expensive maintaining that context is going to be (best and worst cases).

- James


>
>
>> In general I'd much rather not have connection-oriented state at all,
>> not even if it were transparent to HTTP.
>>
>>
> Agreed, not sure how to avoid it and still get good compression (outside
> of simply optimizing the encoding of values as much as possible... i.e.
> bohe)
>
> - James
>
>
>> Nico
>> --
>>
>
>