Re: [Cbor] [IANA #1147225] Request for Assignment (websocket)

Carsten Bormann <> Thu, 26 September 2019 07:29 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9509412080F for <>; Thu, 26 Sep 2019 00:29:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Status: No, score=-4.197 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id n9ubdgSU3CpG for <>; Thu, 26 Sep 2019 00:28:59 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id D4B3512004C for <>; Thu, 26 Sep 2019 00:28:58 -0700 (PDT)
Received: from [] ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id 46f6480SD4z10D4; Thu, 26 Sep 2019 09:28:56 +0200 (CEST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <>
In-Reply-To: <>
Date: Thu, 26 Sep 2019 09:28:55 +0200
X-Mao-Original-Outgoing-Id: 591175733.592592-7c398ba4ca5b620fca5c24bc03e0dd31
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <> <> <>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <>
Subject: Re: [Cbor] [IANA #1147225] Request for Assignment (websocket)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 26 Sep 2019 07:29:03 -0000

Hi Amanda,

There is not much information here, so I’ll try to supply context from what I happen to know what people are doing.

It is now a somewhat idiomatic way to use WebSockets by sending and receiving sequences of serialized JSON “objects” (maps), usually without any structure like JSON Text Sequences (RFC 7464) but just by relying the self-delimiting nature that serialized JSON objects (as opposed to, e.g., numbers) exhibit.  The equivalent result is easy to achieve using CBOR (which would be tantamount to using CBOR sequences [draft-ietf-cbor-sequence] as CBOR is already self-delimiting).

I believe both usages are fine and a good way to frame (structure) the channel provided by WebSockets.

Whether this enough to call each a WebSocket subprotocol is not easy to answer: Nothing is said about the semantics of those JSON objects/CBOR data items.  Note that, for media types, we have a similar question: We do have media types for application/json and application/cbor, which also say nothing about the semantics.  We also have the structured syntax suffixes +json and +cbor, so we can label a specific JSON or CBOR based media type as based on application/json and application/cbor, respectively.  Note that JSON over WebSockets is often used with an RPC-like next level protocol like JSON-RPC (*), which begs the same question:  Would json-rpc be sufficiently selective for a WebSocket protocol or would people expect that to say more about the semantics of the RPCs expressed in JSON-RPC?

No concept like structured syntax suffixes has been defined for WebSockets.  I think this is worth some more exploration.  As long as we don’t have them, the situation is similar to just having the base media types application/json and application/cbor.  However, for the WebSocket protocols, even defining the analog to these would require some additional specification explaining how (and whether, in the first place) multiple objects/data items are sent.  The CBOR sequence draft goes 90 % of the way here, as would the JSON Text Sequence RFC, except that the latter is not what people are actually doing on WebSockets these days.

So the questions are:

— would a JSON (CBOR) protocol defined in the above way be sufficient in detail to merit a WebSocket protocol name (comparable to application/json [application/cbor])?  (This is a question about the intent about the level of “selectivity” these protocol names should have, and only can be answered by WebSockets people.)
— do we want the equivalent of structured syntax suffixes for WebSocket protocol names?  (A convention for creating WebSocket protocol names, again a question for the WebSockets people.)
— which document defines the way sequences of objects/data items are handled?  (Easy for CBOR, slightly more work for JSON.)(**)

Grüße, Carsten

Here are a few quick Google results:
(*) Often in the form of “JSON RPC”, e.g.
(**), as discussed e.g., on — often using what Wikipedia calls “concatenated JSON”, e.g. similar to

> On Sep 26, 2019, at 01:29, Amanda Baber via RT <> wrote:
> HI Carsten, all,
> We received a suggestion from the ADs that we specifically ask about the utility of websocket subprotocol IDs for CBOR (and, on that mailing list, JSON). Are there issues there? 
> thanks,
> Amanda Baber
> Lead IANA Services Specialist
> On Tue Sep 17 05:32:30 2019, wrote:
>> To me it seems such a protocol would be about cbor sequences, not
>> single cbor data items. The fact that I have to guess this,
>> demonstrates the registration request is underspecified.
>> Sent from mobile, sorry for terse
>>> On 17. Sep 2019, at 07:49, Amanda Baber <>
>>> wrote:
>>> Hi all,
>>> IANA has received a request to register "cbor" in the WebSocket
>>> Subprotocol Name registry at
>>> name
>>> Barry Leiba and Alexey Melnikov suggested asking this mailing list
>>> for opinions on this request.
>>> This is all of the information that was provided:
>>> ===
>>> Type of Assignment:
>>> WebSocket Subprotocol ID: `cbor`, Common Name: `Concise Binary Object
>>> Representation`
>>> Description:
>>> A concise binary object format for representing structured data.
>>> Defined in
>>> ===
>>> We understand that if this registration can be made, the RFC should
>>> not be listed on its own in the Subprotocol Definition field. In
>>> addition, we currently have only the requester's name to list in the
>>> registry's "Reference" field.
>>> We're also asking the JSON mailing list to comment on a request to
>>> register "json."
>>> thanks,
>>> Amanda
>>> _______________________________________________
>>> CBOR mailing list
> _______________________________________________
> CBOR mailing list