Re: [core] draft-groves-core-dynlink-02

Michael Koster <michaeljohnkoster@gmail.com> Mon, 27 February 2017 15:25 UTC

Return-Path: <michaeljohnkoster@gmail.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 8688712A122 for <core@ietfa.amsl.com>; Mon, 27 Feb 2017 07:25:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-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 lQKmS1oF1t7t for <core@ietfa.amsl.com>; Mon, 27 Feb 2017 07:25:29 -0800 (PST)
Received: from mail-yw0-x232.google.com (mail-yw0-x232.google.com [IPv6:2607:f8b0:4002:c05::232]) (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 0DF8212A0F0 for <core@ietf.org>; Mon, 27 Feb 2017 07:25:29 -0800 (PST)
Received: by mail-yw0-x232.google.com with SMTP id p77so38480121ywg.1 for <core@ietf.org>; Mon, 27 Feb 2017 07:25:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Rii52XQtck0mUVrlGdYLpmM87tOWk5TTCsMx2yuP9dM=; b=qJlO+pYct4qHlIaKC+owp9UFGu3cBvf0uy463zq42tFkyynJTKgvQqk5KFoV0KDnSP BvhEFhFw1Mp//xN/ifExgYV5Zj5qG/vn3M+x0ZL5dqalzRmysbABUyv2hcvnRmRy5BbM Zlvi08CLsTq6t7S+Yb2jgpWirTsch2XiBDzei+2wvi5QSIYL5XkXl7M8mGw1GT5diYYe sWXu6HMUoDadq5YGw7CFswNDLJBewm9JlWdR3Mf66oyrrlgPdNSrmsR/u34ipUVUu4Gd uTESV4ezWBZ1gEiDbKcFjvb/19brzB1e7ClyZLL0jUpLiG3KupLAQLc6saW+SbdNq7cR EG/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Rii52XQtck0mUVrlGdYLpmM87tOWk5TTCsMx2yuP9dM=; b=AMgqOSXLGazQ/zppNKjmbZh5sJf87r4dKkk8U+/hjFoIznWYw6mtlBEv4KkRyNfEIK WTC5owPWBOfBjGY9xcCxJDqK3ioo949fTxTAweJ7eoUaoyJASD/XzUENg7dUoQMjrT2L 1jT/x3ndD5uaCsYuESQOKk0ATcWUD4cgJ1hgt5CYB/58asj28x5A+BJYQCGB8EaROUwd Qe5n/leSPkEcxxF+MGv/EEE6MopLzOWC436GEqU5wXMZL6sbQ2YzPD+xbM91MYwWmblE Y11aR8BsJeJgsonWEKAQKAgHgBvJBfPh3X2xmk1+sCjVP7ePwHCHw0DXnncGNwb7a8yv LrRg==
X-Gm-Message-State: AMke39n2eS5T5M+/VI1xmEBkw6tFbXsXR2ltHK39HGjUyitjgHePRgxOE71xB+BTRTVp3A==
X-Received: by 10.13.217.129 with SMTP id b123mr13241165ywe.81.1488209128026; Mon, 27 Feb 2017 07:25:28 -0800 (PST)
Received: from [10.0.0.11] (108-201-184-41.lightspeed.sntcca.sbcglobal.net. [108.201.184.41]) by smtp.gmail.com with ESMTPSA id p62sm6929592ywb.2.2017.02.27.07.25.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Feb 2017 07:25:27 -0800 (PST)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
From: Michael Koster <michaeljohnkoster@gmail.com>
In-Reply-To: <0d67976c-c566-ae89-cdcc-ed0828abe3d6@gmail.com>
Date: Mon, 27 Feb 2017 07:25:24 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <58FEF934-CB65-4229-919F-508DE261EA1D@gmail.com>
References: <AAC41ACC-476B-4D5E-83C1-1D76D45ACF70@gmail.com> <0d67976c-c566-ae89-cdcc-ed0828abe3d6@gmail.com>
To: Christian Groves <cngroves.std@gmail.com>
X-Mailer: Apple Mail (2.2104)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/V_pVZ6NwCM_2mEj0s4rKAYEOSMQ>
Cc: "core@ietf.org WG" <core@ietf.org>
Subject: Re: [core] draft-groves-core-dynlink-02
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
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: Mon, 27 Feb 2017 15:25:30 -0000

Hi,

Clarifications below.

Michael

> On Feb 26, 2017, at 11:21 PM, Christian Groves <cngroves.std@gmail.com> wrote:
> 
> Hello Michael,
> 
> Thanks for the comments. Please see below.
> 
> Regards, Christian
> 
> 
> On 26/02/2017 7:16 AM, Michael Koster wrote:
>> Hi Christian,
>> 
>> I have been thinking about the use case that we exposed in OCF recently, integrating pubsub and other cloud services into a system of existing server-based sensors. Currently there is no well defined way to get a sensor device to push changes to a broker or to get an actuator device to subscribe to a topic on a broker. Likewise, there is on way to instruct the broker to observe a resource on a sensor, or to instruct a broker to update an actuator when a topic is published to on the broker.
>> 
>> A binding table, on the devices or on the broker, or both, is a good solution for this and enables the system-wide state update relationships to be maintained in a visible, manageable way.
>> 
>> I have a couple of comments on the current draft.
>> 
>> 1. Why don't we use a resource type for the binding table? Its methods and responses conform to a generic link list interface, but the content and side effects are specialized to bindings. I thought we earlier had used rt=core.bnd as a resource type to identify the binding table.
> [CNG] I had a look through all the previous drafts (including the Shelby ones) and didn't see any examples of rt=core.bnd . Core.bnd is only used in the context of a interface description. Can you recall where it may have been used?
> However I can't see why we couldn't formally define a rt=core.bnd . The draft is pretty clear that a binding table is a resource.

[MJK] Yes, I am proposing that the binding table use the core.ll interface, which is basically a collection resource that exposes core link-format. It can be identified as a binding table by using rt=core.bnd as a resource type, rather than a special interface type. I had intended to make this change when I made core.ll support create, update, and delete operations.

>> 
>> 2. We could make the example explicitly name the href of the sensor "switch" and the actuator "light" to help illustrate the directional pattern of observe the link target and update the link context:
>> 
>>    <coap://sensor.example.com/s/switch>;rel="boundto";anchor="/a/light";bind="obs";pmin="10";pmax="60"
> 
> [CNG] OK that makes sense.
>> 3. I think we will need to register the new link attribute names with IANA: "pmin", "pmax", "lth", "gth", "stp", "bind"
> [CNG] I agree so that we avoid the problem of query parameter overloading. I think its part of a larger issue. E.g. sect.12.4/draft-ietf-core-resource-directory-09 proposes a new CoAP RD specific registry for query parameters. Should the query parameter registry be something specific or general for CoAP?
> 
[MJK] If we want to avoid conflicts, there will need to be some coordination across the document-specific registries. Why not use the IANA CoRE Parameters Registry or some evolution thereof?
>> 
>> 4. Speaking of attributes, I don't think "bind" is strictly needed to identify whether to push or pull; that is implied by whether the anchor and href are local or remote. I can conceive of a case where the binding both observes and pushes:
>> 
>>    <coap://example.com/pubsub/switch>;rel="boundto";anchor="coap://example.com/pubsub/light";pmin="10";pmax="60"
>> 
>> We may instead want to identify what operations are used for both source (link target/href) and destination (link context/anchor), perhaps change it to the explicit: src=obs; dst=push with default being observe used on the source and update (push) used on the target.
> [CNG] Would introducing two attributes instead make it more complicated? Effectively we're just representing what is expressed by a single code point into 2 code points. Couldn't you cover the above use case by having two table entries?
> 
[MJK] I think two attributes are necessary to support the case where both links point to resources under a different netloc, where there is no RESThook or other back channel access method to the resource. The source link will use polling or observe, and the destination link will use push. I also see a use case for defining, in the push binding, whether to use PUT or POST. 

[MJK] Even for the case where the source link is local, there is still a choice of polling vs. reacting to resource state changes. Periodic polling is often required to run some algorithms like PID controllers.

[MJK] I think it can be easily explained using a table listing the cases for local vs. remote and source vs. destination addresses and what the options are.