Re: [hybi] Subprotocol and Control Frames

John Tamplin <jat@google.com> Wed, 05 October 2011 04:15 UTC

Return-Path: <jat@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 0DD8B21F8B94 for <hybi@ietfa.amsl.com>; Tue, 4 Oct 2011 21:15:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.912
X-Spam-Level:
X-Spam-Status: No, score=-105.912 tagged_above=-999 required=5 tests=[AWL=0.064, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, 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 3AX8U8eatr3J for <hybi@ietfa.amsl.com>; Tue, 4 Oct 2011 21:15:17 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by ietfa.amsl.com (Postfix) with ESMTP id 0512521F8B1C for <hybi@ietf.org>; Tue, 4 Oct 2011 21:15:16 -0700 (PDT)
Received: from hpaq7.eem.corp.google.com (hpaq7.eem.corp.google.com [172.25.149.7]) by smtp-out.google.com with ESMTP id p954INfw007544 for <hybi@ietf.org>; Tue, 4 Oct 2011 21:18:23 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1317788303; bh=bnQC1GfuuC8T5eltR3l0Gg50D2k=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=WN0qLH2qP6c8hYqibNVC0ABnTLnDoy+BB26ewVKoh8Pt5KMrBC4BhBZ9gelJuViik 65onvuuCRA9u/j4JL5ERw==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:mime-version:in-reply-to:references:from:date: message-id:subject:to:cc:content-type:x-system-of-record; b=PbfDUT2n2ealao+pkFNJZJhgbW2CZvmKQYFidzGweqemzBswK1kdtNxXqsX4Yrx/R /DcUiLnDL8PDX55wIP4kw==
Received: from gyg4 (gyg4.prod.google.com [10.243.50.132]) by hpaq7.eem.corp.google.com with ESMTP id p954Hgfm020303 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 4 Oct 2011 21:18:21 -0700
Received: by gyg4 with SMTP id 4so1557956gyg.5 for <hybi@ietf.org>; Tue, 04 Oct 2011 21:18:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=pU7ecuwiotmzjoeAXD5eN3rI3PK5EYDzDHoY9ovQT/Q=; b=OaZk6g2wV9JSJnIlDU9l7pP+PxnZj60J2DOBh1RgZqm/ALs9nsxZRw0UTEuxhzBNg0 PM/UMHlNEYkbcLzC08zw==
Received: by 10.151.144.7 with SMTP id w7mr1872764ybn.59.1317788301495; Tue, 04 Oct 2011 21:18:21 -0700 (PDT)
Received: by 10.151.144.7 with SMTP id w7mr1872757ybn.59.1317788301308; Tue, 04 Oct 2011 21:18:21 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.96.7 with HTTP; Tue, 4 Oct 2011 21:18:01 -0700 (PDT)
In-Reply-To: <92457F4F764A5C4785FCDBDDDD76477A123C7F00@dfweml506-mbx>
References: <92457F4F764A5C4785FCDBDDDD76477A123C6E12@dfweml506-mbx> <CAH_y2NG+1TcQP6TVNbuwt6bjtCpQLaXtZvRjzBTefCrhb22+vA@mail.gmail.com> <92457F4F764A5C4785FCDBDDDD76477A123C6EA7@dfweml506-mbx> <CABLsOLCiBg3qD0TS9fYwpiw_WeXW3FYKjVcn-SA-biHTUdwgiA@mail.gmail.com> <92457F4F764A5C4785FCDBDDDD76477A123C7F00@dfweml506-mbx>
From: John Tamplin <jat@google.com>
Date: Wed, 05 Oct 2011 00:18:01 -0400
Message-ID: <CABLsOLCfPW3HZF0q6=-sC0FGkJcqkdh4yj_4dvPH-ggbwUeM=A@mail.gmail.com>
To: Hapner mark <hapner.mark@huawei.com>
Content-Type: multipart/alternative; boundary="0015174bed0696b2b304ae857f04"
X-System-Of-Record: true
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 04:15:18 -0000

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?


>  (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