Re: [hybi] Multiplexing extension spec draft 03

"Arman Djusupov" <arman@noemax.com> Fri, 23 March 2012 11:51 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 6749A21F853A for <hybi@ietfa.amsl.com>; Fri, 23 Mar 2012 04:51:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.429
X-Spam-Level:
X-Spam-Status: No, score=-2.429 tagged_above=-999 required=5 tests=[AWL=0.169, 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 lf+1sZXyh9+K for <hybi@ietfa.amsl.com>; Fri, 23 Mar 2012 04:51:45 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id BE00021F854B for <hybi@ietf.org>; Fri, 23 Mar 2012 04:51:44 -0700 (PDT)
Received: from vista1 by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id HOW13941; Fri, 23 Mar 2012 13:51:41 +0200
From: Arman Djusupov <arman@noemax.com>
To: 'Takeshi Yoshino' <tyoshino@google.com>
References: <CAH9hSJb1ewPO3EBgD78anD+=4XouToGR4X7C1wvWqonc2nYB6g@mail.gmail.com> <000301cd05dd$c8f9fc70$5aedf550$@noemax.com> <CAH9hSJYni6BboWdjkLX9xsguph7wJwjAmTUD1genFzT0ja5Wdw@mail.gmail.com> <001b01cd08cc$fe9ac980$fbd05c80$@noemax.com> <CAH9hSJZR7hC76KGwj4HCb+K=rf7SWB1UM5aHrZn_kuCufTUtiQ@mail.gmail.com>
In-Reply-To: <CAH9hSJZR7hC76KGwj4HCb+K=rf7SWB1UM5aHrZn_kuCufTUtiQ@mail.gmail.com>
Date: Fri, 23 Mar 2012 13:51:48 +0200
Message-ID: <005101cd08eb$585ab9d0$09102d70$@noemax.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0052_01CD08FC.1BE4C250"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQJyksDj69tXg0EBn6jyTi4rbdnguwGRJ3ibAhBToZcB1dWGPQEs3XHLlPeOnsA=
Content-Language: en-us
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: Fri, 23 Mar 2012 11:51:49 -0000

I think it's OK to disallow control frames with a channel ID other than 0.
Since WS control frames apply to a physical channel,  I'm not sure they
should apply to mux logical channels too (it will always confuse
intermediaries that are not mux aware). We could actually create a single
mux command for delivering all types of logical channel control frames,
including custom opCodes that might be assigned in future. In such a case we
need a general purpose mux control command to move control frames of logical
channels with their opCode, RSV bits and payload. 

 

The more I think about it the fewer other options I see. A mux-aware
intermediary will have to forward close frames and their payload, while a
mux-unaware intermediary might kill the connection when encountering such a
frame. This means that the control frames of a logical channel need to be
enveloped into a mux command message, unless we figure out a better
solution.

 

With best regards,

Arman

 

From: Takeshi Yoshino [mailto:tyoshino@google.com] 
Sent: Friday, March 23, 2012 11:45 AM
To: Arman Djusupov
Cc: hybi@ietf.org
Subject: Re: [hybi] Multiplexing extension spec draft 03

 

On Fri, Mar 23, 2012 at 17:14, Arman Djusupov <arman@noemax.com> wrote:

Hello Takeshi,

 

Using both a DropChannel and a close frame to close a logical channel seems
like overkill.

The original aim of addition of DropChannel was only to provide a way to
terminate logical channel which is behaving abnormally by some command out
of that logical channel.

 

To make abstraction simple, I gave it a role to terminate a logical channel
normally, too. But I'm ok with getting normal close done by only one command
(one close frame, one DropChannel command, etc.)

Exchanging DropChannel control messages should be enough for mutual shutdown
of a logical channel. A more important issue is that if a close frame is
sent through an intermediary that does not understand the mux extension, the
intermediary may simply drop the physical channel / connection.

I understand your concern. Actually, IIRC it was one of the motivation to
introduce close frame that a close frame tells intermediaries the end of
session instead of unreliable TCP FIN so that they can release resource for
the session more quickly.

 

John's original proposal was adding a new framing onto WebSocket framing to
implement multiplexing. There was some discussion about this and some
suggested  reuse of opcode in base framing. See this thread for example
http://www.ietf.org/mail-archive/web/hybi/current/msg07240.html.

It's easy to imagine a frame compression intermediary that would simply stop
reading from the network connection once it encounters a close frame (as per
WS spec no data is expected to follow the close frame). So probably the
sending of a close frame should be avoided (i.e. prohibited) for logical
channels.

I'd like to disallow any control frame with channel ID != 0 and have
corresponding mux commands for each of them if we take this approach rather
than just converting close frame into DropChannel ad-hoc.

 

Also we need to give DropChannel some field to hold the information close
frame has (status and reason).