Re: [Cbor] Typed CBOR Objects

Anders Rundgren <anders.rundgren.net@gmail.com> Thu, 10 February 2022 12:42 UTC

Return-Path: <anders.rundgren.net@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 CFCF93A0EFA for <cbor@ietfa.amsl.com>; Thu, 10 Feb 2022 04:42:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.812
X-Spam-Level:
X-Spam-Status: No, score=-2.812 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, NICE_REPLY_A=-0.714, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GGI8y1jN-ZU8 for <cbor@ietfa.amsl.com>; Thu, 10 Feb 2022 04:42:27 -0800 (PST)
Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EEF2B3A08CE for <cbor@ietf.org>; Thu, 10 Feb 2022 04:42:26 -0800 (PST)
Received: by mail-wm1-x331.google.com with SMTP id k3-20020a1ca103000000b0037bdea84f9cso3859263wme.1 for <cbor@ietf.org>; Thu, 10 Feb 2022 04:42:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=zn9cnSCns65QTETTvMqls56Xo5n/jMp6FvOEYKiSfJU=; b=HXDmxn6kUGLfDSUhVeMpnnFliIc91+SeIVt6faI28UKTSBbB0Zz31lAm2g1Mm/79rA wqgc442RzjwZGcIvW2ZJEOEsvs8wk8nXcOLlI5xEavIpaEDm84F8GPYtceLgMode0UtC esUaMsK3DsHH7ZHRcjWpoA0xTi95otLII74GsWkRumpe8C4beN+V+IXCTL7cohH19Osx qwV3iggmXLwpYcuViZ3B9PJsXDa/fzG4zMEicK4PMqpFISkjI2Qj9srzP7Q07IrJuU7X 7BM+C+3uLCsR/aYUOgXw27LswkiwFiSys3BIIO+2cMWNU0nNxntKDO+wieZADr7v5bKx 1LQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=zn9cnSCns65QTETTvMqls56Xo5n/jMp6FvOEYKiSfJU=; b=UVIjwxevu7ed8aOFHsxtsKxc//yXGCdGbqPvN4MbXPM8g19jzWyotChD2oygEknjy+ tuDjaxPOJ3JPELOXvysJzsh74ay5ahuSU4hQw2bVtvyJCtU/yAll/PEiwqxoe4p+GFuG GzJXLMHYzrxdi7hRoNkWAnfxE6CX6pF9SgHpB+ol3+WfnSXSN3cbjHbzCHNTmgy0ZEEh b3kaIYfRp7o5ExWcASOWQQ5WxbRgGFHIOE4vnVrGelyS1tzRANWKcYnUtJLMjeZhIC2g kkNN411EABFOGtfjFLXwtVHe78Q6ykU3GzmAkiFhSS5gJL8/wim+wyTNFyop9Bp0wYqi dcDA==
X-Gm-Message-State: AOAM531hjn4s4qMRyEXEuqhBIlkZ3wmixEjeWjqosv/P1WWXzJ8AUGIN tbi5/+v7DUM3PknKUD07mzU=
X-Google-Smtp-Source: ABdhPJzV22mJQxsPq9vKgNn4YNl2yXDNe48h55+xW6Ey65I4MVw6Gdqt23ennZlkB/enTx2xXn/z4w==
X-Received: by 2002:a05:600c:3552:: with SMTP id i18mr256505wmq.90.1644496944452; Thu, 10 Feb 2022 04:42:24 -0800 (PST)
Received: from [192.168.1.67] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id i15sm4035629wrf.58.2022.02.10.04.42.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Feb 2022 04:42:23 -0800 (PST)
Message-ID: <f4036e57-bb30-dab4-bbff-96b620552404@gmail.com>
Date: Thu, 10 Feb 2022 13:42:21 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1
Content-Language: en-US
To: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>, cbor@ietf.org
References: <d6b31d09-86fe-534d-446d-652b8e64e751@gmail.com> <CBD0EF42-6298-4845-B9AD-A18735F8BE4D@tzi.org> <99907B71-D019-46CC-A785-907E1E9D4B6C@cursive.net> <e7e7a747-6236-171f-a5c8-5a8cfcecf27b@sit.fraunhofer.de> <8c5a4fe1-423d-9a68-3735-76ace3f27d49@gmail.com> <d1c6592e-ef23-6758-aa01-9d5891169ce7@sit.fraunhofer.de>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <d1c6592e-ef23-6758-aa01-9d5891169ce7@sit.fraunhofer.de>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/VMW5ld2zZafRAzSap_quip2SQJ0>
Subject: Re: [Cbor] Typed CBOR Objects
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: Thu, 10 Feb 2022 12:42:32 -0000

On 2022-02-10 12:21, Henk Birkholz wrote:
> I can see your point. I hesitated for a second, but posted anyways :-)
> And you are not being rude, you called me out and I am... kinda guilty
> as charged.
> Still, this reflects my opinion as a contributor.

Hi Henk,
No problems, all is good :)

If we take EAT which served as an "inspiration", EAT typing is currently
a mixed bag including:

- Specific CBOR tags

- Specific media types (TBD)

