Re: [hybi] Framing Take VI (a compromise proposal)

Greg Wilkins <gregw@webtide.com> Mon, 16 August 2010 04:27 UTC

Return-Path: <gregw@webtide.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 7A4843A67E1 for <hybi@core3.amsl.com>; Sun, 15 Aug 2010 21:27:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.755
X-Spam-Level:
X-Spam-Status: No, score=-1.755 tagged_above=-999 required=5 tests=[AWL=0.222, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 R9fLkstiuU3e for <hybi@core3.amsl.com>; Sun, 15 Aug 2010 21:27:52 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id 441DC3A6768 for <hybi@ietf.org>; Sun, 15 Aug 2010 21:27:52 -0700 (PDT)
Received: by fxm18 with SMTP id 18so3184920fxm.31 for <hybi@ietf.org>; Sun, 15 Aug 2010 21:28:27 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.111.200 with SMTP id t8mr4673338fap.31.1281932907888; Sun, 15 Aug 2010 21:28:27 -0700 (PDT)
Received: by 10.223.57.12 with HTTP; Sun, 15 Aug 2010 21:28:27 -0700 (PDT)
In-Reply-To: <AANLkTimjt0YbXfLf83od5b2cSJaZUboBy3-03LFf=Kv8@mail.gmail.com>
References: <AANLkTi=TBXO_Cbb+P+e2BVfx69shkf8E1-9ywDh_Y+Kz@mail.gmail.com> <AANLkTi=52ARa2v9oZ1tGosN7oL+kBBVH20XmtkXzPMM0@mail.gmail.com> <AANLkTimjt0YbXfLf83od5b2cSJaZUboBy3-03LFf=Kv8@mail.gmail.com>
Date: Mon, 16 Aug 2010 14:28:27 +1000
Message-ID: <AANLkTimV4Xvashf8SZAHS15FCLiX7pUnXcae20Ph73YY@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: ifette@google.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing Take VI (a compromise proposal)
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: Mon, 16 Aug 2010 04:27:53 -0000

2010/8/16 Ian Fette (イアンフェッティ) <ifette@google.com>:
> On Sun, Aug 15, 2010 at 8:44 PM, Greg Wilkins <gregw@webtide.com> wrote:
>>
>> Ian,
>>
>> thanks for the proposal.
>>
>> It appears that the total message length is mandatory if fragmentation
>> is used, however I believe that one of the use-cases for fragmentation
>> is to send dynamic messages where the total length is not known in
>> advance.   Could we make message length optional somehow?
>>
>
> It is optional. %x0000000000000000 ; complete message length is unknown (iff
> initial==1 && final==0) -- suggestions as to how to make that clearer most
> welcome.

Sorry my bad. I see it in the BNF now.

It does feel a little funny to be byte squeezing other lengths and
then to send 8 zeros to say unknown.  To be consistent, we should
either just always send lengths in full or always make an attempt to
squeeze.



>> Alternately, message length (in bytes and/or in characters etc.) is
>> just one example of meta-data.  Would it not be possible to support
>> that in a standardized meta data extension?

any thoughts on this?

>> If we are to have per frame extension data, then I think having the
>> extension length in the header so simple implementations can skip is a
>> good approach.  However, I think we probably would also need to goto
>> extra detail about how data from multiple extensions would be
>> separated within the extension data.
>>
>> However, I remain a little concerned that having both op-code and per
>> frame extension data could result in some contradictory data.  For
>> example, if we have an op-code for final frame, then it is likely that
>> intermediaries will know that frame and possibly use it as part of
>> shutting down the connection (with half closes etc.).  If we then have
>> an extension that provides multiplexing and allows a channel ID to be
>> associated with every frame, what does it mean to have a final frame
>> op code extended with a channel ID?
>
> I would assume it means that a complete message has been sent, but that the
> channel remains open. E.g. I have two channels open, the fact that I've sent
> a complete message on one channel shouldn't be taken as an indication that
> I'm done sending messages on that channel. Even in the non-multiplexing
> case, the fact that you've received a full message doesn't mean the
> connection should be shut down. That's the point of "persistent" :)

Sorry I think you have misunderstood my scenario.  By Final frame, I
was not meaning the final frame as indicated by the bit in your frame
header, but the final frame op-code that we have previously discussed
as one of the potential op-codes (text-data, biinary-data, ping, pong,
final frame, etc).   The final frame op-code has been proposed to half
close a connection - ie no more frames will be sent after a final
frame.  There is such an op-code in the current -00 proposal already.


So to restate my concern, I'm worried that per frame extension data
and core protocol op-codes may not be entirely orthogonal. Some
extensions may be very meaningful for some op-codes, but not others.

To flip this around to a question - can you say why you need extend
every frame?   if there are ping, pong and final frame op-codes
defined, what is the use-case to extend them?  I can see the good
use-cases for extending frames with text and binary op-codes, but that
could be done with just a extended-text and extended-binary op-code?

cheers