[Cbor] Re: Private tag numbers / 1010

Vadim Goncharov <vadimnuclight@gmail.com> Mon, 16 December 2024 03:59 UTC

Return-Path: <vadimnuclight@gmail.com>
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 2C8FEC14F6E3 for <cbor@ietfa.amsl.com>; Sun, 15 Dec 2024 19:59:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XSFyx7O1f4wj for <cbor@ietfa.amsl.com>; Sun, 15 Dec 2024 19:59:54 -0800 (PST)
Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 50CBFC14F60E for <cbor@ietf.org>; Sun, 15 Dec 2024 19:59:54 -0800 (PST)
Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-30036310158so32444791fa.0 for <cbor@ietf.org>; Sun, 15 Dec 2024 19:59:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734321593; x=1734926393; darn=ietf.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=r1Jtd8JnimQSk/phE0utm/zMVzNmGNRHnc9GhclGLm0=; b=cfxWXyanCfB5Bhtjy/TXhQV3h85+jlaWE20Vvz70Q4Wt9QD9W+l1iyyPWtmlw1jxbc MzXvo7+1c/F53Mw8plq3InIi0PQaU4xdg0NQ6e6eq1D8zN8qyc7QwYwCjbhe298NqwuA yFm8Y2/aj8dyKLhUjOz12VbIN9V5RI4UXiJcx6QKGxqifixNDlo6KD3M73RCqTk0sK2C ymSxJEhM/Aa/o7Tzz6dsRY+FT5jQk7tFY8FaFA3onBz++ShMAhLHdcL1r1+3i9W1E5XK Inzs+HiPpbgbiC/SfNxieZzbFT4jZSiChb4bCZB5pVLYKNQAsC8Tmyuxg6nwU5EEAnBA 6qvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734321593; x=1734926393; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r1Jtd8JnimQSk/phE0utm/zMVzNmGNRHnc9GhclGLm0=; b=Ekqkj4DssC/g+2NdkPXdDeuLUbSnWtPuRHSVaG2glvAodmygV+HNkT5+HpdTABqSxI glsY0OUBo6KTNM6TOcmUvJNKwmWsHRJOMS7nMzSadRd6rNaXX64LVrfz0be3KfM96nhd 1Q19FedGDirVl/fS5vDFsykCq21SNH/WMQfQHwdAsrFwD2FLEA/+7ih6MK20t7R1Ylz9 6H7DnVd0w48Qd04dRPknAh528dvRQe/vDkjnYLWSzkX6pQ9YpB1vGYE+0Pr1Ks+WaZ37 +DynYMDGIouZ8KWsBaev8MEN+1pg1iK/ZReLk51HBo0r7iZvXWZ6e6AjY5UvNaRtC2i7 yBMg==
X-Forwarded-Encrypted: i=1; AJvYcCV3xDpyCIX7fI7yEOlVLPUADvdygCvZyf0srpADNMY8IfJGbdVgFF0C8LuZnXmuVNq563xm@ietf.org
X-Gm-Message-State: AOJu0Yyn4HO75sAJ0Y9eG/qOXYCtADTuQoU7gt4+jWf/AWZsTCM0pefy 6pfdWzlbXIssJtpVRGaBleFO1KcfY7UA6E4OR0OVoslhYVT8jjW1
X-Gm-Gg: ASbGnctXpMMk1LTmn0TfsDfosCITzRO/K+UpmkXCYqhMtsWlFnqzmoB22ZjfW2Rry5m F0t99HQUDwNPmJrRIpn94Ar56NL/nrHipgd8lAMNRsn/0KsLKqt86mKgDw+9Hsh0jckS7LrZwL2 CmYGuHRzo00mv4KVEGP3Amp7sDoLslTqruVvbyEYr2TPI3iijnni//oUDu6U/8RVCNQurcEXQv5 2Ga+navO8XzbimtnQn0vpJq1poEKtjOk/MU/FeClM1VW7lF3CdS7zC/oeJ6u/X9pFm36FuUe50N 5HU2IvphJclTynPIy861wRLu
X-Google-Smtp-Source: AGHT+IFax/qvP8heSCSymMTsalAF9hhOCHp916+vNiRqkaA4nMFF4qgydm/syyuFLwJWyjpA7cnQOA==
X-Received: by 2002:a05:6512:39cc:b0:53e:df2b:df25 with SMTP id 2adb3069b0e04-5409054e5c9mr3918291e87.16.1734321592182; Sun, 15 Dec 2024 19:59:52 -0800 (PST)
Received: from nuclight.lan (broadband-37-110-95-35.ip.moscow.rt.ru. [37.110.95.35]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54120b9f408sm695603e87.12.2024.12.15.19.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Dec 2024 19:59:51 -0800 (PST)
Date: Mon, 16 Dec 2024 06:59:49 +0300
From: Vadim Goncharov <vadimnuclight@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <20241216065949.70c7891e@nuclight.lan>
In-Reply-To: <755d93c9-d253-4558-b6ac-d3e1f4555535@gmail.com>
References: <AS2PR09MB6342AB1E5DFF19EDFB65F25F8C609@AS2PR09MB6342.eurprd09.prod.outlook.com> <8AD1E3E6-A474-4D4D-B404-66172DF8C481@tzi.org> <20230723010552.01d80062@nuclight> <c40b9570-5e22-73c8-744f-1e141edea875@gmail.com> <20241215031403.63e93131@nuclight.lan> <755d93c9-d253-4558-b6ac-d3e1f4555535@gmail.com>
X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; amd64-portbld-freebsd12.4)
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: XR6F7TPKN5STUZAGYPKIYIHYK6DHBJBC
X-Message-ID-Hash: XR6F7TPKN5STUZAGYPKIYIHYK6DHBJBC
X-MailFrom: vadimnuclight@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Carsten Bormann <cabo@tzi.org>, Tony Putman <Anthony.Putman@dyson.com>, "cbor@ietf.org" <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Cbor] Re: Private tag numbers / 1010
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/G6Gbp2JJlPjXp90nd7gO-vokTgA>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

