Re: [hybi] Multiplexing extension spec draft 03

Takeshi Yoshino <tyoshino@google.com> Wed, 29 February 2012 20:11 UTC

Return-Path: <tyoshino@google.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 77BAA21F86F8 for <hybi@ietfa.amsl.com>; Wed, 29 Feb 2012 12:11:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.949
X-Spam-Level:
X-Spam-Status: No, score=-102.949 tagged_above=-999 required=5 tests=[AWL=0.027, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
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 DTfSiB9yQ6lH for <hybi@ietfa.amsl.com>; Wed, 29 Feb 2012 12:11:44 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by ietfa.amsl.com (Postfix) with ESMTP id 062A421F8691 for <hybi@ietf.org>; Wed, 29 Feb 2012 12:11:43 -0800 (PST)
Received: by ghbg16 with SMTP id g16so419086ghb.31 for <hybi@ietf.org>; Wed, 29 Feb 2012 12:11:43 -0800 (PST)
Received-SPF: pass (google.com: domain of tyoshino@google.com designates 10.101.135.32 as permitted sender) client-ip=10.101.135.32;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of tyoshino@google.com designates 10.101.135.32 as permitted sender) smtp.mail=tyoshino@google.com; dkim=pass header.i=tyoshino@google.com
Received: from mr.google.com ([10.101.135.32]) by 10.101.135.32 with SMTP id m32mr813562ann.84.1330546303630 (num_hops = 1); Wed, 29 Feb 2012 12:11:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=uq0ImyeSHWI1OJJjC0jQs+13Igoy4FtfQF6g3sGSeng=; b=NR7PiTyJEpT/esX0g5Fy1Ce8/huxjg6JCUtvt9RFtfJCfc/T2Y8K+pArClTnR3lKjE gG1bqWgyPfv4+2l26nUt6fUWWOwkb8c3DrhDOig+4Ttgu9ORl70b6i7tHIhc3Je4bw/T DMANRyqEvo+72DcI2aVXeyc/SVKCHRrfCwciDNjsUQZ6TQsG3O7IMWgJzJT2tlIdv5Ep qsQouhy8hvThwpJYpZsnqYu9wu91UNFE88Rc8Qn+zqHtrDCrPtjPiGKrrjkofvWaU96S ABcc2BRdxI63gP8Xv4v+1+xnX5cuVmW9KYw9Ops9m/njXryjqyC+gKvp+inl5ikA8NXI Hs9g==
Received: by 10.101.135.32 with SMTP id m32mr642688ann.84.1330546303466; Wed, 29 Feb 2012 12:11:43 -0800 (PST)
Received: by 10.101.135.32 with SMTP id m32mr642680ann.84.1330546303322; Wed, 29 Feb 2012 12:11:43 -0800 (PST)
MIME-Version: 1.0
Received: by 10.101.155.5 with HTTP; Wed, 29 Feb 2012 12:11:23 -0800 (PST)
In-Reply-To: <CAH_y2NFrvg-cjGAT-AsGS0B6+UvAjpvhhzwYa7jBQwQ+pVFOog@mail.gmail.com>
References: <CAH9hSJb1ewPO3EBgD78anD+=4XouToGR4X7C1wvWqonc2nYB6g@mail.gmail.com> <CAH_y2NFrvg-cjGAT-AsGS0B6+UvAjpvhhzwYa7jBQwQ+pVFOog@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Wed, 29 Feb 2012 15:11:23 -0500
Message-ID: <CAH9hSJa2yhyf_OXzgG5esvA3KaOZr5vO+=iD+Wm+hLj9Y9z1cg@mail.gmail.com>
To: Greg Wilkins <gregw@intalio.com>, John Tamplin <jat@google.com>
Content-Type: multipart/alternative; boundary="0016369fa141c44c3c04ba1ff3d7"
X-System-Of-Record: true
X-Gm-Message-State: ALoCoQniOHVYhKVOXg5SIbmN9Pza78DY/YmDhwlZdef9WpuJEzBA9oTS1pCgdUiwmOpgw21XOWtoS5U7VQUvFGnrUrjKhuikyo1P0VXPDKYcSXe6eSuTm4onJC9FIc8VnJEM24HHbtk5
Cc: hybi@ietf.org
Subject: Re: [hybi] Multiplexing extension spec draft 03
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, 29 Feb 2012 20:11:45 -0000

Hi Greg,

Thanks for commenting throughout.

On Tue, Feb 28, 2012 at 19:03, Greg Wilkins <gregw@intalio.com> wrote:

>
> Some comments
>
>
> 3.
>
>    If WebSocket payload data is masked by a per-frame key, such masking
>    is applied to frames for each logical channel separately.
>
>
> I'm not sure what it means to apply masking to a logical channel
> separately?  Surely a mask is applied to the frame that carries it before
> the MUX extension interprets the payload?
>
>
John, may I confirm what this text is intended to mean?