- Parameterized media types (TBD):
    https://github.com/ietf-rats-wg/eat/issues/157

- URL/OID based profile info(!):
    https://datatracker.ietf.org/doc/html/draft-ietf-rats-eat-11#section-3.18

Although each developer with some self-esteem consider their applications as
unique and therefore motivate equally unique solutions, I see that as problem
even for my own designs which target Open Banking & payment systems.

The (apparently naîve idea...) was that there could be classes of
applications which could benefit from something along the lines of
https://datatracker.ietf.org/doc/draft-ietf-cbor-file-magic/
but using decentralized URLs instead of registered CBOR tags.

That's all. Well, not really, there is this nagging media type thing as well...

I'm not in any way proposing that consuming applications should download
specifications (even if expressed in a schema).  What I do think is reasonable
is declaring what kind of schema data is associated with and letting
consuming applications kindly report if they don't understand the particular
dialect.  This is an alternative to current Open Banking system which
typically return 500 server error when something is wrong. Armed with
discovery services you can combine robustness with agility which becomes
an issue when the numbers of consuming application entities exceed 100,000
and there is no centralized software certification in place, not to mention
the fact that these systems often are updated at least once a year.

Cheers,
Anders

> 
> On 10.02.22 11:05, Anders Rundgren wrote:
>> On 2022-02-10 10:45, Henk Birkholz wrote:
>>> +1++
>>
>> Henk, I don't want to rude, but maybe you should hold your dismissals
>> until EAT have resolved their typing issues?
>> We are still waiting :)
>>
>> Cheers,
>> Anders
>>
>>>
>>> On 10.02.22 07:43, Joe Hildebrand wrote:
>>>> Agree with Carsten.
>>>>
>>>> Additionally, if you insist on repeating XML's mistakes, can you at
>>>> least make sure that you don't repeat some of the worst consequences
>>>> of those mistakes?  URLs are an attractive nuisance for these
>>>> identifiers, since naively-written processors tend to retrieve those
>>>> URLs drastically more frequently than anyone imagined, thinking that
>>>> they might contain computer-parseable schema information -- which
>>>> turns out not to mostly never work.
>>>>
>>>> If you must have unique identifiers that are easy to mint without a
>>>> new central registry, ask for a non-resolving URI, and make all of
>>>> your examples use RFC 4151 tag: URIs or something that has similar
>>>> properties.
>>>>
>>>> (Note: RFC 4151 is Informational, but useful.  Careful use of a new
>>>> URN space might work, if you must.)
>>>>
>>>> —
>>>> Joe Hildebrand
>>>>
>>>>> On Feb 9, 2022, at 11:20 PM, Carsten Bormann <cabo@tzi.org> wrote:
>>>>>
>>>>> Of course, you can add an indirection, but the most direct way to
>>>>> indicate a new specific data model is a tag.
>>>>> In essence, your TBD211 is exactly that; you have just chosen to add
>>>>> a parameter in the form of a URL or an OID (which is pretty much
>>>>> what you argue AGAINST in the last section…).
>>>>>
>>>>> I’d rather allocate a tag for each specific data model.
>>>>>
>>>>> Grüße, Carsten
>>>>>
>>>>>
>>>>>> On 10. Feb 2022, at 07:02, Anders Rundgren
>>>>>> <anders.rundgren.net@gmail.com> wrote:
>>>>>>
>>>>>> Hi List,
>>>>>>
>>>>>> As a subscriber of the RATS list I noted that I'm not alone looking
>>>>>> for a flexible and extensible way of identifying a CBOR "schema"
>>>>>> (content specification).
>>>>>> Different solutions have been suggested including parameterized
>>>>>> media-types: https://github.com/ietf-rats-wg/eat/issues/157
>>>>>>
>>>>>> Having a background in XML Schema (including WS-*) and similar
>>>>>> concepts applied to JSON, I've sketched up a counterpart for CBOR
>>>>>> that currently only exists in the form of a GitHub issue:
>>>>>> https://github.com/ietf-rats-wg/eat/issues/165
>>>>>>
>>>>>> Using URLs as type identifiers may be regarded as breaking the
>>>>>> desire keeping things nimble.  However, there are lots of possible
>>>>>> applications where a 50-byte overhead would be a no-issue.  For
>>>>>> converting JSON-based designs to CBOR, URLs are a necessity.  For
>>>>>> highly constrained environments, OIDs seems like a useful alternative.
>>>>>>
>>>>>> Feedback would be appreciated.
>>>>>>
>>>>>> Thanx,
>>>>>> Anders
>>>>>>
>>>>>> _______________________________________________
>>>>>> CBOR mailing list
>>>>>> CBOR@ietf.org
>>>>>> https://www.ietf.org/mailman/listinfo/cbor
>>>>>
>>>>> _______________________________________________
>>>>> CBOR mailing list
>>>>> CBOR@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/cbor
>>>>
>>>> _______________________________________________
>>>> CBOR mailing list
>>>> CBOR@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/cbor
>>>
>>> _______________________________________________
>>> CBOR mailing list
>>> CBOR@ietf.org
>>> https://www.ietf.org/mailman/listinfo/cbor
>>