On Sun, 15 Dec 2024 06:18:10 +0100
Anders Rundgren <anders.rundgren.net@gmail.com> wrote:

> On 2024-12-15 01:14, Vadim Goncharov wrote:
> > Hi,
> > 
> > Regarding https://datatracker.ietf.org/doc/draft-rundgren-cotx/05/
> > of tag 1010, please provide ability for identifier to be a non-text
> > string until this is not an RFC.  
> 
> Well, for unknown reasons the CBOR WG have rejected the by other
> formats firmly established method using dereferenceable specification
> URLs as object identifiers, so it seems COTX will remain my private
> "invention" :)

Are there discussions? In list of allocated tags I haven't found
anything like this (like 1010).

> Anyway, I'm not a fan of "polymorphic" tags so I would urge you to
> seek a new tag number (hopefully a bit more compact than 1010), for a
> version using a binary argument.

Well, I am not fan of meaningless duplication of tags - we already had
that duplication mistake with IPv4/IPv6 tags. It would have just the
same format - reference to to a type description and value itself. Just
reference could be not a text URL but something more machine-friendly
and more compact. If antoher tag would be taken, it should have another
meaning, IDK, may be like "@context" in JSON-LD... though that's still
pretty much close meaning.

It probably won't even change your implementation - just continue to
throw error on non-URLs in your specs/implementations, so that's other
values are for another software. So I don't understand why artificially
limit scope - exept URI, there are XRI generalizing it, there are DIDs,
etc.

