Re: [hybi] With deflate-stream, Close frame doesn't work as an end of data marker

Yutaka_Takeda@PlayStation.Sony.Com Fri, 25 February 2011 08:02 UTC

Return-Path: <Yutaka_Takeda@PlayStation.Sony.Com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6AE9A3A6929; Fri, 25 Feb 2011 00:02:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.982
X-Spam-Level:
X-Spam-Status: No, score=-5.982 tagged_above=-999 required=5 tests=[AWL=0.283, BAYES_00=-2.599, HTML_MESSAGE=0.001, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LBywW2I2Dfyh; Fri, 25 Feb 2011 00:02:19 -0800 (PST)
Received: from paris.playstation.sony.com (nat.playstation.sony.com [69.36.131.254]) by core3.amsl.com (Postfix) with ESMTP id BA6133A681D; Fri, 25 Feb 2011 00:02:19 -0800 (PST)
Received: from constantine.playstation.sony.com ([162.49.67.15]) by paris.playstation.sony.com (Lotus Domino Release 8.5.1FP5) with ESMTP id 2011022500030518-134850 ; Fri, 25 Feb 2011 00:03:05 -0800
In-Reply-To: <AANLkTikE9zarwuRURCcPLU-QOgDt4UsaaWNWv4U7=hQ6@mail.gmail.com>
To: Takeshi Yoshino <tyoshino@google.com>
MIME-Version: 1.0
X-KeepSent: 9EDDF2DA:D45B4501-88257842:0027DEB4; type=4; flags=0; name=$KeepSent
X-Mailer: Lotus Notes Release 7.0.2 September 26, 2006
Message-ID: <OF9EDDF2DA.D45B4501-ON88257842.0027DEB4-88257842.002C3B97@playstation.sony.com>
From: Yutaka_Takeda@PlayStation.Sony.Com
Date: Fri, 25 Feb 2011 00:02:52 -0800
X-MIMETrack: Serialize by Router on SCEA919ML04/SCEA(Release 8.5.1FP3|May 23, 2010) at 02/25/2011 12:03:04 AM, Serialize complete at 02/25/2011 12:03:04 AM, Itemize by SMTP Server on SCEA919ML02/SCEA(Release 8.5.1FP5|September 29, 2010) at 02/25/2011 12:03:05 AM, Serialize by Router on SCEA919ML02/SCEA(Release 8.5.1FP5|September 29, 2010) at 02/25/2011 12:03:11 AM, Serialize complete at 02/25/2011 12:03:11 AM
Content-Type: multipart/alternative; boundary="=_alternative 002C3B9688257842_="
Cc: hybi-bounces@ietf.org, hybi@ietf.org
Subject: Re: [hybi] With deflate-stream, Close frame doesn't work as an end of data marker
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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: Fri, 25 Feb 2011 08:02:25 -0000

Hi Takeshi, my comments below...


> o  Framing is necessary because of the underlying transport 
>    layer is in fact 'streaming', or TCP. (TCP and WS-framing 
>    are more tightly coupled) 
> 
> For endpoints/intermediaries which don't recognize deflate-stream, 
> yes, it's problematic.

What if we'd like to introduce a new control frame that is intended
to communicate with intermediaries (imagine, trace-route mechanism, 
etc.) in the future, then the 'compression' layer gets in the way 
and all intermediaries have to decompress stream all the time. 

This is clearly another consequence of having compression under the 
framing layer. We should avoid this, IMO.


> o  WS-layer needs to buffer entire message (passed by app/JS) 
>    anyway. 
> o  Text and binary do not interleave fragments, hence there 
>    needs only one context for compression / decompression in 
>    memory. 
> 
> People seemed to be more concerned about compression efficiency at 
> that time than the cost of compression state sharing. This is a 
> point to revisit.

Yeah... as now we see downside of the current direction.

>  
> o  Overhead (frame headers and control frames) are much smaller 
>    than payload of text/binary frames and negligible as to 
>    compression ratio. 
> 
> Not sure.

We may need more quantitative evidence here, though I agree 
larger scope (~32KB in case of gzip) for compression by
references for recurring texts would make compression ratio 
better. I also imagine that recurring texts may appear more in
the same message (or channel) than in the other channel. In mux'd
case for example, I am not sure how the current approach would
help.


> o  Close frame appears at the end of stream with no traling 
>    bytes. (Can remove requirement for TCP graceful shutdown). 

I think this benefit is significant. We do not want to worry
about another trailing bytes in the future again when a new 
compression algorithm needs to be introduced.

Per message compression has another benefit of shrinking the 
size of buffer for storing application messages in memory.


- Yutaka