Re: [hybi] Fwd: The MessageBroker WebSocket Subprotocol

Frank Salim <frank.salim@kaazing.com> Mon, 03 October 2011 15:21 UTC

Return-Path: <frank.salim@kaazing.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 985A721F8B68 for <hybi@ietfa.amsl.com>; Mon, 3 Oct 2011 08:21:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.977
X-Spam-Level:
X-Spam-Status: No, score=-2.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 nLg9Wa-awqJ2 for <hybi@ietfa.amsl.com>; Mon, 3 Oct 2011 08:21:20 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 4785B21F8B29 for <hybi@ietf.org>; Mon, 3 Oct 2011 08:21:20 -0700 (PDT)
Received: by vcbfo11 with SMTP id fo11so4470975vcb.31 for <hybi@ietf.org>; Mon, 03 Oct 2011 08:24:21 -0700 (PDT)
Received: by 10.52.175.97 with SMTP id bz1mr93361vdc.15.1317655461204; Mon, 03 Oct 2011 08:24:21 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.83.201 with HTTP; Mon, 3 Oct 2011 08:24:01 -0700 (PDT)
X-Originating-IP: [64.71.23.250]
In-Reply-To: <CAH_y2NH0KRi_mdvOQScFJtdWmKfFCk-g7C7F3e-xTYwA5C2CSw@mail.gmail.com>
References: <92457F4F764A5C4785FCDBDDDD76477A123C1C1A@dfweml506-mbx> <4E88236E.4040405@ericsson.com> <CABLsOLADfORBHVfPax75sQeRXTmTav8aOMfey_+KuSO=oPLsEA@mail.gmail.com> <4E88AB8D.6050407@callenish.com> <CAH_y2NH0KRi_mdvOQScFJtdWmKfFCk-g7C7F3e-xTYwA5C2CSw@mail.gmail.com>
From: Frank Salim <frank.salim@kaazing.com>
Date: Mon, 03 Oct 2011 08:24:01 -0700
Message-ID: <CA+sC5_8Ag_dkt8U680z+Z=6Hom3ft8NpsgSOZ6jb_pHG5-ef7Q@mail.gmail.com>
To: Greg Wilkins <gregw@intalio.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>, Hapner mark <hapner.mark@huawei.com>
Subject: Re: [hybi] Fwd: The MessageBroker WebSocket Subprotocol
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: Mon, 03 Oct 2011 15:21:21 -0000

I agree that this should be a protocol rather than an extension and
that new opcodes are not required.

Subprotocols should be defined in terms of their message payload only.
To give an analogy, WebSocket subprotocols should not require opcodes
just as protocols on top of TCP should not new require control bits.

Other notes so far:

3.4 "WebSocket uses the HTTP origin model to identify clients. MBWS
uses the same client identity model."

Origin cannot be used to identify clients.

4.2/5 "Client or Broker may initiate/respond to Ping/Pong during
session as defined by WebSocket."

Subprotocols shouldn't be aware of ping/pong, since they aren't
exposed in the API.

-Frank Salim

On Sun, Oct 2, 2011 at 5:45 PM, Greg Wilkins <gregw@intalio.com> wrote:
> On 3 October 2011 05:21, Bruce Atherton <bruce@callenish.com> wrote:
>> As I pointed out in my example with HTTP (which required Request and
>> Response message types), it is going to be very common for subprotocols to
>> want to define new opcodes. They are the right fit for defining message
>> types in a subprotocol.
>
> Bruce,
>
> I do not think  opcodes are the right fit for defining messages in a
> subprotocol (at least not in the ws protocol as we have designed it).
>
> While I can imagine some subprotocols would desire to have opcode like
> metadata associated with a message, I  can also imagine many
> subprotocols will use JSON/XML as their message exchange format and
> thus will better use fields/elements/attributes to convey message
> type.
>
> The way we have defined the protocol, opcodes are a constrained and
> regulated resource that must be allocated by IANA. They may be used by
> extensions, which themselves have a high barrier to deployment as they
> need to be implemented in the browsers and servers, since the
> application API is insufficient (and inappropriate) for implementing
> extensions.
>
> Subprotocols are exposed to the application in the browser API, so I
> believe that sub protocol designs need to be restricted to what can be
> achieved without API changes or IANA allocations.   I think this is a
> good thing and keeps the barrier low for sub protocol development.
>
> regards
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>