Re: [core] PubSub - Questions round 1

Michael Koster <michaeljohnkoster@gmail.com> Mon, 19 March 2018 20:11 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 C4569129C6A; Mon, 19 Mar 2018 13:11:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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_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=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 o4eJwdykOy2z; Mon, 19 Mar 2018 13:11:03 -0700 (PDT)
Received: from mail-wr0-x22c.google.com (mail-wr0-x22c.google.com [IPv6:2a00:1450:400c:c0c::22c]) (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 3A9301273E2; Mon, 19 Mar 2018 13:11:03 -0700 (PDT)
Received: by mail-wr0-x22c.google.com with SMTP id n12so19939126wra.2; Mon, 19 Mar 2018 13:11:03 -0700 (PDT)
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=rSV7b21rSqviYl+3WbrZEJtucH6xskGtvRtJikn4HC4=; b=Ue5Ju9qAuEkLD43FAsdP5c7j9smEjfNJSwtyWE+11uqUUXZQOhSi88A6Rjmh6SIbi4 n/FSIOQohSMTu1BpiabXt9Ic46dyZC0CO7ydKAXLYiPMiL/eRaqDyJzZ94TsCffZTZSt OYsCEHoZX4F+dfvjCHDl/pSe59Ga9tpaQCF6aV4z5sXdAfvC3BcyRkTfe1AenaZ1D8Dc 5oRVu/etJb/4zfpQFr/n+69xTMnz5xTRaAsY/REv1F71CMlB9upvnqqKeJ0GvDvy5rq5 lQPrjMmC137QraEwahqWNk6YRm60iTzA0wP+kPtx+gvLwUl3Awv/ZW6d71wI6WMp06QC iwfw==
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=rSV7b21rSqviYl+3WbrZEJtucH6xskGtvRtJikn4HC4=; b=DExQxR7LPykLdkiioLLegqrqIrwiJATkveNbSEj35v/swEwrCkk+cdO6QjbPgoTVrW scaHKtPC48iAU7PepTBAH6ZE9yA5jbv5/BwWW7PBB37oQiQv2Q3cAQFTL52I8wUHGpFk bAzAX3XUNl+v7zCnd1pG07Cu8zYsRnEM1jfAk0aufRPhJ5pPAL3wmbS9x9gMHelyHPz7 USb1RIl9X426d0BwNLQGX9Axn7G6fyDlfG9PRKD7AjA3c9fPJvyVHi0gAkSJ8Lw8JPuV RTvRgXkw9wr9v7isuhmIChEJgvzs/s/ZjLxNiiALtqjhvYrcLYAxQtiTOoiRaRRtD+Bw ZDdw==
X-Gm-Message-State: AElRT7ENqFhFt/9N3soXLS6M9ImsPZN1hFp75dONf1fBcSRrJZFH1jQa dqh9OVasRqb8U8Rd3I7mb3M=
X-Google-Smtp-Source: AG47ELvwF5xcdxhU7CGc6B+6/2tfg1IDCXV774NQc54ZuN/ggz5vprzm8WFJTaFVvptCHOGDOWRNFg==
X-Received: by 10.223.185.25 with SMTP id k25mr9868375wrf.237.1521490261531; Mon, 19 Mar 2018 13:11:01 -0700 (PDT)
Received: from ?IPv6:2001:67c:1232:144:cd0:6da1:8b0f:4cc5? ([2001:67c:1232:144:cd0:6da1:8b0f:4cc5]) by smtp.gmail.com with ESMTPSA id d8sm29378wrf.8.2018.03.19.13.11.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 13:11:00 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Michael Koster <michaeljohnkoster@gmail.com>
In-Reply-To: <BE629730-5AB8-4FED-AE86-A959131E86CB@ericsson.com>
Date: Mon, 19 Mar 2018 20:10:59 +0000
Cc: Jim Schaad <ietf@augustcellars.com>, "draft-ietf-core-coap-pubsub@ietf.org" <draft-ietf-core-coap-pubsub@ietf.org>, core <core@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <F26B9048-4A41-4654-9596-91E3B92B7F22@gmail.com>
References: <000001d32d0f$6ba39b80$42ead280$@augustcellars.com> <BE629730-5AB8-4FED-AE86-A959131E86CB@ericsson.com>
To: Ari Keränen <ari.keranen@ericsson.com>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/hj2hk1oHfZA8WTHPwDc5KgreKOE>
Subject: Re: [core] PubSub - Questions round 1
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
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, 19 Mar 2018 20:11:06 -0000

> On Mar 19, 2018, at 7:25 PM, Ari Keränen <ari.keranen@ericsson.com> wrote:
> 
> Hi Jim,
> 
> Here's finally answers to some of your questions.
> 
>> On 14 Sep 2017, at 7.10, Jim Schaad <ietf@augustcellars.com> wrote:
>> 
>> 1  I am not clear what the visibility of the intermediate subtopic notes
>> should be.  Should these nodes appear in the link list when doing a GET on
>> the root of the pub-sub tree?  Should these nodes appear when doing a
>> discovery on /.well-known/core?
> 
> I think the explicitly created topics should be visible in discovery. However, this includes the "main topics" created with CREATE interface. Perhaps the sub-topics under a main topic could be hidden from the root discovery since they can be discovered from the main topic.

Specifically, I would say that the "main" topics are the ones that are created using the resource labeled rt=core.ps. Sub-topics, which are created under "main" topics can in turn have sub-topics created under them, and so on. We propose that only the topics created under the core.ps resource will be returned on discovery using core.ps.discover. Any sub-topics would be discovered by using GET with an accept header option value that specifies link-format content. Each level sub-topic would need to be discovered this way, until there are no links returned indicating theat there are no more sub-topics.
> 
> But would be great to hear more opinions on this.
> 
>> 2.  I would appreciate a discussion for section 5 (resource directory) on
>> what the trade-offs for publishing items into a resource directory?  What
>> sets of nodes does it make sense to publish vs not publish - topics of
>> discussion would include intermediate nodes and max-age for nodes that might
>> disappear quickly.
> 
> I think lots of this is going to be implementation dependent. We could perhaps discuss the benefits of sub-topics: that you can expose only the main topic(s), let client discover sub-topics if needed, and this way save bandwidth on discovery is there are lots of sub-topics under different main topics. I'll make a PR out of this.
> 
>> 3.  When doing discovery, I am not sure if you examples are correct.  My
>> understanding is that since a URI path is being returned as part of the link
>> format rather than a full path, the client is supposed to interpret this
>> value using the GET path as the context of the path.   This would be rule c
>> of section 2.1 of RFC6690.  This rule seems to have been modified for the
>> /.well-known/core to say only use the scheme + authority and ignore the path
>> to the resource.  However, I do not believe that this rule is suspended in
>> this case.  This means that the return value for figure 4 would be
>> "</currentTemp>;rt=temperature;ct=50".   Do you believe that I am wrong?
> 
> I think you're correct here. But I wonder how can we generate then topics outside of the ps -- or if we want to do that. Let's discuss tomorrow.

To further discuss:

If the "currentTemp" topic was created by doing POST to the rt-core.ps resource (e.g. "/ps/") with a payload like <currentTemp>;ct=40 then the discovery will return </ps/currentTemp>;ct=40
If we wish to allow clients to create topics anywhere in the broker URI space, they can be created by doing POST to the rt-core.ps resource with a payload like </currentTemp>;ct=40 then the discovery will return </currentTemp>;ct=40
IOW, if the POSTed link contains a relative path (not starting with a slash) then the topic resource is created under the core.ps resource ("/ps/" in the example).
> 
>> 4.  Just because I don't understand.  In RFC 6690  - what is the origin for
>> rule (b)?  I would have thought this was the target URI value itself, but in
>> that case I would expect that (b) should be before (a) if it has a schema
>> and thus is an absolute path.
> 
> I suppose it's the link authority. But let's check with Zach ;)
> 
> 
> Cheers,
> Ari
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core