Re: [Yot] questions concerning sid value assignments

Michael Richardson <mcr+ietf@sandelman.ca> Mon, 19 February 2018 18:23 UTC

Return-Path: <mcr+ietf@sandelman.ca>
X-Original-To: yot@ietfa.amsl.com
Delivered-To: yot@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1DC231204DA for <yot@ietfa.amsl.com>; Mon, 19 Feb 2018 10:23:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 9buiTiYEAnmB for <yot@ietfa.amsl.com>; Mon, 19 Feb 2018 10:23:17 -0800 (PST)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3AAD41201F2 for <yot@ietf.org>; Mon, 19 Feb 2018 10:23:17 -0800 (PST)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id 895CF20091; Mon, 19 Feb 2018 13:30:31 -0500 (EST)
Received: from obiwan.sandelman.ca (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id B38B780766; Mon, 19 Feb 2018 13:23:15 -0500 (EST)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: consultancy@vanderstok.org, yot@ietf.org
cc: Michel Veillette <Michel.Veillette@trilliantinc.com>, "Panos Kampanakis (pkampana)" <pkampana@cisco.com>, Kent Watsen <kwatsen@juniper.net>
In-Reply-To: <22cc48128046319c662c116bcc39d761@xs4all.nl>
References: <faa44e95aa561876f119edc7358fd118@xs4all.nl> <26096.1518551413@obiwan.sandelman.ca> <9e0d297ad888a36e16921d10873cc947@xs4all.nl> <BN6PR06MB23082D66ED7486BDA002B1DBFEF50@BN6PR06MB2308.namprd06.prod.outlook.com> <eaccba06f07bc88eac32285fb8880f06@xs4all.nl> <22cc48128046319c662c116bcc39d761@xs4all.nl>
X-Mailer: MH-E 8.6; nmh 1.7-RC3; GNU Emacs 24.5.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Date: Mon, 19 Feb 2018 13:23:15 -0500
Message-ID: <8136.1519064595@obiwan.sandelman.ca>
Archived-At: <https://mailarchive.ietf.org/arch/msg/yot/jvU5FQnKiJI9XKFoJvqfNPb8s8c>
Subject: Re: [Yot] questions concerning sid value assignments
X-BeenThere: yot@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Yang of Things <yot.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yot>, <mailto:yot-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yot/>
List-Post: <mailto:yot@ietf.org>
List-Help: <mailto:yot-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yot>, <mailto:yot-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Feb 2018 18:23:19 -0000

peter van der Stok <stokcons@xs4all.nl> wrote:
    > I created an example for myself by heart. Can you see if my memory is still
    > correct?

    > I assume a server with one voucher module and one cwt-voucher module;
    > The augment with grouping is used for SID allocation.
    > The diagnostic notation is used for CBOR.

Cool...

    > {
    > 1001000: {
    > +3 : "2016-10-07T19:31:42Z",
    
    > A returned cwt-voucher may look like:

    > {
    > 1001030: {
    > -27 : "2016-10-07T19:31:42Z",

It took me a moment to figure out that 1001000+3 == 1001030-27.
That's exactly what I would think should happen if we have SIDs allocate for
the underlying ietf-voucher object which we then repeat.

There is a concern if the gap between 1001000 and 1001030 was larger!
-27 is fortunately still a 1-byte CBOR integer.  Otherwise, we get into 2
byte CBOR integers and even three byte ones.  Since the delta is relative to
the enclosing value, not the previous value, we can't even amortize the gap.

This is an argument to not re-using the values.

    > Both can be identified nicely though the presence of 1001030 or 1001000

    > However, when using comi to return the value of for example:
    > ietf-voucher/created-on, or
    > iet-cwt-voucher/created-on

    > The request for both is identical:

    > GET //example-server.com/c/1001003

    > The server does not know which one to return.
    > Did I miss something?


-- 
Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-