Re: [core] duration type comments

Carsten Bormann <cabo@tzi.org> Thu, 26 August 2010 13:09 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@core3.amsl.com
Delivered-To: core@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C24243A6982 for <core@core3.amsl.com>; Thu, 26 Aug 2010 06:09:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.05
X-Spam-Level:
X-Spam-Status: No, score=-106.05 tagged_above=-999 required=5 tests=[AWL=0.199, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GZLjlQcNnRkO for <core@core3.amsl.com>; Thu, 26 Aug 2010 06:09:39 -0700 (PDT)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9:209:3dff:fe00:7136]) by core3.amsl.com (Postfix) with ESMTP id 2939D3A683A for <core@ietf.org>; Thu, 26 Aug 2010 06:09:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.3/8.14.3) with ESMTP id o7QD9xZw011091; Thu, 26 Aug 2010 15:10:04 +0200 (CEST)
Received: from [192.168.217.101] (p5489F9F2.dip.t-dialin.net [84.137.249.242]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id BF606680E; Thu, 26 Aug 2010 15:09:58 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Content-Type: text/plain; charset="us-ascii"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <AANLkTikRBCU8NiFgLiK3FWRW0Nkm1-sZQa+Con4saQuy@mail.gmail.com>
Date: Thu, 26 Aug 2010 15:09:57 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <4103345C-420F-49CE-9E1A-E0F6272ABD60@tzi.org>
References: <AANLkTikRBCU8NiFgLiK3FWRW0Nkm1-sZQa+Con4saQuy@mail.gmail.com>
To: Peter Bigot <pab@peoplepowerco.com>
X-Mailer: Apple Mail (2.1081)
Cc: core <core@ietf.org>
Subject: Re: [core] duration type comments
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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, 26 Aug 2010 13:09:40 -0000

On Aug 26, 2010, at 13:23, Peter Bigot wrote:

> Rather than spend a lot of time on this one:
> 
> 1. It is suggested that many options require a duration.  I could find only two: subscription-lifetime and max-age.  Before determining the encoding, the characteristics of these durations should be reviewed.  I suspect virtually every use of subscription-lifetime will be either "forever" or "stop".  What range of durations are reasonably expected for Max-Age for resources that reflect measurements of real-world data?

I don't have a scientifically grounded answer for that, but various discussions I have had so far indicate that 1 second to a couple of months is about the right range.

> 2. While we could select an encoding that supports only those durations we're thinking about now, I would prefer one that could handle other natural uses of duration, like "how long until a scheduled event".  For that use, a set of representable values that is not closed under subtraction is unsuitable.

It is always hard to design for unknown future requirements.
The duration type was indeed meant for soft-state/lifetime-like durations, not for anything approaching precise timing (there is no consideration of clock skew or leap seconds, for instance).

> 3. A detailed description of the subscription-lifetime option encoding in variable-length-integer format takes one third of a page in draft-hartke-coap-observe-02.  The pseudo-FP approach takes three pages to motivate and describe, plus five pages to list its values.  It's a nice solution, but any claim that this decreases complexity relative to variable-length-integer is indefensible.

This is a deliberately unfair statement.
I wrote expansive text, erring on the side of redundancy, when I noticed not every implementer has the CS background about number representations I would have expected.
A description of binary numbers at this level of detail would be about as long.
The actual description is five lines of C, four of which are constant definitions.

The reduced complexity comes from the reduced variability in length, not from a shorter description.
But maybe I'm the only one who sees that advantage.

> 4. I'm not going to bother to implement this right now to see how much space it takes, but if we continue to create novel encodings that require, for example, three times as much ROM as a comparable straightforward encoding, CoAP will be unimplementable on the very devices where it's most needed.

The implementation is in the draft.

I think the meta-observation here is that the technical advantages or disadvantages are mostly irrelevant where people are significantly more familiar with one way of doing things than with another way.  I do think that is an important consideration in protocol design.  I just wasn't prepared for such a reaction in this case.  (This is not about you, others had the same reaction.)  I'm willing to learn.

Gruesse, Carsten