Re: [hybi] Framing take IV

Jamie Lokier <jamie@shareable.org> Wed, 04 August 2010 02:50 UTC

Return-Path: <jamie@shareable.org>
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 E73813A6B8E for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 19:50:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.511
X-Spam-Level:
X-Spam-Status: No, score=-2.511 tagged_above=-999 required=5 tests=[AWL=0.088, BAYES_00=-2.599]
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 N0oUFpxhQA1b for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 19:50:14 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id F3C483A68EA for <hybi@ietf.org>; Tue, 3 Aug 2010 19:50:13 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1OgU42-0005LD-3o; Wed, 04 Aug 2010 03:50:42 +0100
Date: Wed, 04 Aug 2010 03:50:42 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20100804025042.GU27827@shareable.org>
References: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing take IV
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: Wed, 04 Aug 2010 02:50:15 -0000

Greg Wilkins wrote:
>    I'd like to refocus on what I believe we do have near-consensus on, so
>    that we don't lose progress while we debate other possible features.
>    I think that we have reasonable consensus on something like:
> 
>    +--------------------------------------------------+
>    | frag(1) |unused(3) | opcode(4) |   Length(16)    |
>    +--------------------------------------------------+
>    |                       Data                       |
>    +--------------------------------------------------+

Two questions:

   1. Are intermediaries allowed to move the fragment
      boundaries to optimise their delivery?

         1a. .... "add fragment boundaries"
         1b. .... "remove fragment boundaries"

   2. Are intermediaries allowed to delay delivery of incomplete
      messages by an arbitrarily long time, including forever?

Related to 2, the JS API always delays delivery of incomplete received
messages, and in a sense the JS API is acting as an intermediary
between the server and client application.  So it should cause no harm
for other intermediaries to do it, when the receiver is a browser
providing the current JS API.  But other clients may be harmed by such
delays, or not, depending on what they expect.

Also I'd like to remind you of a past discussion where we learned that
carrying general byte stream protocols over WebSocket is slightly more
efficient if the flag meaning "tell intermediary to forward" is
independent of the flag "this boundary is adjustable".

It's tempting to specify "intermediaries shall forward all bytes they
receive eagerly, without interpretation", but that is (a) not going to
happen as firewalls will inevitably filter some WebSocket applications
so we might as well suggest what they must do right, and (b) not ideal
for TCP latency, especially where MTUs differ on either side, although
it's not too bad, and (c) a multiplexing/demultiplexing WebSocket
proxy cannot do this.

I've no issue with eager byte forwarding being the default behaviour
expected of intermediaries if nothing else is negotiated, and it makes
considerable sense to me for the questions to be deferred over to
the multiplexing-and-intermediaries discussion.

-- Jamie