Re: [icnrg] Directions on CCNx TimeTLVs: draft-gundogan-icnrg-ccnx-timetlv

"Mosko, Marc <mmosko@parc.com>" <mmosko@parc.com> Mon, 25 November 2019 18:30 UTC

Return-Path: <mmosko@parc.com>
X-Original-To: icnrg@ietfa.amsl.com
Delivered-To: icnrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ABD48120C24 for <icnrg@ietfa.amsl.com>; Mon, 25 Nov 2019 10:30:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=parc.onmicrosoft.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 GbC5W7LbEFyq for <icnrg@ietfa.amsl.com>; Mon, 25 Nov 2019 10:30:52 -0800 (PST)
Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680042.outbound.protection.outlook.com [40.107.68.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7245C120C26 for <icnrg@irtf.org>; Mon, 25 Nov 2019 10:30:47 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fM/c8S9aQ0ninjQV8XXoSOSegOMNBeESohuLWOy3Gviy4XECDabqK04dRj5SYv71zYa6M78/bgThhAgmLqgiu6DQACWo6vbf4JYx3iXEKmkoyrevXAJvKRN9DkfAi09iRVbdccy37kvbBivo3KWoYS0+IJuLspbqhLw7FMiSLsSghfDsJas7sMPqeI7KuvE64cD3rggW9RjPW6RD2e6JtBm5Mtexxeyh+NtyHXqEk9m00NnfR1vFhd/cpBlSmsB/iuN72cerYN6lcRFE92W0k9ADwU+6hGrSvxYlwUp7cg71SdrIkFbuSSuwIDPfZ+zDCfnBmOfXYwBoRpUO1De+6Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bj0Y3DyZ0gvqyLKhkSOe6RTO6dccskmeBmpYc0JZo5M=; b=GX2Eh/XUdHgC+jmB05FjAE6JNRLPMNbw7beAFJQZaWNsmYgv5qweRr7BPhcAmFVshQcFIxnqSEGUx80stKDkfuvPFczMXRJFlz1iBj9CMQfy6SCVVWAmZcbuh6YssFuu/Sa8eR/Zk3ZuHvwzkkg/SvqevSJ2GflVs6f3D3dwbdczDPOJ2EJf20fi0bsiPuT/bSN2h/llGrPexScfOb4wKZ6vw2iICliq32Ty3hpnN14dZheb799VMv2tic2gb4xyYS0FHdeMs3oUgtwmnWWxe0IwV0pNL0KhDJcP1rWGq3rC5uwR9NXoddPpKeO+PSx2qoFBxE8ppiJl7+h4auqPkw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=parc.com; dmarc=pass action=none header.from=parc.com; dkim=pass header.d=parc.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parc.onmicrosoft.com; s=selector2-parc-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bj0Y3DyZ0gvqyLKhkSOe6RTO6dccskmeBmpYc0JZo5M=; b=i/IBO5M21c7YyOfFX8DMID9JDKSRYbSFQ0YdrlRGpOA6wDYquyiR6oBo3QH6+h4k2CICqOtdPWOHGTMcUdkts/cq4EmhphGHlfZ0WYIuyI5urvGCdU2y56CAqWuBLZ4Qq7qNBnqJTYWR5IV5FbQ8yr2INkPAn+g/hL8VCV3yDjI=
Received: from BYAPR15MB3272.namprd15.prod.outlook.com (20.179.59.145) by BYAPR15MB3240.namprd15.prod.outlook.com (20.179.56.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.18; Mon, 25 Nov 2019 18:30:44 +0000
Received: from BYAPR15MB3272.namprd15.prod.outlook.com ([fe80::78f2:5685:5bc3:3e27]) by BYAPR15MB3272.namprd15.prod.outlook.com ([fe80::78f2:5685:5bc3:3e27%6]) with mapi id 15.20.2474.023; Mon, 25 Nov 2019 18:30:43 +0000
From: "Mosko, Marc <mmosko@parc.com>" <mmosko@parc.com>
To: =?utf-8?B?Q2VuayBHw7xuZG/En2Fu?= <mail=2Bietf=40gundogan.net@dmarc.ietf.org>, "icnrg@irtf.org" <icnrg@irtf.org>
Thread-Topic: [icnrg] Directions on CCNx TimeTLVs: draft-gundogan-icnrg-ccnx-timetlv
Thread-Index: AQHVn1ipW2xJXkUxYkyIhm3+LbJMcKeTEd8AgASZRYD//8QGgIAEW4+A///tXAA=
Date: Mon, 25 Nov 2019 18:30:42 +0000
Message-ID: <2ED76739-6CE3-4476-8F1A-1A7297DF9F77@parc.com>
References: <73a5a9ff-03c2-3b63-576d-8811c84b90c4@haw-hamburg.de> <9AB2EAD4-4458-4BD3-B263-A8C9BDAAB25B@parc.com> <87r21zy7ba.fsf@gundogan.net> <2823BFCD-3228-4E8D-8B7F-D27C9FF046CA@parc.com> <87blt0191m.fsf@gundogan.net>
In-Reply-To: <87blt0191m.fsf@gundogan.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1f.0.191110
authentication-results: spf=none (sender IP is ) smtp.mailfrom=mmosko@parc.com;
x-originating-ip: [50.0.67.90]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 7c1e6217-0471-41bd-1f2d-08d771d59502
x-ms-traffictypediagnostic: BYAPR15MB3240:
x-microsoft-antispam-prvs: <BYAPR15MB32406E6D5DA8EBF785462175AD4A0@BYAPR15MB3240.namprd15.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-forefront-prvs: 0232B30BBC
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(39840400004)(136003)(396003)(366004)(199004)(189003)(9686003)(229853002)(305945005)(8676002)(81156014)(81166006)(8936002)(66574012)(2501003)(36542004)(86362001)(6246003)(26005)(186003)(446003)(2616005)(11346002)(76116006)(64756008)(66446008)(66476007)(66556008)(76176011)(58126008)(110136005)(99286004)(102836004)(7736002)(66946007)(66066001)(1250700005)(6116002)(3846002)(71200400001)(6486002)(25786009)(316002)(36756003)(71190400001)(3450700001)(478600001)(33656002)(2906002)(5660300002)(14454004)(6512007)(256004)(14444005)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR15MB3240; H:BYAPR15MB3272.namprd15.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: parc.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: foY3bLNP+OxL0g8UT2W2p4S2GndCHP6YZ5Ae3nXeQrtPq8Jzf5hCU2YN63QQnKRun1OugT+D+7nro4BZFLW41IQxMogib4RRqCGIUUFT5UbPHiOv9ADXpM2aST6fL/VjpA8EtAqZ/Z4ZuIOesbzAhB//7EVVATkC+HbiVM0W0zAcUcSYB4mTLsOsY+XBO7xXawY/FRVw3leccJlRPJ8H8Pxmjm9uukscCh2OeM33B5JGMH+epIKNEjC5WFINecS742BSpXKzYZZQB0Jeqz3zVB0QdbEnfk6Tg+TWwnvOA8XT7vNjOwqSvV0pajkr9czdDj94joFnhBVW6t0RZbeurQU1cwP4B6sBEuLUOOpqYFbsujMIZAw53QN03+TCX2o3j81bsaDAiH17o52AJ/n0j27Hqs8vMJU2xVBI5HTByWe2iHlZJ2wks0UvgUid9Nr+
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <C75DBD8D74EE5D4BAD529809512FC1C9@namprd15.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: parc.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7c1e6217-0471-41bd-1f2d-08d771d59502
X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2019 18:30:43.2574 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 733d6903-c9f1-4a0f-b05b-d75eddb52d0d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: XumO12yQrDKCC+AC4nAhjRtrKxRQqg91w4CX8wzPJgzxeJayiMtVyBLBJdXRQnUe
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB3240
Archived-At: <https://mailarchive.ietf.org/arch/msg/icnrg/kSNtjuqX9x-X9kVZgs2mB3TSksA>
Subject: Re: [icnrg] Directions on CCNx TimeTLVs: draft-gundogan-icnrg-ccnx-timetlv
X-BeenThere: icnrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Information-Centric Networking research group discussion list <icnrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/icnrg>, <mailto:icnrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/icnrg/>
List-Post: <mailto:icnrg@irtf.org>
List-Help: <mailto:icnrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/icnrg>, <mailto:icnrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Nov 2019 18:30:54 -0000

Replies below.  I edited down the history to make it a bit more concise.

On 11/25/19, 3:37 AM, "icnrg on behalf of Cenk Gündoğan" <icnrg-bounces@irtf.org on behalf of mail=2Bietf=40gundogan.net@dmarc.ietf.org> wrote:
    >
    > If you denormalize (0,6,3,0), the 0 exponent values are 0.00, 0.25, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75 without playing with a C factor.  If you denormalize (0,4,4,0), it goes in 1/8th increments from [0 .. 4], then in 1/4th [4,8], then 1/2th [8,16], etc.
    
    I did include subnormal numbers in [1]. If we go with seconds as base
    unit (and without a C constant), then I get the same values you wrote.
    
    With this setup, we would have a maximum value of ~17 hours for
    (0,4,4,0) and ~127 years for (0,5,3,0). 17 hours might be a little less
    ... and 127 years a little bit too much.
    
    Instead, we could also apply a bias to (0,5,3,0), let's say -7. This
    yields a maximum value of roughly 1 year. At the same time, it allows us
    to encode a few more sub-second values (starting at ~1.9 ms).
    
    What do you think about (0,5,3,-7)? Are 56 sub-seconds values too much?
    
I think the (0,5,3, [-5, ... -7]) range looks good.  -5 is just under 4 years, -7 is just under 1 year.  At the low end -5, is about 8msec resolution, whereas -7 is about 2 msec.  -6 is ~ 2 years range and about 4 msec resolution at the low end.

For expiry time, I think 1 second resolution is plenty, and 4 years (for IoT use case) is also pretty good, considering that one could use a 2-byte or 8-byte value if one really needed more.   Same for recommended cache time.

For Interest lifetime, I personally are not a fan of trying to use very short Internet lifetime for PIT expiry at packet RTTs -- it's too easy for the standard deviation of arrival times to make small values counter-productive.  So I'm OK with a lower resolution like -5 vs -7 to get more range.

I think I would tend to let the 1-byte minifloat be less precise and have more range.  If one really needs precision, then use a 2-byte half float.

For the 2-byte encoding, I suggested using the standard IEEE half-float, but I now realize that it uses a -15 bias, so the maximum value is only 65519.  Maybe we want to use something more like (1, 5, 10, -12) or something to get more range if we are using seconds as the unit.  I've not plotted out the values for this.

These encodings work for relative times.  We still need to conjure up a time base.  Interest Lifetime is already a relative value, so that works OK.  The cache times either need a time base or we need to allow a relative encoding using Age style fields.  

Here are some options for relative times.  I think I prefer #1 or #4, but it needs more thinking through.

1) 2-byte encoding:  <1-byte uint8_t offset from year 2000> + <1-byte mini-float> or 3-byte encoding <1-byte offset from year 2000> + <2-byte half float>.  This would use the 0th second of year 2000, 2001, ..., 2255 as the base of the mini/half float.  If the spec survives until year 2200 or so, we can update the definition __  If one uses (0, 5, 3, -7), you get pretty good resolution over the 1-year time bases.  I'm not convinced one needs the 3-byte encoding using this method.

2) Define a new TimeBase field to designate the year to use as the base and keep the other encodings as 1-byte or 2-bytes. The TimeBase would define the offset to the year epoch (say a year 2000 base?).  This requires an extra 4 bytes of TLV overhead so it would be at least +5 bytes, whereas encoding the year base in #1 is only +1 or +2 extra bytes (2 extra bytes if you have both ExpiryTime and RCT).  Or #4 that requires 0 extra bytes.

