[core] SenML more-units indication

Ari Keränen <ari.keranen@ericsson.com> Fri, 22 November 2019 03:54 UTC

Return-Path: <ari.keranen@ericsson.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 90335120833 for <core@ietfa.amsl.com>; Thu, 21 Nov 2019 19:54:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 5Xq_vRyD8yMG for <core@ietfa.amsl.com>; Thu, 21 Nov 2019 19:54:55 -0800 (PST)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150085.outbound.protection.outlook.com [40.107.15.85]) (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 AB4DE120103 for <core@ietf.org>; Thu, 21 Nov 2019 19:54:54 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XPXA29iebPodMYB0mxpwuK/McMoG2PaacM63gzxvGUR01I+o/M1YvDVIJA+5f38t/EO1ORGUY+ol6ropjST8uNGLR9XqK319BGw+DV9iTcbF88CIZRRG2IFvX90CC1Bv2vgigsC+zYQcL2pKXuAKBlnV1+6E1CH6lNzAwQ7i7lh8uqtSL6idxBvkQ1V73NB2jJWu9sE9GrpyL14lqT59ff+hC7rMOGDuq4d1XxYIT3cK5BZUK57Nv4rSSbInJKCAMb/kg95LcIJGFmksbThpt/5tav5A6hqLPy39Jmdt1hOO0uyiyxtxgeegiHF/KbcmrH9otVmC0yHPk23kk7jiYg==
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=rqmrPg9Csl9vIAAeEERNDrSUIhh8Bm9xO8NJKVsQSRI=; b=MyO+l/wTkv3lsySZBTHPnTiNoGhFnBcZ8wU74/mP+sXY8cRZawlxR3YuAYq0NFeo0gQFUwThU4VtsScsz+tPxLBLh6bKKO1iIZrwPk/j3t92LvjP8cmN4wk9kVkavply2FKlRAk+TundCAL43HmNqzcGM+QXhoGK576GO3nBqouf73h2cpCpO2HGjFEvbwlVxPwyWbF/jacPk2LNrfdWL2/kj1z/RkXAVhOLRpiP5dt/57CCHZH5jZEVo6Gat1C0rB607TCZetLutm+ufFRQmD0IV6ehiOBHMLJim0VrCmfaxyJf67e2MRCN5vepC/tId46e4jBlJzEQp3rYBPfk3Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rqmrPg9Csl9vIAAeEERNDrSUIhh8Bm9xO8NJKVsQSRI=; b=P8aY1Pql3YY6d+oMGqvtJbs2OIWfbzUfP46JGq/g/gUhIAV89hDyJjkMzlC5Syd7/QKWjJAbdDE5aOj/JmXXZeHXYvYPceHzlMnP/EGnVPDOoD9w5at1VI9Gy8JRhuPNCMyaSWJuC9zL32n+dfnSbUT/v6RHA518LTxT3uLJ3Xc=
Received: from HE1PR07MB4236.eurprd07.prod.outlook.com (20.176.166.145) by HE1PR07MB4379.eurprd07.prod.outlook.com (20.176.164.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.9; Fri, 22 Nov 2019 03:54:52 +0000
Received: from HE1PR07MB4236.eurprd07.prod.outlook.com ([fe80::dc2b:f9d6:17f5:58dc]) by HE1PR07MB4236.eurprd07.prod.outlook.com ([fe80::dc2b:f9d6:17f5:58dc%5]) with mapi id 15.20.2474.015; Fri, 22 Nov 2019 03:54:52 +0000
From: Ari Keränen <ari.keranen@ericsson.com>
To: core <core@ietf.org>
Thread-Topic: SenML more-units indication
Thread-Index: AQHVoOiYPQWtocMvAUKcwvWSkFe8Fg==
Date: Fri, 22 Nov 2019 03:54:52 +0000
Message-ID: <9077CF0D-40A4-498B-8CB1-D20FE7605827@ericsson.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1d.0.190908
authentication-results: spf=none (sender IP is ) smtp.mailfrom=ari.keranen@ericsson.com;
x-originating-ip: [31.133.156.219]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 51d6a12f-4204-49a9-1606-08d76effbace
x-ms-traffictypediagnostic: HE1PR07MB4379:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <HE1PR07MB43796C9B87FE11B7527C386B85490@HE1PR07MB4379.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02296943FF
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(39860400002)(396003)(346002)(376002)(136003)(189003)(199004)(81156014)(6506007)(85202003)(85182001)(66946007)(66446008)(64756008)(66556008)(66476007)(86362001)(7736002)(186003)(26005)(102836004)(8936002)(5660300002)(8676002)(6436002)(81166006)(3480700005)(6486002)(6512007)(6306002)(305945005)(4326008)(3846002)(6116002)(91956017)(478600001)(66066001)(76116006)(36756003)(25786009)(2906002)(966005)(6916009)(33656002)(14454004)(99286004)(316002)(256004)(2616005)(58126008)(71200400001)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB4379; H:HE1PR07MB4236.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: EP6COxv4PWezJEARX8iZPfbq8p3eAlb3nDa90f9NzlSmdYE6zK6TCFZF5vap6ZVXK/9NyUVKvbALAEnk7UTZPDXJlAIIz94GxKuqs7MRPH44ZhyYZ8sh/IOHmUrpxxYvGA650RFgBxB8mi3TCapVJjDm9JEYSZ2ADNIHL1Mf5zvv3NJkgLfKcz1gZDydcjX1ssLL1Ph3xhXQH9JHWTpvy8OMuZ4y3dLYjav2gGm3yNM0/zLGdEqSHeklyfOjV27PlMlnLAh1KIWpQ8BOUnHm1QcCbQ9wCWZLfmNPmElJlJmO8/TXpXPbqEbxuq6lwz1bfX84838pMHPO4i7+3ziTY8N4mz/v+DzaXvCfwAq68GbAE9lih/JIP+3o1BNQh8WJOlSXdYfzflhpghubWK7C315Iz4sTDnzwRQq8dSSWoGBg7id1B4BEOxBhkdutTS1IE7h8sMdv7C4KSZ8IPiG6vySBZxxC3YYrkXFpzjlnpI8=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <4CBE5595D214A54A9F09AB7FF19CA3E8@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 51d6a12f-4204-49a9-1606-08d76effbace
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2019 03:54:52.5049 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Jl7lQQlwz/cGicrqatBg9xF6D1joJhtWOezvEMG8VotIF+yA17eJBBx/3kjqiWdeOL6hrE1euqTbU/wlLLzS/GVMTT0GHP8q2rMfNk8rpEU=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB4379
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/aYuIyKf73R4LopbBCX9IUkv8iLY>
Subject: [core] SenML more-units indication
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 22 Nov 2019 03:55:00 -0000

CoRE WG,

In the previous CoRE WG session we discussed the SenML more units draft [1] and how to (and should you) indicate in SenML Records that scaled units (e.g., km/h) are used instead of the "canonical units" (e.g., m/s).

As Cullen pointed out, this information is needed in SenML data pipeline systems that are based on the assumption that a single unit is used for all measurements of certain type (which is the case for unit registry policy of RFC8428). For example, if the measurement is about speed, you would always use "m/s". Using the same unit consistently enables efficient dispatching and filtering of SenML data records based on the unit alone. You can for example direct all measurements about speed or temperature to an analytics system that does not care about other types of measurements. And you would not need to know the sensor identities beforehand since the unit field contains enough information to do the data routing.

Without any indication, if both scaled and canonical units are used in the unit field, this kind of filtering/dispatching node would not know if the data records can be safely ignored ("this is not about speed") since new units for speed can be registered at any time. With the indication the node could at least raise an exception ("this might have been for me; but I don't know") or perhaps forward the data to another system that is able to deal with scaled units.

After the meeting Cullen and I discussed options for indicating this information (SenML versions, generic capability indications, separate field for different units ("u2"), indicating scaling factor in the records, etc.) and concluded that the best approach seems to be to have a flag in the unit field itself. For example, asterisk before the unit identifier (e.g., "*km/h"), as Carsten briefly suggested in the previous session.

This adds one byte of overhead, which is probably not a big issue in practice. However, given that the need for the indication is non-trivial (see above), the use of the flag with the unit might be surprising for developers and users (especially if you happen to consider it as part of the unit, not a flag) and hence break the principle of least astonishment. And as some of you commented already, this does not look very elegant.

In the CoRE session today we'd like to get a way forward decided with this. If you can think of a better solution, please let us know. If you have more considerations for having or not having such indication, please let us know too.


Thanks,
Ari

[1] https://tools.ietf.org/html/draft-ietf-core-senml-more-units-03