Re: [core] [Anima] date-and-time and "created-on" field in constrained-voucher

Andy Bierman <andy@yumaworks.com> Wed, 29 June 2022 17:11 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 98F11C15790B for <core@ietfa.amsl.com>; Wed, 29 Jun 2022 10:11:21 -0700 (PDT)
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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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=yumaworks.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 jcfmv2UcJZd6 for <core@ietfa.amsl.com>; Wed, 29 Jun 2022 10:11:17 -0700 (PDT)
Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3B178C15AAD4 for <core@ietf.org>; Wed, 29 Jun 2022 10:10:57 -0700 (PDT)
Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-3178acf2a92so154547857b3.6 for <core@ietf.org>; Wed, 29 Jun 2022 10:10:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KRZiyD88AlfnFu0OLnlVrpk9RgGtkugTGMuHynepq9E=; b=hs87viBXICXgd1KNWDyDKiCvbsMgpoYckRkJGbH1UnqUTzZpX6UAL+0nSHDn/czP3R 7aXpwulLhEolGEUkfOvkwo/B2xw+2DAYLcxRqBGnrbba0+RtLGs3GsIRrH8N7OhJ3sMJ Jdu32IP4BHIJvDugA7CV4ilFFmYs+t5Rhcy2AlYds9T9lbLlyCC6FMcCAVwhSKHIYbVa 6SFwVstzcaUefXFd3yqdvqpkvBA48bIhnHY6RhgF6l2mzEocya3KdO/OZI0tuNfFYdhw p55m5r0kUGmq5vdpLp4/K2cxLrqkLthtCZqI77kPrr3d0Mw0tnu8R4SFA+IX/4TNZ66u GcYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KRZiyD88AlfnFu0OLnlVrpk9RgGtkugTGMuHynepq9E=; b=AKj9ws3c4SjaBPsPPQzn5Di5jo0FZFCMbOQuu1rT9HypDfF5eEieJmwhk3o+LbdGdX c8Q5FirgLR8yWupX4d+0neah8xNiiILLmymoOctejnoSc2l+8brCGkytlnT7gGZDAvNr vPLWCKqy/GE5FsT9UpTLqsDyGQltfMM1bAzBrs4ZHwsbh/uopo84g+gdq4tZucF/NN/D mRzMBOhavqfm2n/W6nukbDeRxBX8/rk59REwB4pMj91q0RSca52dcMSdUqSWUJD8AGHt dD7FExuNryafc3+xZs9YxOyY6T08UCEgOkplmWKcpIcbFjW/LCSVLq2S+jK4LK3Xdxka h23g==
X-Gm-Message-State: AJIora//GTQqLjAFqWTBKiMSOFuUM71TetgMFBoCF2gUa65zysdUl6LV NuppKLxLisZuqOjTf0G1SaCApAeRTsZPyE72AiPh3Rc/IlQ=
X-Google-Smtp-Source: AGRyM1sn87uuf/yFMJVS+B8GZLX7rJKzf3ugzFBD8chnCH7DqDNbHbBlVUzcVhUnZVqfC7v8t4qCtVfzboeXElCR5rU=
X-Received: by 2002:a81:12d6:0:b0:314:6097:b272 with SMTP id 205-20020a8112d6000000b003146097b272mr5108350yws.159.1656522655739; Wed, 29 Jun 2022 10:10:55 -0700 (PDT)
MIME-Version: 1.0
References: <24048.1656352364@localhost> <25937.1656365067@localhost> <CABCOCHS6=F0tfESkVmOk1AFKvsu4tRfKu9A_Sgz5swVXv-eXCQ@mail.gmail.com> <26870.1656383550@localhost> <CABCOCHSkh95PEEM5E3YKe_yc5VmsY90XxT1D-z3AiJwwcG-HhA@mail.gmail.com> <7669.1656440710@localhost> <6DCC06F4-3799-4CC0-8780-21E6B12A4022@tzi.org> <CABCOCHQqtKw6cZ1o7nzDmQBN0zQP70CgeAAc6nFdRa_kB+-DBQ@mail.gmail.com> <09C66776-54C5-4C5D-9DFA-E164A1050170@tzi.org> <E51C95DD-0AC5-40E4-8609-E0B444E77786@tzi.org> <20220629015429.vfps46mvcb7io67o@anna> <04EC3D51-6242-4547-BF7F-397859E8D18E@tzi.org> <CABCOCHSEyGakhuukHkLU-bWUV26QAzc3vkOuLEMRf8-YZbFtqQ@mail.gmail.com> <27FD2DA5-AF36-4E57-ADC8-2D6F8DE62919@tzi.org>
In-Reply-To: <27FD2DA5-AF36-4E57-ADC8-2D6F8DE62919@tzi.org>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 29 Jun 2022 10:10:45 -0700
Message-ID: <CABCOCHSk2moVv_X90SAjHX8RyTE4XJcSGEvU4ufZnGN_eYWY=A@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, anima@ietf.org, Core <core@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000075484305e2993ced"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/ErYp8nDDze-2CQ6cmFCJEsD8JpU>
Subject: Re: [core] [Anima] date-and-time and "created-on" field in constrained-voucher
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Jun 2022 17:11:21 -0000

On Wed, Jun 29, 2022 at 8:09 AM Carsten Bormann <cabo@tzi.org> wrote:

>
> > So your proposal is for the sender to check every single string it sends
> to the receiver to
> > see if some complex 20 byte string can be changed to an 8 byte integer
> instead?
>
> In an actual implementation, these 20 byte strings never exist.
>
> How a sender finds out that the 4-byte integer is enough is not specified.
> The answer is probably: because the data were in platform time format, and
> we just don’t do a strftime but a memmove(..htonl(..)).
>
>
The sender and receiver need to agree on the encoding of each schema item.
There can be no guessing.  But maybe this is a protocol issue and can be
addressed there.

Since this is a property of the CBOR encoding and not the YANG model itself,
adding more YANG statements seems like the wrong approach.
Extensions are possible but completely optional-to-implement.
Republication of all the modules that use date-and-time to add the
extension is not practical.

IMO the typedef replacement equivalency discussed in 7950, sec. 11 is not
important.
It is no burden at all to just use the correct 'date-and-time' data type.
There are no real examples of the plain string approach Juergen mentioned.
It is not a valid use-case.


Andy


> This seems rather CPU-intensive and not very useful for YANG Push.
>
> The way you describe it definitely is.
> But the specification would not stop you from doing do this, just your
> implementation common sense.
>
> > I doubt constrained devices have enough CPU for this, or that they need
> to send
> > lots of date-and-time data nodes to justify it.
>
> So far we have:
>
> — date-time and friends (as POSIX time integer): CBOR tag 1
> — IP addresses and friends (as binary): CBOR tag 52 and 54
>
> Fortunately, “type binary” is an actual base type, so here we already have
> actual schema support and therefore support in YANG-CBOR as is.
>
> > The date-and-time typedef for a string is not special in YANG in any way.
> > Just another derived type defined in a YANG module.
>
> Indeed, this is the reason why it is hard to do this properly (i.e.,
> deterministically in a way that it is guaranteed that every generator gets
> the choice right) without additional language support.
>
> Grüße, Carsten
>
>