[core] SenML data ct indication and string content-format values

Ari Keränen <ari.keranen@ericsson.com> Thu, 25 July 2019 05:02 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 4AE571201EE for <core@ietfa.amsl.com>; Wed, 24 Jul 2019 22:02:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, FROM_EXCESS_BASE64=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 rTjnE80ZMBic for <core@ietfa.amsl.com>; Wed, 24 Jul 2019 22:02:14 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70074.outbound.protection.outlook.com [40.107.7.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 842121201EB for <core@ietf.org>; Wed, 24 Jul 2019 22:02:13 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YWvBs09wSEwU62CrYxG1W+w0HRnkVX2rJU3MM3sLUUxRkbm8xsu/ohWnY9kpXiHdH/0syuLu3suKEPtn0/+WFG1CvO9fzSU+OncMbWZNRV2FdS0YYDbYXPJgsDTVt8HavQRkx/NCarsaHklqqO6rYotAgQOQ+2O0PONxyGL2zYdBn93aPo087xblGguxtbuxM3ckjk0ac89ov0JVh4+6LWGy5yvScWnTCmUWVsfyg20jL2+cFhJtpCsqZwaxbs15r4PKsKZwENBLPjax28NIu/UzttNKHaPbthiB4dEDt6Ni7UMmKgI/V0zPwWUx8JyqepRjRIZ2lar6DsEcKDhy+Q==
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=7D7SwZjqUETnmBOXqMoJv9/QN67D45KsgNUEqbT8xk0=; b=QAmRjEaNHoOb0p1q4cARqJvEcbB9DH3aL2VFtvSJFKEV1FXnL5rAa5ZzMoMvR1peGwofrNk1WTh3OAAQRYr4+/sPCvzoXrcf+QC5uVKfgwD53E4/Hs8/oH0xnNvohqvTJXUq8N9I8kHYPDz92IZfxppNSXuy04xwrvA9kHctv4sNizaQaw52LtOpZTxEsC9to4+6krNrt5uuCzqmXvBiHdmGmIkw26TMnm7Exekjx/noskC/eeSA8cHjgC6fgH1J+tir6jy5KafsMZWtTmMXP41tigBJ9WPKN0bZWh2LuaSlb+DSNpRaEAcnOqV2v7Wahm/iCp2NqUKs06czS9HrXQ==
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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7D7SwZjqUETnmBOXqMoJv9/QN67D45KsgNUEqbT8xk0=; b=AMhHiDFLkQ1XIgc/KI2RX6lQ54zwyhoRlDEqNOhj3N32Wgk2MTTxEJgkAqi38/HhxAn7ZaXNlNXpwg5jhO99GI6VZ7/pCSZkL5CMLyKyA9kXMWa179wuWxjtVMoYoZrFeTARmzsiPhKpSW/Gapb+sNigf/T47YRlw+z0aj7Ix7A=
Received: from HE1PR07MB4236.eurprd07.prod.outlook.com (20.176.166.145) by HE1PR07MB4298.eurprd07.prod.outlook.com (20.176.166.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.8; Thu, 25 Jul 2019 05:02:11 +0000
Received: from HE1PR07MB4236.eurprd07.prod.outlook.com ([fe80::7497:adf9:ce97:699e]) by HE1PR07MB4236.eurprd07.prod.outlook.com ([fe80::7497:adf9:ce97:699e%3]) with mapi id 15.20.2115.005; Thu, 25 Jul 2019 05:02:11 +0000
From: =?utf-8?B?QXJpIEtlcsOkbmVu?= <ari.keranen@ericsson.com>
To: core <core@ietf.org>
Thread-Topic: SenML data ct indication and string content-format values
Thread-Index: AQHVQqYduolUi6zLiEedeMvhgY2nLQ==
Date: Thu, 25 Jul 2019 05:02:11 +0000
Message-ID: <F2A7E34C-E8F9-4045-81EC-3ACAD48C449B@ericsson.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1b.0.190715
authentication-results: spf=none (sender IP is ) smtp.mailfrom=ari.keranen@ericsson.com;
x-originating-ip: [2001:67c:1232:144:214e:35ab:ae1c:9a3a]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: adff4207-fe19-47a1-abe6-08d710bd406e
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:HE1PR07MB4298;
x-ms-traffictypediagnostic: HE1PR07MB4298:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <HE1PR07MB42980BC3FF4714607959F48285C10@HE1PR07MB4298.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0109D382B0
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(199004)(189003)(53754006)(64756008)(68736007)(81166006)(66946007)(81156014)(66476007)(6916009)(5660300002)(76116006)(36756003)(6436002)(6306002)(91956017)(66556008)(966005)(25786009)(85182001)(478600001)(85202003)(2906002)(86362001)(6486002)(6512007)(7736002)(66446008)(53936002)(33656002)(14454004)(71200400001)(6116002)(71190400001)(305945005)(58126008)(2616005)(316002)(8936002)(476003)(46003)(486006)(102836004)(8676002)(99286004)(186003)(256004)(6506007)(561944003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB4298; H:HE1PR07MB4236.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: o5rd+PWVQpgSMFtcxNmtu+xHF5/XZ+pD8lYXnUWDr/+CGKvFuWHUb4RVJzYjZ1ssjbsuH3N6GwYCESF/inaezrhqrZng7wp6xuYjQHsaEsXtlJGpyWc7GyvHlMVZzhameA3sOpkuoaWa8+Yq68vLDPbxlCFrO1CEHePg/nzmysAywfPAy71QQefKAgFhoQUWMJCpAHGwnPFKXUuKPP4efHcGeqSL45R3b8XMugHYEySKjvGTOiQlk6zGbXaIHwCfzUo9lCnQhPPGUUwOtfN438aPxqRno/pZ2bgLz+DMyxC7hh1Jo6FmGnHKPRsW23ZFaXpLVOt8QLSQmQB7I7yy2OMj49nAAuNWEsxR5z9tBDdhgneJ9LmtD/B/pbkGLgd50L/8QRxV6HbqYz/ZldQvCgNE9ZhwbXp+a50p5rC9DXs=
Content-Type: text/plain; charset="utf-8"
Content-ID: <B19AC8B540BCAF4E9471BA0A6F0A073E@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: adff4207-fe19-47a1-abe6-08d710bd406e
X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 05:02:11.0763 (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: ari.keranen@ericsson.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB4298
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/cZiHHMgQAR09PrQTnRbmMoutqc8>
Subject: [core] SenML data ct indication and string content-format values
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: Thu, 25 Jul 2019 05:02:16 -0000

Hi all,

Based on the discussions this week with some of you, we are proposing a small further tweak to the SenML data value ct indication draft [1]: since allowing multiple different types of values (e.g., string and int) for a single SenML field causes problems with some high-speed data processing systems, automatic parser generators, and database schemas, it makes sense to avoid that. 

A simple way to avoid this with the "ct" field is to have both the string (content-type and -coding) and integer (CoAP content-format) IDs represented as strings. So, instead of:
"ct": 60
You would use:
"ct":"60"

While that may feel a bit weird design, it is only ~2 extra bytes of overhead (the quotes in JSON and string vs. uint in CBOR), and since this field will be in practice always compared to a small set of known values (i.e., no arithmetic operations involved), there does not seem to be much extra cost representing it as a string. I will present this proposal and the "@content-coding" syntax at the CoRE meeting on Thursday. Looking forward to your comments.


Thanks,
Ari

[1] https://tools.ietf.org/html/draft-keranen-core-senml-data-ct-02