Re: [hybi] Subprotocol and Control Frames

Hapner mark <hapner.mark@huawei.com> Wed, 05 October 2011 05:33 UTC

Return-Path: <hapner.mark@huawei.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 A21FC21F8B44 for <hybi@ietfa.amsl.com>; Tue, 4 Oct 2011 22:33:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.753
X-Spam-Level:
X-Spam-Status: No, score=-6.753 tagged_above=-999 required=5 tests=[AWL=-0.154, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 tinmwd8UGEll for <hybi@ietfa.amsl.com>; Tue, 4 Oct 2011 22:33:42 -0700 (PDT)
Received: from usaga04-in.huawei.com (usaga04-in.huawei.com [206.16.17.180]) by ietfa.amsl.com (Postfix) with ESMTP id A5ABF21F8B28 for <hybi@ietf.org>; Tue, 4 Oct 2011 22:33:42 -0700 (PDT)
Received: from huawei.com (usaga04-in [172.18.4.101]) by usaga04-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LSK00LJDVLDCM@usaga04-in.huawei.com> for hybi@ietf.org; Wed, 05 Oct 2011 00:36:49 -0500 (CDT)
Received: from dfweml201-edg.china.huawei.com ([172.18.4.104]) by usaga04-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0LSK00DWPVLCBL@usaga04-in.huawei.com> for hybi@ietf.org; Wed, 05 Oct 2011 00:36:49 -0500 (CDT)
Received: from DFWEML401-HUB.china.huawei.com (10.193.5.101) by dfweml201-edg.china.huawei.com (172.18.9.107) with Microsoft SMTP Server (TLS) id 14.1.270.1; Tue, 04 Oct 2011 22:36:44 -0700
Received: from DFWEML506-MBX.china.huawei.com ([10.124.31.111]) by DFWEML401-HUB.china.huawei.com ([fe80::f07f:889f:78ef:8df3%13]) with mapi id 14.01.0270.001; Tue, 04 Oct 2011 22:36:38 -0700
Date: Wed, 05 Oct 2011 05:36:37 +0000
From: Hapner mark <hapner.mark@huawei.com>
In-reply-to: <CABLsOLCfPW3HZF0q6=-sC0FGkJcqkdh4yj_4dvPH-ggbwUeM=A@mail.gmail.com>
X-Originating-IP: [172.18.9.109]
To: John Tamplin <jat@google.com>
Message-id: <92457F4F764A5C4785FCDBDDDD76477A123C8F43@dfweml506-mbx>
MIME-version: 1.0
Content-type: text/plain; charset="us-ascii"
Content-language: en-US
Content-transfer-encoding: 7bit
Accept-Language: en-US
Thread-topic: [hybi] Subprotocol and Control Frames
Thread-index: AcyCzo83r27v+PhnTw6E8yG0xmwZAAAT9AwA//+gz2WAAJskAP//j0wVgACY5ID//4up7Q==
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
References: <92457F4F764A5C4785FCDBDDDD76477A123C6E12@dfweml506-mbx> <CAH_y2NG+1TcQP6TVNbuwt6bjtCpQLaXtZvRjzBTefCrhb22+vA@mail.gmail.com> <92457F4F764A5C4785FCDBDDDD76477A123C6EA7@dfweml506-mbx> <CABLsOLCiBg3qD0TS9fYwpiw_WeXW3FYKjVcn-SA-biHTUdwgiA@mail.gmail.com> <92457F4F764A5C4785FCDBDDDD76477A123C7F00@dfweml506-mbx> <CABLsOLCfPW3HZF0q6=-sC0FGkJcqkdh4yj_4dvPH-ggbwUeM=A@mail.gmail.com>
Cc: "hybi@ietf.org" <hybi@ietf.org>, Greg Wilkins <gregw@intalio.com>
Subject: Re: [hybi] Subprotocol and Control Frames
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, 05 Oct 2011 05:33:43 -0000

 >From: John Tamplin [jat@google.com]
 >Sent: Tuesday, October 04, 2011 9:18 PM
 >To: Hapner mark
 >Cc: Greg Wilkins; hybi@ietf.org
 >Subject: Re: [hybi] Subprotocol and Control Frames
 >
 >On Wed, Oct 5, 2011 at 12:00 AM, Hapner mark <hapner.mark@huawei.com> wrote:
 >Thanks for the further clarifications/corrections ...
 >
 >So if I understand correctly, extension opcodes are globally defined and extensions are required to be defined such that they can be combined in adhoc combinations.
 >
 >They are globally defined, but it is yet to be determined whether they can be allocated in overlapping fashion or dynamically.  We couldn't reach agreement on those, so we left it the way it is now, which basically means they can't be used without getting some agreement on them.  For example, one proposal was that each extension specify how many opcodes and reserved bits it needs, and those are allocated as needed per connection.  If we go with that approach, we could create a spec that defines the mechanism for dynamically allocating these resources, and then extension specs that want to make use of this could simply refer to that spec.
 >
 >Basically, the intent is to cross that bridge when we get there, and hopefully we will have real use cases to consider to guide that decision.
 > 
 >I would disagree that most users of HTTP put a framing protocol in HTTP bodies. They put MIME types (i.e. content types) in bodies. Content types do not contain protocol control - only the HTTP header contains (should contain) protocol control.
 >
 >Most JSON or SOAP-based services I have used do in fact have some sort of message type in the payload, but YMMV.
 > 
 >To be specific, providing one extension control frame opcode for overloaded use by a subprotocol, combined with allowing subprotocols to use extension data (or append 'subprotocol extension data' to the end of protocol extension data) would likely resolve this issue (MBWS would definitely use it). Also, the API would need to be extended to provide access to these subprotocol features so AJAX clients could access them.
 >
 >I really don't see the difference -- if MBWS were to say "I want 20 bytes of extension data", how is that any different than just using the first 20 bytes of the WS payload as its extension data, and the remainder of the WS payload as the upper-level payload?

My main issue is with putting MBWS control frames into WebSocket message payloads. 

Putting MBWS message metadata into its associated message payload is a lesser issue. It requires the definition of an extension data mechanism within text message payloads and binary message payloads that mirrors what already exists in WebSocket.

You equate WebSocket with TCP. I equate it with HTTP. Possibly neither of us is fully correct. 

HTTP added a framing protocol over TCP so does WebSocket. If all extended use of WebSocket has to treat it like TCP, then Clebert and I should get on with implementing our MBWS message framing protocol and stop annoying the WG. 

On the other hand, there is great potential to reuse/extend the WebSocket protocol in much the same way that the web community has with HTTP. If the community had treated HTTP like it was TCP it would be worse off (as WS* did and is). Possibly the TCP analogy with WebSocket is not the most productive mental model of WebSocket's role in web architecture.

What would be the harm in considering extending the functionality of WebSocket subprotocol in the way I'm suggesting? Wouldn't having one less layer be a useful result. 

 > 
 >(As an aside, it isn't clear to me how different extensions that define different extension data can be composed.)
 >
 >In the order they are declared.
 > 
 >I realize I'm a newbie to this WG so you are free to take my opinion with a grain of salt; however, I hope the WG will carefully consider extending subprotocol to allow MBWS to be defined without requiring it to define yet another message framing protocol.
 >
 >Multiple layers of framing is the norm -- Ethernet has its own framing, IP on top of that, TCP or UDP on top of that, HTTP on top of that, etc.  Each layer peels off their part and passes the rest on to the next layer -- that is the way the network stack works.  I am not sure why you are resisting this. 
 >
 >-- 
 >John A. Tamplin
 >Software Engineer (GWT), Google