Re: [hybi] More feedback on draft-ietf-hybi-permessage-compression-05

Takeshi Yoshino <tyoshino@google.com> Tue, 12 March 2013 08:23 UTC

Return-Path: <tyoshino@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2456221F86AE for <hybi@ietfa.amsl.com>; Tue, 12 Mar 2013 01:23:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.377
X-Spam-Level:
X-Spam-Status: No, score=-101.377 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_64=0.6, NO_RELAYS=-0.001, USER_IN_WHITELIST=-100]
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 1EYbvX-OEaTX for <hybi@ietfa.amsl.com>; Tue, 12 Mar 2013 01:23:40 -0700 (PDT)
Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [IPv6:2a00:1450:400c:c03::22b]) by ietfa.amsl.com (Postfix) with ESMTP id 551EF21F86D9 for <hybi@ietf.org>; Tue, 12 Mar 2013 01:23:39 -0700 (PDT)
Received: by mail-we0-f171.google.com with SMTP id u54so4515135wey.16 for <hybi@ietf.org>; Tue, 12 Mar 2013 01:23:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=2c0nAi2oYZwrf6zMLT56SdlfDhL6BXqZXlifY6WIc3E=; b=cFFG3+doBqdyxRUz0+o0dfGtG+UBKSAZIoogHUb7GzEKbrsq/dOQvkcJ95GnN7g8No qs156d1A9MDYJiQYCl9Ghi6d5l3AD2sy7CLrhsnFKiWYGrBFISanWRnqvgrFzxdV3T7/ HOx1N3WQgJT+U3Tir9Vd9kpQoWZryg2kXGrIUVxvU2fNZUIrkGGURrl6U4vLb09mCdnf Z6UOAcTKYzgzrUvBtNuxbjqZS9PDdMbUfdj6lR7qGy7cjr9iqZ0pMG6WwgfXwzLEU9Ep pFpVDpff4jvSL1gxuYT0M3/wHTfzOdwCsBOHEJ0m4aGKbe34HeW1Bq+czA37thU9+Mt+ w3wg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=2c0nAi2oYZwrf6zMLT56SdlfDhL6BXqZXlifY6WIc3E=; b=eoFGqUEa7yc0fiuT+hE5vUj7lDqwHNoCtKojHueXOMAx/jdbPu3ahX3TpavnznXwRm yR5Rz8ZFccjI87vrDlXRLTqIVgYwkybqBDgq+EwlLWOVlryPd+DpFlKGJwjPjRW1SN89 13oNxTlBVNsTsmOM65bl3ldyp4URjhR5PzN5RMFBoNAzoHRa3PasMBTKq3EQHIi/6sfM KKgkX7Oq0cDJWis7eloSWR08I2qZrJclIh+59xN1j7YbXhIs+meKs6rGRYIrzKd1SMCV UpQUZD4yS5rtkLxjiihTHrdt7UDS/AW9TKUTrSQrAZcQbRFMNfJ9uJBTsCTXbpCnvL77 Tfow==
X-Received: by 10.194.82.34 with SMTP id f2mr24604557wjy.25.1363076618301; Tue, 12 Mar 2013 01:23:38 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.194.234.198 with HTTP; Tue, 12 Mar 2013 01:23:18 -0700 (PDT)
In-Reply-To: <CAPwYjpne9FNYEZv3rVCUk4jGMfWwC81vzn1-q_gH7Lbf9FFYQQ@mail.gmail.com>
References: <CAPwYjpne9FNYEZv3rVCUk4jGMfWwC81vzn1-q_gH7Lbf9FFYQQ@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Tue, 12 Mar 2013 17:23:18 +0900
Message-ID: <CAH9hSJZc4axp=Xs9BL1TVRg4FcYxa+SYK+cszQAQ2eHnOn=v6w@mail.gmail.com>
To: Dario Crivelli <dario.crivelli@lightstreamer.com>
Content-Type: multipart/alternative; boundary="047d7beb95c0a2ca8f04d7b60126"
X-Gm-Message-State: ALoCoQlNfZDihSqYmpXpo4MLqT2Ut9M/mcfn4xmgRV9HUsXqJNpRlK/lohkNYQ7WbsqXkFHhxsEjc39Nhxvew9KOWDX+jfrioUrzuvvUmQF6M5aJvl1zzJskaIDujJuGkgxr/D4FVOEjwaxBRkBUgMernkV1WoQqqSif6jO0DpbkoAWZOqD7ICmLK3gi6r+NF8laKKSBLgyf
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] More feedback on draft-ietf-hybi-permessage-compression-05
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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, 12 Mar 2013 08:23:41 -0000

Hi Dario,

Thanks for the feedback.

