Re: [apps-discuss] Concise Binary Object Representation (CBOR)

Nico Williams <nico@cryptonector.com> Thu, 23 May 2013 16:14 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 15FF221F9588 for <apps-discuss@ietfa.amsl.com>; Thu, 23 May 2013 09:14:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.797
X-Spam-Level:
X-Spam-Status: No, score=-1.797 tagged_above=-999 required=5 tests=[AWL=0.180, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 4qTcxRegLqsp for <apps-discuss@ietfa.amsl.com>; Thu, 23 May 2013 09:13:49 -0700 (PDT)
Received: from homiemail-a96.g.dreamhost.com (caiajhbdcaib.dreamhost.com [208.97.132.81]) by ietfa.amsl.com (Postfix) with ESMTP id D6D3E21F9742 for <apps-discuss@ietf.org>; Thu, 23 May 2013 09:13:49 -0700 (PDT)
Received: from homiemail-a96.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a96.g.dreamhost.com (Postfix) with ESMTP id 4B8F23B8069 for <apps-discuss@ietf.org>; Thu, 23 May 2013 09:13:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=O9xSwCSEJkzoCZ2/iu6h eXzeR3s=; b=mcd379FJTydb/BdEt+QeYVsvv7BtiVoTPxFUaBYmrE2+hc3kPsss zN0vc37Pu7iDa1cIRATVFh5bctcHV3nMyp2EHYmTnJkNOXRDz8buJrccnmntYBgt NQhXkxUwkVo1BvQU2e0CWkTeJsKYaVjembFyCnSIBrgRGowdw++9tko=
Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a96.g.dreamhost.com (Postfix) with ESMTPSA id E7D473B8062 for <apps-discuss@ietf.org>; Thu, 23 May 2013 09:13:48 -0700 (PDT)
Received: by mail-wi0-f169.google.com with SMTP id hn14so5122924wib.0 for <apps-discuss@ietf.org>; Thu, 23 May 2013 09:13:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XmTQ5UdM2FgcDs7ImDmlCBEDH6UGcfBOTB12oMRPOok=; b=PkU9Zx/yC3YKSfZLwGaWXMrvUPl4Q5srhuhnQoETQnpvy7FCvVm418cFiwqJ0mdPQU pzpaGQs14v4029x2wO1Ra24e8837/jy4b9jrgckySskWeE6Fj7NxP/Z/KihFhw97jfDi BecuGKsb12GZUm/WoDVsBYtYaj1379B2jTZMuE42l0b1mxIi4ILKLfq0Dguj+bDZ3eOU cYPyK450g7SvEYWbFyKpntE9paliGgP7XudQV1Kpw9TX1kNB48kO1ze/PdNpOplQ7mJR +89zUB1Rpv7FuyuNWQrVjBYSVj7FOHUf3WFULttOwaVGqNcD50L9Qe24HH0vUDj91YAJ c00A==
MIME-Version: 1.0
X-Received: by 10.180.189.41 with SMTP id gf9mr25845288wic.32.1369325626674; Thu, 23 May 2013 09:13:46 -0700 (PDT)
Received: by 10.216.111.132 with HTTP; Thu, 23 May 2013 09:13:46 -0700 (PDT)
In-Reply-To: <61CB1D18-BABC-4C77-93E6-A9E8CDA8326B@vpnc.org>
References: <61CB1D18-BABC-4C77-93E6-A9E8CDA8326B@vpnc.org>
Date: Thu, 23 May 2013 11:13:46 -0500
Message-ID: <CAK3OfOjm0B8rA_BEkQKUJqTPuV+A8=gcDi+THD1xu-JtFSJ1gA@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Paul Hoffman <paul.hoffman@vpnc.org>
Content-Type: text/plain; charset="UTF-8"
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] Concise Binary Object Representation (CBOR)
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 May 2013 16:14:00 -0000

Also, I believe this is the fifth binary encoding of JSON proposed
thus far.  Can we list the ones that have been proposed thus far?

Here's a [no-doubt partial] list:

 - BSON
 - MsgPack
 - Smile
 - UBJSON
 - CBOR

That's just the ones I recall seeing before or which I found in 30
seconds of searching.

Some of these are used in actual protocols right now.

An analysis of these might be nice.

(While you're at that, and considering variable length encodings of
things... SQLite4 has some really neat variable length encodings of
all its data types, specifically designed to make sorting via memcmp()
possible.  I'm not sure what relevance that might have here, but it
should be of interest to anyone designing variable length encodings of
anything.)

I do agree that we need a schema-less encoding (which means we can't
get as good as PER and friends).  We probably don't need a
schema-capable encoding for JSON (though that might be nice).  We do
need schema-aware encodings for some protocols, but we have plenty
already, and none are nor need to be JSONish.

(I've wanted to define a JSON Encoding Rules for ASN.1, primarily to
make debugging apps that use ASN.1-based protocols easier (dump PDUs
as ASN.1).)

Nico
--