Re: [T2TRG] [Asdf] [One Data Model Group] Representation issues and protocol bindings

David Kemp <dk190a@gmail.com> Mon, 31 August 2020 16:31 UTC

Return-Path: <dk190a@gmail.com>
X-Original-To: t2trg@ietfa.amsl.com
Delivered-To: t2trg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8E0E23A1753 for <t2trg@ietfa.amsl.com>; Mon, 31 Aug 2020 09:31:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 S08DQrfZElM0 for <t2trg@ietfa.amsl.com>; Mon, 31 Aug 2020 09:31:13 -0700 (PDT)
Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD6693A0B8C for <t2trg@irtf.org>; Mon, 31 Aug 2020 09:31:13 -0700 (PDT)
Received: by mail-oi1-x22f.google.com with SMTP id z22so1485526oid.1 for <t2trg@irtf.org>; Mon, 31 Aug 2020 09:31:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=8wguxWJBOaJoc9Lce25fGH8dHQ+DwDxfZQWkpUk3/9w=; b=Vh27y1Orf8ksPXEzcjqjIgZaljZ1z+u3HjqvPCvRdx34TrfFzbo/BAIpc9Kxlb6EZK DxpaLS5wB9n7rS8JLY3KpjZWlLOQ5RuF3/ltwQML+uDDrMQe4x3zQZwKXYqo4pW7qJhq 67PDU0cbETVkMowTQT5FEex4t5Uwl5+nzH0MaWpBLUgVg6JZd5YNlFHup0a7Tgf4j9WX RxXPg/h5YmC0xVxvteJrWs6nm+Xrh8UVLYRh8JbWfAQsTHHheRiw++MQHyEcZRyKFGbt FglJZthSSpU+Ef+khgkmFZKSQBaXfsGbIJ0pTB81UNnOtnQjnyVh320aCBsYoA7MmBBl wLKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=8wguxWJBOaJoc9Lce25fGH8dHQ+DwDxfZQWkpUk3/9w=; b=YBzH8YCShak8VPIkt4sTUjlxjiizLo7Aq0g46ADhSWnAjDfHpQN2ipNhMZBVeNwHqH EYy/TkIhi2KViBYj2B1IwVsjY7/Fi5Wy683H/1FX8QaU/3jqbwMBfYDLxxsYSS4geL+q 4bR9HrXBBxx9ba4zLp2uAuLqt0v9HZDrg00dyNbbjYVL8Ov5oN4qsXt1wqbGxbB5PW7c ULxFAixmdw0UoyFQgaCogg0uDFH0VBzbuvXwjylLizlZ1T9kym63t+jwfIYvWzKD/AWW dSDArLFGtb7s/U3o8oz4qxqfeT5I4TyhWsjhtc/fup1NEaXOHG/u0QJikpV9kyO6jCpi b6EA==
X-Gm-Message-State: AOAM530UZkkC0kuCyrtMd8Hf0XOWRUeYu2PPg16EpjXcTj8pRutC1IdW 76XmUh7W8C2QL5coFCioc1bX8KSSNnPGXYjjnlQRZE36EKM=
X-Google-Smtp-Source: ABdhPJxG1HRiUIK5PDhr3SrKAdTf+VyPT+sBnb+ujZjfXGE/9kKuVa6EsG7WBHQomoFEDUz/VyIAFNWmjPWPYP8wV6g=
X-Received: by 2002:aca:52d6:: with SMTP id g205mr140900oib.54.1598891472878; Mon, 31 Aug 2020 09:31:12 -0700 (PDT)
MIME-Version: 1.0
References: <2ED86F4F-2926-4FBB-91A7-39F32FE7A970@tzi.org> <MWHPR11MB1838A7BB2F9D868DBF59B962D2510@MWHPR11MB1838.namprd11.prod.outlook.com> <BYAPR18MB2536E401A07C0F5DFF3376B6CE510@BYAPR18MB2536.namprd18.prod.outlook.com>
In-Reply-To: <BYAPR18MB2536E401A07C0F5DFF3376B6CE510@BYAPR18MB2536.namprd18.prod.outlook.com>
From: David Kemp <dk190a@gmail.com>
Date: Mon, 31 Aug 2020 12:31:01 -0400
Message-ID: <CAE5tNmoYSNPjndwo12O+RE+BdYG2bpadM1L6fAb+KKgairxkcw@mail.gmail.com>
To: "asdf@ietf.org" <asdf@ietf.org>, One Data Model Group <onedm@iotliaison.org>, "t2trg@irtf.org" <t2trg@irtf.org>
Content-Type: multipart/alternative; boundary="0000000000004682a305ae2eee57"
Archived-At: <https://mailarchive.ietf.org/arch/msg/t2trg/3k21AWD_Uai0jU90gPI5IuL5ek0>
Subject: Re: [T2TRG] [Asdf] [One Data Model Group] Representation issues and protocol bindings
X-BeenThere: t2trg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IRTF Thing-to-Thing Research Group <t2trg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/t2trg>, <mailto:t2trg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/t2trg/>
List-Post: <mailto:t2trg@irtf.org>
List-Help: <mailto:t2trg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/t2trg>, <mailto:t2trg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 31 Aug 2020 16:31:16 -0000