> 5.  Flow Control   Each logical channel, including the implicitly created channel 1, is
>    initially given a quota of bytes that may be transmitted in each
>    direction without acknowledgement.  It is illegal to send more bytes
>    than the remaining send quota, and the receiver MUST _Fail the
>    Logical Channel_ for any sender that does so.
>
> Should this not be a failure of the physical channel as it indicates a
> failure of the other ends MUX implementation?
>
>
I wondered if it's useful if there's a choice to drop only one logical
channel. As quota is independent among logical channels, we don't have to
close the physical channel.

But yes, as you said, this means there's bug in the sender's multiplexing.
If no one opposes, I'll change this to _Fail the Physical Channel_ from the
next version.

>    This send quota is
>    replenished via control frames as the receiver processes the data.
>
> s/This/The/
>

Thanks


>
> 7.  Multiplex Control Frames
>
> nice clarifications in this section! - specifically "Objectve channel ID"
>
> Is the text diagram a standard?  I find the + - - - - - + lines confusing
> and would prefer to see:
>
>
Just used the same formatting as RFC 6455. But yes... for this case, it's
just making it ugly. I'll remove them.


>       0 1 2 3 4 5 6 7
>      +---------------+
>      | Objective     |
>      : channel ID    :
>      | (8-32)        |
>      +-----+---------+
>      | Opc | Opcdata |
>      +-----+---------+
>      | Additional    |
>      : data          :
>      | (0-?          |
>      +---------------+
>
>
> 7.1.  Multiplex Control Opcodes   0 - AddChannel request (only from client)
>       Create a new logical channel, exactly as if a new connection were
>       received on a separate transport connection,
>
> s/exactly //
>

ok


> s/a new logical channel/the objective channel/
>

ok


>
> probably need to state somewhere that it is an error to add and already
> added channel.
>
>
>
good point.

>       0 - uncompressed
>
> This is a bad name for this encoding scheme as it implies there is a
> compressed scheme (OK delta encoding is a compression... but you know what
> I mean).   How about calling this "absolute" or "complete" or "plain" ?
>
>
"plain" sounds good. how about identity as like content-encoding of HTTP?


>       The initial quota for the new logical channel is 0, so the client
>       may not send any data for this connection until the AddChannel
>       response is received.
>
> Does this mean that control frames can be sent for a channel before the
> add channel response is received?
>
>
ok. it might be misleading to say this within the context of quota. We
should just say "any frame MUST not be sent over the logical channel until
AddChannel response is received" somewhere else. I'll try to fix this.


>    3 - DropChannel
>
> Can a dropped channel be readded later?
>
>
Hmm. One case we need to consider is:

- S sends a frame(ID=1, body="blah")
- C issues a DropChannel(ID=1)
- C issues a AddChannelReq(ID=1)

We need to be able to determine if the data frame should be dropped or not
when these three happen at almost same time.

But I think this is not a problem. C should drop any frame received after
issue of DropChannel but before AddChannel response.

11.  Fairness
>
>    A multiplexing implementation MUST ensure reasonable fairness among
>    the logical channels.  This is accomplished in several ways:
>
>    Receiver side
>
>    o  The receiver MAY limit the other peer's send quota of a logical
>       channel by not replenishing the send quota to make sure that any
>       logical channel cannot dominate its buffer space on the sender.
>
> s/on the sender//   as it is the buffer space on the receiver that is of
> concern
>

This text is intended to note that a receiver can try to maintain fairness
of inbound traffic between logical channels even if the sender doesn't
employ good algorithm to assign transmission slot to each logical channel.
That's why there's "on the sender".

Hmm, but maybe I should revise this like...

The receiver MAY limit the send quota of a logical channel by not
replenishing it to make sure that any logical channel doesn't dominate the
connection.


>
> Also we should say that the receiver does not need to process frames from
> different logical channels serially.  ie the processing of a message from a
> logical channel should not defer the processing of messages on other
> logical channels.
>
>
OK. Let's add some text to note that point.


>    o  The sender MUST fragment a message into smaller frames when it's
>       too big so that that logical channel will occupy the connection
>       and the other logical channels get stuck for long time.
>
> Cumbersome.  How about: The sender MUST fragment a large message into
> smaller frames to prevent a large message in a logical channel occupying
> the physical channel and thus delaying messages in other logical channels.
>

Great. I'll take it.


>
>    o  Logical channel frames that are sent SHOULD be limited in size
>       (such as by refragmenting) when there is contention for the
>       physical channel to minimize head-of-line blocking
>
> How is this different from the previous?
>
>
Ah,... maybe I've duplicated.


>
>
> 13.  Nesting
>
> I think we should disallow nesting.  Any intermediary that wants to MUX
> channels understands MUX, so it can flatten.
>
>
Thanks for opinion.