3) Use an exponential timebase, such as 2000 + 2^(n/k), where we get to pick the constant k.  As opposed to the additive method in #1 or #2, this is essentially unbounded. One could even choose a smaller offset, like 1900 instead of 2000.  This gets pretty complicated and very poor precision as the years go out in the future.

4) Use (0, 5, 3, 0) relative to year 2000 (i.e. years 2000 - 2127), or (0, 5, 3, +1) relative to 2000 for times in years 2000 - 2255.  Small encoding, but poor resolution as you go out in years.

5) Use an Age-style relative cache time.

    >     The next question (to the group) is how we want to encode them:
    >     T_INTLIFE is actually unbounded (as per RFC). It can use a time value of
    >     arbitrary octets, although the usefulness for 1- and 2-octet time values
    >     in milliseconds is questionable [3]. So, this TimeTLV draft would not
    >     just add new functionality, but would *replace* the current behavior, if
    >     we use it in T_INTLIFE with Length==1 OR LENGTH==2. Is that something we
    >     want?
    >
    
    Any ideas or concerns regarding the integration? Is replacing the
    existing functionality defined in the CCNx RFC desireable?

I am hesitant to have the type of a value determined by its length -- for both Interest Lifetime and the cache times.  But I am not coming up with a more cleaver solution.

For hash values, we used a TLV inside a TLV.  That's 4 extra bytes to define the hash type, but that is relative to 32-byte (256 bit) values, so the relative overhead is not too bad.  But a TLV inside a TLV does not make sense for 1 or 2 byte values.

One could do a self-describing Number type, such as with a 4-bit or 8-bit header, then re-define various TLVs to use the Number type encoding.  This would let us encode all the standard formats (uint8_t, int8_t, uint16_t, ..., int64_t, float32, float64, (0, 5, 3, 0) float, ...).  This means that Number type TLVs would always be, say, 1-byte larger than the encoding, but you get a lot of flexibility.  An more importantly, the type is no longer defined by the length.  It also means that you can use whatever encoding is most suitable for the field usage for any particular message.  The downside is that comparisons can no longer be done with memcmp() in many cases.  On the bright side, the fast path of the forwarder does not evaluate any of the time fields, so it is only a hit on end systems or caches or firewalls filtering on values.

Marc