For the 80% case (e.g. temperature), a non-solution is to use an attribute
called "temperature".  Every device that deals with temperature must
understand standard units of temperature, which should be communicated
using attribute names like "kelvins", "degrees_f", or "degrees_c".  The
data format could (should?) be standardized as float, which doesn't make a
difference in JSON but does in CBOR.  What if you want to design a device
that uses int8 between 0 and 100 to represent -40C to 200C?  Then you're
not in the 80% any more.

The other 20% should be addressed using the same principle: "brightness" is
a useless property name, "lumens" is better in that it specifies a
measurable value, but has the disadvantage that it is absolute, not
relative to the capacity of the device.  A relative attribute would at
least need to specify the gamma of the control function.

Time could be defined similarly, specifying units (e.g., nanoseconds,
milliseconds, seconds) of resolution for intervals and an epoch for
date-times.  Or for the simple 80% a cumbersome but generally-understood
RFC 3339 string could be used, hopefully using an "rfc3339-date-time"
attribute, not "date-time".

The general principle is that standard units need to be defined in the
first place, and then attribute names should refer to the standard, not a
unitless name of a feature.

Dave


On Mon, Aug 31, 2020 at 11:22 AM Milan Milenkovic <milan@iotsense.com>
wrote:

> For your example, I was going to suggest the range fraction or % solution
> but Wouter beat me to it.
>
> More importantly, I think we should be pragmatic and aim for the 80%
> solution (which, according to the Pareto principle, may require definition
> of only 20% of use cases ;-).  IMO, luminosity ad brightness are examples
> of a relatively skewed minor use case in a specific domain that is
> consuming disproportionate amounts of time and effort to address and that
> complicates many a solution for what is at best a small benefit.  Such
> things can be tabled, and possibly revisited later, to allow progress on
> solutions for the most common use cases.
>
> -----Original Message-----
> From: ASDF <asdf-bounces@ietf.org> On Behalf Of Carsten Bormann
>
> In today’s OneDM call, Bruce Nordman brought up the issue that, in the
> end, we’ll need concrete representations to talk to devices and use their
> data.
>
> So if we have one ecosystem that uses 0..100 for describing the brightness
> setting for a lamp, another one that uses 0..254 (where 255 means something
> complete different), and a third with 0..65535, what do we do?  (And these
> might also differ whether they describe a emitted light power level or a
> perceptive luminous flux level.)
>
> The underlying problem is that we are abusing data model level description
> techniques (in part borrowed from json-schema.org) to describe
> information models.
> That works reasonably well until we start taking these data model level
> descriptions at face value.  The fact that some converged model uses a
> scale based on the L component of Lu’v’ does not mean that everybody has to
> represent their ecosystem model the same way.
>