[core] Observer with Get and Fetch
Jim Schaad <ietf@augustcellars.com> Fri, 30 August 2019 19:26 UTC
Return-Path: <ietf@augustcellars.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 686521201DE for <core@ietfa.amsl.com>; Fri, 30 Aug 2019 12:26:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 JbwEl9u5clGO for <core@ietfa.amsl.com>; Fri, 30 Aug 2019 12:26:38 -0700 (PDT)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8E1AB1200F6 for <core@ietf.org>; Fri, 30 Aug 2019 12:26:37 -0700 (PDT)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 12:26:30 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: core@ietf.org
Date: Fri, 30 Aug 2019 12:26:28 -0700
Message-ID: <02b301d55f68$d3939640$7abac2c0$@augustcellars.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AdVfYv4Fj/BmtpnFT7qG/2ON4FKBVw==
Content-Language: en-us
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/uQoQ7JVL1nG7gV3CAvuMs5LXe3E>
Subject: [core] Observer with Get and Fetch
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: Fri, 30 Aug 2019 19:26:40 -0000
I have been starting to do some playing with Pub-Sub servers and in the process I ran into a question about how observe and fetch are supposed to be working together. If you observe a resource with GET, then the resource itself can make a simple decision about sending an observer notification if the same value is re-published into it. This can be done based on things like max age and its own internal state. In the case of doing an observer with a FETCH, this problem expands to be a bit larger. A resource can be updated with a different value, but if the fetch criteria is applied then there may not be a difference in the resource that would be returned beyond things like MAX-AGE and ETAG. Should the updated resource always be returned even if it does not appear to have a value change? The same rules as for a single resource can be applied if there is no change in the content of the resource. I was not able to find any good guidance in either the observe or fetch RFCs. There is a discussion about using some filtering criteria in RFC 7641 (observe), section 4.3.1 gives text that corresponds to what I said above but there is no equivalent to that text in the FETCH RFC. The state that needs to be kept for GET is small, just the last time one sent the notification relative to the max age of the current one. This is much more complicated when looking at fetch as knowing when things are going to expire may be dependent on each different set of filtering that was provided for the fetch operation. Is the best thing to do is to ignore the fact that the content would be the same and always return a notification if the content was changed? The specific thing I was looking at was doing a fetch on the "has-published-item" property of a topic on the pub-sub server which is "refreshed" every time that new content is published in the data item (or it expires). But one really only generally would only care about changes in the state. Jim
- [core] Observer with Get and Fetch Jim Schaad