Re: [core] Review of draft-ietf-core-coap-pubsub-06

Michael Koster <michael.koster@smartthings.com> Tue, 12 March 2019 14:40 UTC

Return-Path: <michael.koster@smartthings.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 CD3D6129AA0 for <core@ietfa.amsl.com>; Tue, 12 Mar 2019 07:40:12 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 (2048-bit key) header.d=smartthings.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 ROxNV3CVjTX3 for <core@ietfa.amsl.com>; Tue, 12 Mar 2019 07:40:10 -0700 (PDT)
Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 2ABFE1275F3 for <core@ietf.org>; Tue, 12 Mar 2019 07:40:10 -0700 (PDT)
Received: by mail-pf1-x42e.google.com with SMTP id y124so988042pfy.7 for <core@ietf.org>; Tue, 12 Mar 2019 07:40:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartthings.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=DqoduwgtWKYRrFr0A+k4nZGW+dkMIj9AS9P6XxSjqTQ=; b=TbJVH13GNhccVMg6GBTbeFX2Y0939QPNzJcGSOmW4PcAf9/XEnd8e+8mh2IjUxiBYw bPPwM7cEE9Hnv41LDI8UKTJX1g0WDjulSAsUQEZm3z2AqU1rioxVAWy+tP/eb+9L2RU3 IiIEMyKQn6MjcEufR9YfduLMet6Y+W7FPyC3Qwnd84jxEgoui1i33Kh3dt87YQIF7aG8 K/Z+nC/QUfRWvAvSqMAsamdIr02kLnjzykUpnrqNOn6BQUAdss2cqfZmt2PSWkWbhjgV 0GCVpMOR4dLWhEzPhahcCEvmP/r0psRPf7bN55Lb93K1Wvmc6i9r+iWUKE7Hv+O58JI0 XsMg==
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=DqoduwgtWKYRrFr0A+k4nZGW+dkMIj9AS9P6XxSjqTQ=; b=VXUXZxVDcyWH5l3LP4QemOGoQaT7PukZz5BtjvpYtlTUGGBoc+tANtxJCrLl4vFJhF qJhrqa0Z9fn3JW1WfT5+TJRc5GtMXHb8Hs2XGJ4OKBqhL4MQBhRLTEt4zck5WvFU3j6d z3Uk1XAYfjJZfcR8KFxKz6QLWJk0sQj1jlxd00Tv0D0eDg2sEwQz16tEu644JyXq7YLU orfE93tDN897q87zDj5F/jhQtqnLp+I58s1gL5cMr2GR8NK8QtL9srXPjduI5Rwvp/29 3EcsSIG02coMGgoKgYG/b1f6KH2Z+0aQt93Yj5pQFNpTPo7a66nA/Xow/o5A0549bAt8 0y/w==
X-Gm-Message-State: APjAAAUlaS8ZIfwoCbjSdSlgMD8cJGztdieXDRtsskCs43cS6NqlevoZ BlbuGyeYab5QAt2NrDNm5uwYmQ==
X-Google-Smtp-Source: APXvYqxf836M4dt7zJxD76tUCxR+Y8TEc93OgstNT6TH0vQSG60NyVOATPkpdCs6YJinsRZosC+P5g==
X-Received: by 2002:a63:104e:: with SMTP id 14mr35168403pgq.185.1552401609264; Tue, 12 Mar 2019 07:40:09 -0700 (PDT)
Received: from [172.16.0.3] (c-71-202-145-92.hsd1.ca.comcast.net. [71.202.145.92]) by smtp.gmail.com with ESMTPSA id r82sm15093555pfa.161.2019.03.12.07.40.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Mar 2019 07:40:08 -0700 (PDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Michael Koster <michael.koster@smartthings.com>
In-Reply-To: <011001d4a87a$76f82f40$64e88dc0$@augustcellars.com>
Date: Tue, 12 Mar 2019 07:40:04 -0700
Cc: draft-ietf-core-coap-pubsub@ietf.org, core@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <355D36D4-152C-4EFC-BA5F-41B3727FBA40@smartthings.com>
References: <011001d4a87a$76f82f40$64e88dc0$@augustcellars.com>
To: Jim Schaad <ietf@augustcellars.com>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/1i_ljbOUEwlyz_Vqd7YXwsTeEII>
Subject: Re: [core] Review of draft-ietf-core-coap-pubsub-06
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: Tue, 12 Mar 2019 14:40:13 -0000

Hi Jim,

Thanks for the review! You hit a lot of the squishy bits 

Sorry for the delay in processing. 

We incorporated some items in the current draft, others we will need to discussin the WG.

> On Jan 9, 2019, at 4:21 PM, Jim Schaad <ietf@augustcellars.com> wrote:
> 
> Here is a more detailed review of this document:
> 
> 1.  Section 2 - You should update the keywords with text from RFC 8174

Did that
> 
> 2.  Section 2 - I am not sure that I would agree that a top corresponds to a
> valid CoAP URI.  I believe that this is really a CoAP URI-Path as the same
> topic could appear on different brokers or under different schemes.   The
> scheme/URI-host would appear to be the broker and not the topic.  This is
> re-enforced by the topic in section 3.4
> 
Fixed

> 3. Section 3.5 - I think that the brokerless in the title should be
> capitalized.
> 
Did that

> 4. Section 3.5 - I understand the use case for having a broker version of
> this protocol.  I am not clear why the brokerless version is useful.  It
> might be a good idea to include a description of where this would be used as
> opposed to normal CoAP functionality.
> 
Added some use case notes

> 5.  Section 4.1 - Should there be a resource type of 'core.ps.topic' to
> distinguish between resources which are supported by the server directly and
> those which are pub/sub topics.  This would complete the 'core.ps',
> 'core.ps.discover' set of resource types.  Specifically I am trying to map
> the different operations to the different resource types.
> 
See below in the discussion on ps and discover. I think tagging all topics with core.ps may be OK if they support topic creation, otherwise core.ps.topic may also be needed.

> 6. Section 4.1 - The definition of 'ps' implies that topics can be rooted at
> / rather than at /ps.  While I don't have a problem with this I think that
> by saying that it 'ps' is optional seems to be slightly odd.  It would make
> more sense to me to say that '{ps}' is not optional but can be the
> equivalent of '/.' The assumption in this case is that what would be
> returned by .w-k/core would be '</>;rt=core.ps;ct=40' rather than '<>' as
> the refpath.  
> 
Yes, that's what we want. We probably misunderstand URI template syntax. I think we confuse "ps" as a template variable vs. "ps" as a path segment string.
Are there any specific suggestions for how we could reorganize this? 

> 7. Section 4.1 - I am not completely clear on this.  Is DISCOVERY only
> supported by rt=coap.ps.discovery or is it also supported by rt=coap.ps?  

Support for discovery is optional, and indicated by including rt=coap.ps.discovery in the link that describes the "ps" resource.
If the link for the resource has only coap.ps then it is not expected to support discovery. 

The target attributes describe a service entry point. In the case of the pub/sub service and pub/sub topic discovery, we allow the broker to provide the functionality at every topic. More on this in the next comment.

> 8. Section 4.1 - Is discovery only permitted to find those resources which
> are subordinate to it for rt=coap.ps.discovery or can it search all topics
> published in the PS?
> 
The intention is for discovery to list all the topics that are sub-topics of the resource pointed to by the URI of the discovery request. We leave it open whether the server recursively descends, but on further thought we may need to say one way or the other. Maybe just the topics tagged with core.ps.discovery would be recursively listed (see next)

If you do discovery from the root resource ("ps" for example) you get a link-format listing of all topics. If you do discovery at some topic, you get a link-format listing of the subtopics of the target topic.

Perhaps we should explicitly require each topic and sub-topic link to include rt=core.ps (supports topic creation) and optionally core.ps.discovery (if the topic supportssub- topic discovery). If a link has neither, then it points to the content. This is also a way we could support link-format as content. If there are topics that don't support sub-topic creation, then we may also need something like core.ps.topic

Note all topics are technically sub-topics, at least of the "ps" entry point resource.

> 9.  Section 4.1 - Is there a policy of some type about what topics are and
> are not visible under .w-k/core?  I was planning to hide all of them and
> only expose them via the /ps resource.  This seems to be contra-indicated by
> the example in figure 5 but is similar to what happens in RD.
> 
It is intended to be entirely application-dependent which topics have links in well-known/core. Usually it would be only the ps entry point but we didn't want to restrict what may be included in w-k/core or how it must be organized.

> 10.  Section 4.2/3  You should think about what happens if I use a multipart
> content for publishing.  This would allow for publishing multiple content
> types at the same time which might be an interesting feature.  This allows
> for multiple content types w/o the broker having to do the content
> conversions.
> 
I think pub/sub will work with multipart content format as long as the broker can treat the published payloads as opaque. What are some potential issues?

> 11. Section 4.3 - Am I correct in assuming that max-age defaults to 60
> seconds for a publish operation?  There is a different default value
> specified for CREATE but not here.  Another possible default value would
> have been the topic lifetime.
> 
We thought we had a simple solution to lifetime in the last hallway call, but there are a number of issues. Mostly, Max-Age is for responses and we should come up with a different way to transmit data lifetime for push operations. Currently thinking a URI parameter in the query options would be appropriate, some version of "lt".

We also think there is a good case for separate handling of topic expiration and data expiration. Topic expiration should send 4.04 responses to observers and readers, and data ageing should be handled via Max-Age in notifications. We didn't get the design finished before the draft deadline, also it seems like we should have a WG discussion on the proposal. I will write up a github issue and we can go from there.

> 12. Section 5 - I think you need to re-write the text dealing with con as
> this does not appear to be in the RD any more.
> 
Con as in CON/NON? We do have a bit where we say that a READ or SUBSCRIBE maybe ack'ed and queued waiting for first publish.