Re: [hybi] permessage-compression / permessage-deflate configuration is too complex

Peter Thorson <webmaster@zaphoyd.com> Thu, 25 April 2013 22:38 UTC

Return-Path: <webmaster@zaphoyd.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 AE55B21F96E8 for <hybi@ietfa.amsl.com>; Thu, 25 Apr 2013 15:38:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[HTML_MESSAGE=0.001]
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 M+DKVy4iFVxj for <hybi@ietfa.amsl.com>; Thu, 25 Apr 2013 15:38:49 -0700 (PDT)
Received: from sh78.surpasshosting.com (sh78.surpasshosting.com [72.29.64.142]) by ietfa.amsl.com (Postfix) with ESMTP id D325621F96CD for <hybi@ietf.org>; Thu, 25 Apr 2013 15:38:48 -0700 (PDT)
Received: from ranna.uchicago.edu ([128.135.45.206]:57648) by sh78.surpasshosting.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from <webmaster@zaphoyd.com>) id 1UVUoQ-0004UB-Rg; Thu, 25 Apr 2013 18:38:47 -0400
Content-Type: multipart/alternative; boundary="Apple-Mail=_FB7D05E0-7059-47AF-B141-00481F134FBD"
Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\))
From: Peter Thorson <webmaster@zaphoyd.com>
In-Reply-To: <CAG4zZZDhm-t=GXZXk3_hHN9vYJcgNYFBC-5REs0faCyARoKz3A@mail.gmail.com>
Date: Thu, 25 Apr 2013 17:38:43 -0500
Message-Id: <25D2499B-BC3C-4232-8697-FFDE76E06A8D@zaphoyd.com>
References: <CAG4zZZDhm-t=GXZXk3_hHN9vYJcgNYFBC-5REs0faCyARoKz3A@mail.gmail.com>
To: Joakim Erdfelt <joakim@intalio.com>
X-Mailer: Apple Mail (2.1503)
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - sh78.surpasshosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - zaphoyd.com
X-Get-Message-Sender-Via: sh78.surpasshosting.com: authenticated_id: webmaster@zaphoyd.com
X-Source:
X-Source-Args:
X-Source-Dir:
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] permessage-compression / permessage-deflate configuration is too complex
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: Thu, 25 Apr 2013 22:38:49 -0000

On Apr 25, 2013, at 09:53 , Joakim Erdfelt <joakim@intalio.com> wrote:

> How can a server side implementation respond on a the extension negotiation for this spec, using the permessage-deflate saying, "sorry, we don't support the C-library tweaks present in the spec and will only use default behavior" or to say "sorry, we don't support the C-library tweaks present in the spec and will only use the following behavior for both c2s and s2c streams"
> 
> The current language in permessage-compression-09 (Section 8) says:
> 
>    A server MUST decline a "permessage-deflate" offer if any of the following conditions is met:
>       o  The offer has any extension parameter not defined for use in an offer.
>       o  The offer has any extension parameter with an invalid value.
>       o  The offer has multiple extension parameters with the same name.
>       o  The server doesn't support the offered configuration.
> 
> That last bullet point is the crux of the problem I'm facing.  How can the negotiation indicate that "yes, i support permessage-deflate, but only this specific configuration, that doesn't match up to your configuration to permessage-deflate"
> 
> I'd like to propose that all of the following concepts be removed from the permessage-deflate and just standardized for specific default behavior based on a sensible set of defaults (lowest common denominator?), similar to how HTTP's content codings work (the http spec does not tweak compression algorithms) ...
> 
> c2s_max_window_bits
> c2s_no_context_takeover
> 
> s2c_max_window_bits
> s2c_no_context_takeover
> 
> from a Java point of view these are not possible to support without re-implementing the entire java.util.zip.Deflate library in each java application. (default Deflate support, that ships with every copy of Java since 1.0, just does not support these tweaks)
> 
> --
> Joakim Erdfelt <joakim@intalio.com>

Section 8.1.3 explains how to handle this case:

A client sending: `Sec-WebSocket-Extensions: permessage-deflate; s2c_no_context_takeover, permessage-deflate` is asking "I would prefer that you reset the sliding window for each message, but if you can't then the defaults are acceptable." The server could then choose which copy of the extension request to return based on what it supports.

A client sending: `Sec-WebSocket-Extensions: permessage-deflate; s2c_no_context_takeover` is asking "I don't have the memory to spare for a default sliding window context per connection. We can compress if you support window resetting, if not we can't use compression."

Removing these options would not enable a Java based endpoint to compress connections that it otherwise wouldn't have been able to. It only removes the ability for non-Java endpoints to optimize their resource usage.

Peter