Re: [Cbor] 7049bis: The concept of "optional tagging" is not really used in practice #126

Christophe Lohr <christophe.lohr@imt-atlantique.fr> Sun, 03 November 2019 20:41 UTC

Return-Path: <christophe.lohr@imt-atlantique.fr>
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 6BCA0120073 for <cbor@ietfa.amsl.com>; Sun, 3 Nov 2019 12:41:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=imt-atlantique.fr
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 dFVwc6EBpg55 for <cbor@ietfa.amsl.com>; Sun, 3 Nov 2019 12:41:42 -0800 (PST)
Received: from zproxy110.enst.fr (zproxy110.enst.fr [IPv6:2001:660:330f:2::c0]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 668E712002E for <cbor@ietf.org>; Sun, 3 Nov 2019 12:41:42 -0800 (PST)
Received: from localhost (localhost [IPv6:::1]) by zproxy110.enst.fr (Postfix) with ESMTP id B032E81360 for <cbor@ietf.org>; Sun, 3 Nov 2019 21:41:40 +0100 (CET)
Received: from zproxy110.enst.fr ([IPv6:::1]) by localhost (zproxy110.enst.fr [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id exssrNXDt_FO for <cbor@ietf.org>; Sun, 3 Nov 2019 21:41:40 +0100 (CET)
Received: from localhost (localhost [IPv6:::1]) by zproxy110.enst.fr (Postfix) with ESMTP id 44A9B8137C for <cbor@ietf.org>; Sun, 3 Nov 2019 21:41:40 +0100 (CET)
DKIM-Filter: OpenDKIM Filter v2.10.3 zproxy110.enst.fr 44A9B8137C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imt-atlantique.fr; s=50EA75E8-DE22-11E6-A6DE-0662BA474D24; t=1572813700; bh=X68noN6GxAo7Zbt+MvNamy6oS0EkN+vxCwxT3iCdjio=; h=To:From:Message-ID:Date:MIME-Version; b=QvBomA9HNYasGtxE2KkhS600lvbdW/wEz0Ki1/v7caOoaztbBh9seeYX+vzWYPUac GPiZORRVWDEKgAjZBBLk1CpH8YA5xTw0rrmRETQ1bo5+pCm1uieCdwrLok4id5TiCm m/KrbaCt06qXNxYAbQpLva8si+4GQ5KIeY0ga4vg=
X-Virus-Scanned: amavisd-new at zproxy110.enst.fr
Received: from zproxy110.enst.fr ([IPv6:::1]) by localhost (zproxy110.enst.fr [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id HRwztPTVZlbI for <cbor@ietf.org>; Sun, 3 Nov 2019 21:41:40 +0100 (CET)
Received: from [192.168.1.4] (157.68.93.79.rev.sfr.net [79.93.68.157]) by zproxy110.enst.fr (Postfix) with ESMTPSA id 0D58181360 for <cbor@ietf.org>; Sun, 3 Nov 2019 21:41:39 +0100 (CET)
References: <92400DAA-A713-4905-A721-34B138E25192@tzi.org> <ed45e995-1858-3169-1be6-0cce5ce37ce3@imt-atlantique.fr> <87889E65-0152-455A-A6B7-C5F336DC97A4@island-resort.com>
To: cbor@ietf.org
From: Christophe Lohr <christophe.lohr@imt-atlantique.fr>
Openpgp: preference=signencrypt
Autocrypt: addr=christophe.lohr@imt-atlantique.fr; prefer-encrypt=mutual; keydata= mQINBFidiI4BEAC/zpewWjK9zQSDxb5ue3RvpVE3GJJZHZtCTnUpUnlMs2cKE5ZFwgYnMGr6 hFZFubcZcg2iTWCAcGcaqGHufFlv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uO3duWCs/m3wKiDjACAdG7HXNsFFL2L1sAEQEAAYkCNgQYAQgAIBYh BEGWk6ojxnAtmotDNz/gZa4rb1UKBQJYnYiOAhsMAAoJED/gZa4rb1UKpO4P/RqIjeePf4o9 rcT93UfSPgg+dlJjv1OgCYkURrXHB80h3PKEO9YDCcW6b0Zmzr048eNNGk54d5pflqZClIte IjgV6OcsGrSydickN9rRmXhRbwqcEhLasjJaSyIFwxmadc7aBuiFSJyuvHU4OPBZIx3eArb5 e+vNeNkP14p0yrWUeQ608xn8WgReDyIxwmnMkxoZkwlj9O2+zCyyLo6jKtVCfn4LZpwcwUP9 awQeQqU7WYckzm4fO+2JxmZ0zhIjia3ROdrw00H3V8KbDWcKTL7IWDqoLF/afDRQTMkrDmmY LF6Pgk5Lg/uUo3CBv8EzJXscZ2w6Ttzv0o5lECHMpQvmeitW56/rfQMIZTXhOxrhzi5jXWRz t0M54F9PVmyOX9a5qrlyU28mi1Mgs+uvmjXMFEwg+h8lCrayeOR1nwPMr4FgoHsHU6JyUVxv pIgBF5Q8HpPZuQUEaEz5Bl3uEI3ofI616dCmh42GCHOFvc8bIORwLYaNTs0zGEc4bLVe9cGf i7uJTfshDnL4aKGLbNebV7mUJ1TNEQ8Syx5fWpt/92XECtE9ovSQHCXabTNzGb63Z5HtqOUA TTNmm76rXBSrlvtPv548cMXw4dejA09u1tCFNEyuHzOgT2ZJzEkUY96iNf5ZC+qyOcttgQWV ejdE1EpSVxnHMn0oG8z+dXZZ
Message-ID: <06592ab7-f3cb-1a59-1b32-ffba3194162c@imt-atlantique.fr>
Date: Sun, 03 Nov 2019 21:40:39 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <87889E65-0152-455A-A6B7-C5F336DC97A4@island-resort.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Language: fr
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/-axF7tKS0O7FaHa__RjPuumccI0>
Subject: Re: [Cbor] 7049bis: The concept of "optional tagging" is not really used in practice #126
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: Sun, 03 Nov 2019 20:41:46 -0000

>>    3.  Data must be able to be decoded without a schema description.
>>        *  Similar to JSON, encoded data should be self-describing so
>>           that a generic decoder can be written.

My confusion comes probably from vocabulary issues.

The sentence here probably talks about "a schema description" from the
/coding-decoding/ point of view, and nothing else.

Such as, let's say, the IP header: without the RFC in hands (its
description), there is no way to decode a set of 20 bytes and to guess
that the first 4 bits are an unsigned int, followed by another 4 bits
unsigned int, followed by an array of 8 booleans, etc. 
A CBOR (or a JSON) coding format can tell this, without the need of
another writing document to specify this.

However, I read "schema description" from the /semantic/ point of view:
a description which explains the meaning of data items.  The IP RFC not
only tells that the first 4bits are an unsigned int, it also tells that
this number is the protocol version. 
CBOR (neither JSON) can't tells this by itself, except if one defines a
TAG for this.


So, the next question is: "is there some guidelines for using TAGs?"

Well, it's probably too early. One may have to wait that CBOR usages
grow in maturity.
But what's your opinion?

Let's say I'm designing a system.  CBOR is used (for messages, recording
data files, or whatever).
What should I decide for my system design regarding CBOR TAGs?
Shall I:
- prohibit TAGs since this is redundant with other parts of my design
specifications (which already explicit the meaning of each field); or
- put TAGs everywhere for everything because TAGs bring semantic to data; or
- add TAGs to some fields and not to others (which ones and why?)

The right answer is probably: "this depends". ;-)
but of what?

Best regards
Christophe