> > 
> > E.g. for 1010([37(binary-UUID), ...]) or SHA256 of object or
> > something other (like referring previous string in a table) - the
> > goal here is to allow more *compact* representation, like that of
> > "@context" in JSON-LD (of which CBOR-LD took wrong way of not using
> > CBOR tags capabilities).
> > 
> > On Sun, 23 Jul 2023 09:15:50 +0200
> > Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
> >   
> >> If you don't put the private tag in a tag construct (where it could
> >> clash with other tags), you could start using the solution today.
> >> I would consider a construct like
> >>
> >>      Your Registered Tag([Private Number, Actual CBOR Object])
> >>
> >> which eliminates the need for a standard based on reserving a range
> >> of tag values that I guess are associated with a specific tag
> >> syntax/interpretation.
> >>
> >> Other ways ahead: the JSON and XML folks seem to be quite happy
> >> using URLs/URIs.  Why couldn't CBOR users do that as well?
> >> https://www.ietf.org/archive/id/draft-rundgren-cotx-04.html
> >>
> >> The potential waste of bytes is hardly an issue except for very
> >> constrained systems.  If this indeed is an issue, OIDs represent a
> >> since long establish method for getting your own global (and
> >> possibly private) namespace.
> >>
> >> Anders
> >>
> >> On 2023-07-23 0:05, Vadim Goncharov wrote:  
> >>> Hi Carsten and Tony,
> >>>
> >>> I'd still argue it's better bring up the older idea of
> >>> "per-enterpise tag spaces" - that is, where IANA register just one
> >>> "container" tag per organization, and there is a range of tag
> >>> space of actual "private" tags shared between all that
> >>> enterprises.
> >>>
> >>> E.g. tag 1234560 for Microsoft and 1234561 for FreeBSD, and 234567
> >>> for some data, which will have different meanings depending on
> >>> which container it's inside:
> >>>
> >>>        1234560(["name", 234567({
> >>>          "hi": "there"
> >>>        })])
> >>>
> >>> and
> >>>
> >>>        1234561(["name", 234567({
> >>>          "hello": [-122.5, 37.43]
> >>>        })])
> >>>
> >>> And enterprise tag number contatiner will be close to top-level of
> >>> CBOR document. This is in spirit of RFC 5424 which has enterprise
> >>> numbers (iso.org.dod.internet.private.enterprise registered per
> >>> RFC 2578) for interpreting keys within it's sections:
> >>>
> >>>         [exampleSDID@32473 iut="3" eventSource="Application"
> >>>          eventID="1011"][FreebsdField@2238 priority="high"]
> >>>
> >>> (32473 registered as example enterprise for RFC/documentation)
> >>>
> >>> This way, if ever private tags need to be exposed to public (as in
> >>> your analogy with 10.0.0/8), then organization may publish a spec
> >>> for the tag pair - e.g. for 1234561's 234567.
> >>>
> >>> It's still to be thought about from which range to allocate blocks
> >>> (may be several, for each byte-length range), and other questions,
> >>> but I hope you get the main idea.
> >>>
> >>> On Sat, 22 Apr 2023 10:34:05 +0200
> >>> Carsten Bormann <cabo@tzi.org> wrote:
> >>>      
> >>>> Hi Tony,
> >>>>
> >>>> thank you for asking this question.
> >>>> CBOR has a somewhat evolved view of the tag namespace (number
> >>>> space), and it may not be obvious.
> >>>>
> >>>> On 21. Apr 2023, at 18:53, Tony Putman <Anthony.Putman@dyson.com>
> >>>> wrote:  
> >>>>>
> >>>>> Hi all,
> >>>>>    I'm defining a data schema for purely internal use (no
> >>>>> interoperability needed)  
> >>>>
> >>>> This is known as “famous last words” :-)
> >>>> A lot of organizations have learned that they do need to connect
> >>>> their “private” net 10 IP addresses once they purchase or merge
> >>>> with other organizations. I think the same applies to tag
> >>>> numbers, even more so because sharing data is more loosely
> >>>> coupled than sharing networks, and you may find a need to
> >>>> integrate your data with data from other sources that have tags
> >>>> “for purely internal use".  
> >>>>> and encoding it in CBOR. There are points where we may want to
> >>>>> vary/extend the contents with new data, and I thought the
> >>>>> natural way to do this would be to define different tags to
> >>>>> hold the data. I expected to find a set of tag numbers defined
> >>>>> in IANA for private use, but there don't appear to be any.  
> >>>>
> >>>> Indeed, because “private use” may be an illusion for the above
> >>>> reason.
> >>>>
> >>>> (Note that we have a different kind of tags, for contextual use
> >>>> [1]. I’m not talking about those.)
> >>>>
> >>>> [1]:
> >>>> https://www.ietf.org/archive/id/draft-bormann-cbor-notable-tags-07.html#name-enumerated-alternative-data
> >>>>     
> >>>>>    - Is this a misuse of tags?  And if so, what would be the
> >>>>> more natural way to specify this?  
> >>>>
> >>>> You didn’t say much, but what you said leads me to believe that
> >>>> tags are a good way to address your requirement.
> >>>>     
> >>>>> - Is this a general problem that people face and would it be
> >>>>> worth defining a set of private tags which are known to be
> >>>>> context-sensitive and not interoperable?  
> >>>>
> >>>> Why share a set of (then not so) “private” tags when you can have
> >>>> your own, *actually* private ones?
> >>>>
> >>>> My recommendation would be:
> >>>>
> >>>> Make a good guess at how many tags you’ll need, and get a block
> >>>> of tags registered from the FCFS space for your needs. (You
> >>>> don’t need to be overly large with that number because you can
> >>>> always go back for more.) Call them Dyson-0 to Dyson-4711 if you
> >>>> want.
> >>>>
> >>>> Run your own internal tag registry assigning your private
> >>>> meanings to your IANA-assigned private tags. And, of course,
> >>>> once you are surprised by noticing that your “private” use is no
> >>>> longer really so private, update the IANA registry with some
> >>>> information about some of the tags (e.g., specifications) at
> >>>> your leisure.
> >>>>
> >>>> We would like you to use the space from 65536 up (1+4 space)
> >>>> unless you need a humungous number (for which we have the 1+8
> >>>> space). There also is a limited FCFS space from 32768 to 65535
> >>>> (in 1+2 space), but you don’t want to take an out-of-proportion
> >>>> chunk of those (and only if the size of the tag representation
> >>>> matters a lot for your application).
> >>>>
> >>>> Today’s tag usage report:
> >>>> range  used     %                 free                total
> >>>> 0 1+0    13 54.17                   11                   24
> >>>> 1 1+1    70 30.17                  162                  232
> >>>> 2 1+2   438  0.67                64842                65280
> >>>> 3 1+4 65284  0.00           4294836476           4294901760
> >>>> 4 1+8     2  0.00 18446744069414584318 18446744069414584320
> >>>>
> >>>> (Remember that this reflects the first ~ 10 years of allocation,
> >>>> which also might ramp up a bit over time — this space needs to
> >>>> hold for many more decades.)
> >>>>
> >>>> Grüße, Carsten
> >>>>
> >>>> _______________________________________________
> >>>> CBOR mailing list
> >>>> CBOR@ietf.org
> >>>> https://www.ietf.org/mailman/listinfo/cbor  
> >>>
> >>>
> >>>      



-- 
WBR, @nuclight