Re: [hybi] Per-frame compression spec draft 06

"Arman Djusupov" <arman@noemax.com> Wed, 14 March 2012 08:37 UTC

Return-Path: <arman@noemax.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 87A5221F86F6 for <hybi@ietfa.amsl.com>; Wed, 14 Mar 2012 01:37:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.288
X-Spam-Level:
X-Spam-Status: No, score=-2.288 tagged_above=-999 required=5 tests=[AWL=0.310, BAYES_00=-2.599, 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 YsKxbFtdoVSD for <hybi@ietfa.amsl.com>; Wed, 14 Mar 2012 01:37:25 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id 9615B21F86EE for <hybi@ietf.org>; Wed, 14 Mar 2012 01:37:25 -0700 (PDT)
Received: from vista1 by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id YLZ34429; Wed, 14 Mar 2012 10:37:29 +0200
From: Arman Djusupov <arman@noemax.com>
To: 'John Tamplin' <jat@google.com>
References: <CAH9hSJY9d074n+jWZ7mK9O_jfw8rKecmqcKnzWG3KrWMP_UhRQ@mail.gmail.com> <CABLsOLDBOvE0s8Qc1UwG66gJaBWHMsBZOgktZKMaGUveODabjg@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C1147F18BAA@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <CAH9hSJaUzwq8mt=NMDYhT1S7RA2Kw_7zFqc207BzCf5oFm_fMA@mail.gmail.com> <CABLsOLAvop4Wa3ouNQTk=-o7nZbN3GZYvFiaugUgE6-ZoYYUXg@mail.gmail.com> <007701cd0133$8cf4dd70$a6de9850$@noemax.com> <CABLsOLCTV+AbOH24xVGsXnV0OsoLgicJ+_mVd84nSE_NMLmWaw@mail.gmail.com>
In-Reply-To: <CABLsOLCTV+AbOH24xVGsXnV0OsoLgicJ+_mVd84nSE_NMLmWaw@mail.gmail.com>
Date: Wed, 14 Mar 2012 10:37:23 +0200
Message-ID: <002001cd01bd$b1bf6690$153e33b0$@noemax.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0021_01CD01CE.75494800"
X-Mailer: Microsoft Outlook 14.0
thread-index: AQEFf2crWbrct+xTc1bODTMkU5A6FAGBA42bAdhteGgAc2U4agHWpgNgAWpZfk0CknPZb5ereZwQ
Content-Language: en-us
Cc: hybi@ietf.org, 'Gabriel Montenegro' <Gabriel.Montenegro@microsoft.com>
Subject: Re: [hybi] Per-frame compression spec draft 06
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: Wed, 14 Mar 2012 08:37:26 -0000

IMO a server should be ready to handle situations where the use of the one extension prohibits the use of another. Just like with HTTP Accept-Encoding header “gzip, deflate” or with mux channel compression “deflate-frame, mux, deflate-frame” where deflate-frame can be applied either before or after mux. Grouping up supported extensions into mutuality exclusive groups would probably be simpler than parsing complex extension headers and creating specifications for negotiating the extensions of each type. 

 

The server can check the extension header for the presence of supported extensions from the same group. Once a supported extension found, other extensions of the same group are excluded. Such grouping of extensions can even be defined as comma separated list of extension names sorted by the order of preference.

 

With best regards,

Arman

 

 

From: John Tamplin [mailto:jat@google.com] 
Sent: Tuesday, March 13, 2012 6:20 PM
To: Arman Djusupov
Cc: Takeshi Yoshino; hybi@ietf.org; Gabriel Montenegro
Subject: Re: [hybi] Per-frame compression spec draft 06

 

On Tue, Mar 13, 2012 at 12:08 PM, Arman Djusupov <arman@noemax.com> wrote:

I was thinking more about a specification that would define the way compression extensions are to be applied and reserves the RSV1 bit as compression flag for all extensions. In terms of negotiation, we already have a way to negotiate the compression method when the extension is being negotiated. As long as each compression method has its own extension name the WebSocket handshake will negotiate it anyway. Extensions can be named deflate-frame, bzip2-message, deflate-message-stateful and so on. What spec has to offer is some standard way of using those extensions. e.g. define that “compression is applied on payload prior masking”, “frame header is not compressed” and so on. Then all new compression extension specs would be able to reference the common specification defining the general principles on how it’s applied and negotiated, but each of them could have a different name and use a different compression method.

One complication of using treating each compression algorithm as a separate WS extension is how do you negotiate exactly one of them?  Sure, you can define the extensions as mutually incompatible, but that could complicate server implementations to have to keep track of which ones use the same bit.

 

I also think it makes clearer specs to separate the mechanism of per-frame compression from which algorithm to use.

 

-- 
John A. Tamplin
Software Engineer (GWT), Google