On Mon, Mar 11, 2013 at 6:55 PM, Dario Crivelli <
dario.crivelli@lightstreamer.com> wrote:

> A) permessage-deflate
>
> As far as the "permessage-deflate" extension to the WebSocket protocol is
> concerned, it seems to me that the description is complete, although I have
> not tried to implement the extension support yet.
>
> For the handshake negotiation part, I acknowledge that the alternative
> text proposed by Barry Leiba is clearer, though it does not mention the
> requirements on the extension parameters in the response.
>
> In paragraph 5.1.2, I found it difficult to read the sentence:
>     Otherwise, the server MUST NOT accept the request with a response with
> the parameter.
> I suppose it is equivalent to:
>     Otherwise, if accepting the request, the server MUST NOT include this
> parameter in the response.
>
>
OK. I've rewritten the whole text for clarification. Please take a look
again when I publish the revised one. I-D submission is closed now for f2f
meeting.


>
> The example in paragraph 3.1 reports the "Hello World" parameter value,
> with a space in the middle.
> Wasn't that unallowed, as also discussed in
> http://www.ietf.org/mail-archive/web/hybi/current/msg09904.html ?
>
>
Oh, right. Fixed.


>
> I see from the example in paragraph 5.2.3.1 that a compressed text message
> still retains the opcode=text flag, so that, after decompression, it will
> still be subject to UTF-8 compliance.
> This rule may probably be inferred from the context; yet it is not so
> obvious, because the "application data" in the resulting frames is not
> UTF-8.
> Hence, I think it's worth clarifying explicitly, in paragraphs 4.1/4.2,
> that the opcode will not change.
>

Done.


> In fact, honestly, I'm not able to find, in RFC6455, where it is stated
> that the constraints in paragraph 5.6 do not apply to extensions.
>
>
I agree that it's not clarified in the RFC.


>
>
> B) Per-message Compression Extensions
>
>
> On the other hand, I cannot understand the scope of the definition of the
> "Per-message Compression Extensions" framework concept.
> I assume that by "Per-message Compression Extensions" we mean a subset of
> extensions to the WebSocket protocol, and that what's being defined is the
> common part that any extension definition has to share, in order for its
> inclusion in this subset to be claimed.
> In this regard, I suggest including a reference to paragraph 9 (or 5.8) of
> RFC6455, where the "extension" concept is introduced.
>

Done.


>
>
> In my opinion, the definition of the boundaries of this subset is not
> clear.
> The WebSocket specification leaves many degrees of freedom to extension
> definitions, in terms of reserved bits, opcodes, extension data,
> fragmentation, status codes, handshake tokens, and perhaps even more.
> The extensions belonging to the "Per-message Compression Extensions"
> subset will take advantage of some of these degrees of freedom;
> but it is not stated what they will not be allowed to take advantage of.
>

The concept doesn't require/allow/prohibit anything other than the RSV1 bit.


> For instance: can a future extension belonging to this set also reserve
> the RSV2 bit?
>

It may though it needs to be discussed and registered with the registry.


> This would affect whether or not the compatibility rules and other
> implementation aspects regarding all extensions in the "Per-message
> Compression Extensions" subset could be handled by the same code.
>
>
It's not easy to have flexible code to resolve dependency/incompatibility
between offered extensions. Yes.


>
> About the compatibility rules, I understand that,
> - since compression requires that the whole payload is modified first, and
> only then are the frames cast,
> - as a consequence, the compression cannot be applied after another
> extension which imposes its own requirements on the framing.
>

Right


> But how can I ensure that my implementation will comply with this
> constraint?
>
>
I think even the RFC left many degrees of freedom to extension design,
we'll use small subset of combination/order of extensions, and the code for
resolve/integrate extensions support only such a small subset.


> The proposed specification says:
>     Per-message Compression Extensions MUST NOT be used after any
> extension for which frame boundary needs to be preserved.
>     Per-message Compression Extensions MUST NOT be used after any
> extension that uses "Extension data" field or any of the reserved bits on
> the WebSocket header as per-frame attribute.
>
>  This assumes that any extension can be evaluated as to whether:
> - frame boundary needs to be preserved;
> - "Extension data" field is used as per-frame attribute;
> - any of the reserved bits on the WebSocket header is used as per-frame
> attribute.
>
> Should I expect the evaluation of the above predicates to be indicated
> somewhere in the specifications of all future extensions?
> Or will I be supposed to evaluate these predicates myself from the
> extension specification text alone?
>
>
Good point. Maybe to evolve WebSocket with lots of extensions and
combination between them, we need to define and maintain some list of
characteristics like them, and suggest that people writing extension specs
to check yes/no for each of them.

It's burden, and that's one of the reasons why RFC6455 was published with
only general concept of extension.

Takeshi