W3C home > Mailing lists > Public > public-wot-ig@w3.org > July 2016

Re: Stability and Current Practises

From: Carsten Bormann <cabo@tzi.org>
Date: Thu, 07 Jul 2016 08:22:59 +0200
Message-ID: <577DF543.6000409@tzi.org>
To: Christian Groves <Christian.Groves@nteczone.com>
CC: Public Web of Things IG <public-wot-ig@w3.org>
Hi Christian,

Christian Groves wrote:
> Hello,
> 
> With regards to clause
> 3.2.3.1/(http://w3c.github.io/wot/current-practices/wot-practices.html)
> and the "stability option" is there a reason ms units were chosen? The
> cache-control fields mentioned (e.g. CoAP Cache-Control and HTTP
> Max-Age) are based on seconds.

(HTTP Cache-Control and CoAP Max-Age?)

Obviously, the SI base unit of interest here is the second.
In metrology, quantities measured in seconds are usually represented as
floating point values.
Now there is some benefit from being able to express common values as
integers.  I think ms is just an arbitrary choice for a sub-multiple
unit that makes this more likely (it is also the base unit for time in
Java, which may or may not be relevant to the IoT based on which part of
the IoT you are thinking about).

> Also the value chosen for "irregular change" and "static value" seems
> opposite to what is logical. "0" usually means no change. "-1" would
> seem better to indicate something irregular (at least to me).

0 should be close in meaning to 1 ms.  Asymptotically, getting smaller
and smaller values means more frequent change.  So irregular change (no
stability at all) should be stability=0.

Static value is an infinite period of stability.  Unfortunately, there
is no common computer representation for an infinite integer, so the
objective to represent this as an integer cannot be met.  (JSON doesn't
even have Infinite as a floating point value, but that is a limitation
specific to JSON.) Since stability values never can be negative,
adopting a negative value for "static" is at least unambiguous, if not
particularly logical; in a type system such as JSON's the value "true"
would be more logical.

Grüße, Carsten
Received on Thursday, 7 July 2016 06:23:28 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 7 July 2016 06:23:29 UTC