Re: [Cbor] An Information-based CBOR schema language?

Carsten Bormann <cabo@tzi.org> Wed, 21 August 2019 14:49 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DAEC512090D for <cbor@ietfa.amsl.com>; Wed, 21 Aug 2019 07:49:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Level:
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 mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NgEaiqYHtsAE for <cbor@ietfa.amsl.com>; Wed, 21 Aug 2019 07:49:54 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B53571208EF for <cbor@ietf.org>; Wed, 21 Aug 2019 07:49:54 -0700 (PDT)
Received: from [192.168.217.120] (p548DCCB9.dip0.t-ipconnect.de [84.141.204.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 46D9YX5Mfzz101v; Wed, 21 Aug 2019 16:49:52 +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 <cabo@tzi.org>
In-Reply-To: <CAE5tNmpeZh6UA0Uz6QBJNZ4HwmAyyh_2ZvQTZTUBTRYonEwrgA@mail.gmail.com>
Date: Wed, 21 Aug 2019 16:49:52 +0200
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 588091790.067705-7687525488f9cdfaea528b2c241436cb
Content-Transfer-Encoding: quoted-printable
Message-Id: <099E6A89-2930-451F-A380-FE969826A434@tzi.org>
References: <CAE5tNmpeZh6UA0Uz6QBJNZ4HwmAyyh_2ZvQTZTUBTRYonEwrgA@mail.gmail.com>
To: David Kemp <dk190a@gmail.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/9qhL9JWrejaDhOoIopsUPAe46j0>
Subject: Re: [Cbor] An Information-based CBOR schema language?
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Aug 2019 14:49:57 -0000

Hi David,

I cannot answer your question on the level of interest in doing work on another data description language, but I want to quickly address two statements in your email:

> On Aug 21, 2019, at 16:19, David Kemp <dk190a@gmail.com>; wrote:
> 
> CDDL is a schema language for CBOR.   JADN (JSON Abstract Data Notation) is another.  JADN differs from CDDL in that it:
>   1) Specifies an Information Model rather than a Data Model (RFC 3444), and

The prose around JADN says so, but then goes ahead and does approximately what CDDL does (actually it appears to me that in some places it is even more concerned with serialization issues than CDDL is).

Since the boundary between information and data models is not strict (and, indeed, one may want to make several refinement steps on the way from a conceptual model to a data model that directly binds to a serialization scheme), this is not very surprising.

As one data point, I would like to point out that CDDL is very much in use as an information modeling language; this can be mostly done by stopping short of giving a specific mapping to JSON or CBOR constructs (or by using container/composition abstractions that only have default mappings, which enables the information model to be “executable”, without actually tying down the serialization mappings of those abstractions).

JADN does address one point CDDL doesn’t do very well yet: Having a single model that maps to both idiomatic JSON and concise CBOR.  I believe that the next version of CDDL will need to provide more functionality for this, as well.

>   2) Is itself structured data (JSON or CBOR) rather than text that requires parsing

Please see https://tools.ietf.org/html/draft-bormann-cbor-cddl-freezer-02#section-8 for why this may not be a distinction for much longer.  Actually, JADN also defines a human notation (JADN-IDL), and I applaud you for this decision.  (I don’t know why humans, outside of debugging, should ever need to see the JSON formats of either JADN or CDDL.)

In summary, I do believe that JADN is an interesting development that we as a WG should take note of.

Grüße, Carsten