Re: [dispatch] Proposal for Per Resource Events Protocol

worley@ariadne.com Thu, 17 August 2023 16:25 UTC

Return-Path: <worley@alum.mit.edu>
X-Original-To: dispatch@ietfa.amsl.com
Delivered-To: dispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 20314C151097 for <dispatch@ietfa.amsl.com>; Thu, 17 Aug 2023 09:25:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.992
X-Spam-Level:
X-Spam-Status: No, score=-0.992 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=comcastmailservice.net
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mUllyQjP4h3u for <dispatch@ietfa.amsl.com>; Thu, 17 Aug 2023 09:25:01 -0700 (PDT)
Received: from resqmta-c1p-023464.sys.comcast.net (resqmta-c1p-023464.sys.comcast.net [96.102.19.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A8B1BC151525 for <dispatch@ietf.org>; Thu, 17 Aug 2023 09:25:01 -0700 (PDT)
Received: from resomta-c1p-022590.sys.comcast.net ([96.102.18.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resqmta-c1p-023464.sys.comcast.net with ESMTP id WfhsqidLymOfgWfm0qQ8k6; Thu, 17 Aug 2023 16:23:00 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20211018a; t=1692289380; bh=83qwHcegin+pkfVdyO1ZrpGuET/eUtf5+r41yD9OICQ=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID:Xfinity-Spam-Result; b=kvFV4/sI9glkAo7qJm4ZFl4d5EhXIDU6qpJj6HJrFzFcdSsYwLcQd0iyDXL7kNiwD tkfJPHsx64+yR7qmlq9jPQwHeNUeZcRvWyhuFl/x8n/XZpXXBkXEt7oylHRSw73M+B tbNJDPube38sjveSUVFFEIyReRdpSSqeM+2zItHCdubcMhmIb+TTPi2D9nk8P/NJp1 UL/NO/2GbJFipKaJAtV9Ggg5KvljNcQsXI5G88T8R3iEc2rMdQTQRtBTdTbQR0O/6x 972DNjJ4ow1u6TsPIdhn829DaZqwnT9q9DPx/PaU4fgaLPqFy6z4QQU5dXvzFVbGw1 UXr2q7Puyubmg==
Received: from hobgoblin.ariadne.com ([IPv6:2601:192:4a00:430::67f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resomta-c1p-022590.sys.comcast.net with ESMTPA id WfldqEHYudUMDWfleqQmZT; Thu, 17 Aug 2023 16:22:39 +0000
Received: from hobgoblin.ariadne.com (localhost [127.0.0.1]) by hobgoblin.ariadne.com (8.16.1/8.16.1) with ESMTPS id 37HGMbR3290058 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 17 Aug 2023 12:22:37 -0400
Received: (from worley@localhost) by hobgoblin.ariadne.com (8.16.1/8.16.1/Submit) id 37HGMaZj290055; Thu, 17 Aug 2023 12:22:36 -0400
X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f
From: worley@ariadne.com
To: Michael Toomim <toomim@gmail.com>
Cc: worley@ariadne.com, dispatch@ietf.org, cxres=40protonmail.com@dmarc.ietf.org, tbray@textuality.com
In-Reply-To: <24e0d924-d087-bf7a-f74e-315f07295fd9@gmail.com> (toomim@gmail.com)
Sender: worley@ariadne.com
Date: Thu, 17 Aug 2023 12:22:36 -0400
Message-ID: <87y1i9wsdv.fsf@hobgoblin.ariadne.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/g08_BaMHBTq-QxoCsWTJWzVbdtM>
Subject: Re: [dispatch] Proposal for Per Resource Events Protocol
X-BeenThere: dispatch@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: DISPATCH Working Group Mail List <dispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dispatch>, <mailto:dispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dispatch/>
List-Post: <mailto:dispatch@ietf.org>
List-Help: <mailto:dispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dispatch>, <mailto:dispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 17 Aug 2023 16:25:06 -0000

Michael Toomim <toomim@gmail.com> writes:
>> One thing I've noticed with subscribe/notify mechanisms is that the
>> initial definition tends to be oriented toward sending "status"
>> messages, that is, each notification is the current status of the
>> resource being watched.
>
> By "status" do you mean the current "state"?

Yes.  Sorry, sloppy editing on my part.

> If my resource is a text document, do you mean sending the entire string 
> of the document each time the user types a char?

I've never seen an application that was monitoring what was conceptually
as "document" as a user would use the term.  But I do mean "this is a
change in a state, and the change is a lot smaller than the whole
state".  IIRC, that was my point "1".

>> (2) Often the desired semantics isn't to communicate current state but
>> to communicate that an (instantaneous) event has happened.

> Can you give some examples of events that you've encountered that do not 
> imply a change to the state? I usually find that events /are/ 
> communicating changes to state, even though it might not be obvious what 
> the state is.

I don't remember clearly at this point.  Back when I was working on
Microsoft's "Universal Plug and Play", it did come up that there were
things people wanted notifications about that were conceptually events,
not changes in any straightforward "state".  The specific semantics are:

- You are communicating "state" if when there are two updates "state =
  A" followed by "state = B", it is OK, if the first one is lost as long
  as the second one is delivered.  (Obviously, this doesn't work if the
  messages are deltas, but it *does* work if the second message is a
  "full" update.)

- You are communicating "events" if it is important that *each*
  notification be delivered.

Of course, you can hack it by saying the state is the cumulative list of
all events that have happened in the past, but that's not good,
especially since the "state" grows without bound.

My most recent memory is from reviewing
draft-ietf-i2nsf-nsf-monitoring-data-model-12; it's entirely about
monitoring, and two sections are "System Events" and "NSF Events".

>>> We call this format the Range Patch
>> You probably want to add an "XML" type of range specification, given the
>> amount of XML that is used to deliver state information.  (Certainly,
>> it's popular in SIP.)
>
> Yes! Definitely.
>
> XPath could be a starting point, but we'd ideally want something that 
> also allows to specify a range of children, and not just a single child. 
> It's nice to be able to say that children 4 through 10 got replaced, 
> rather than have to issue 6 separate patches, with one for each child.

My reflex was to say "Certainly, given the elaborateness of the XML
system, there must be a way to specify that!", though I know *nothing*
about XPath.  But searching delivers:
https://stackoverflow.com/questions/3354987/what-is-the-xpath-to-select-a-range-of-nodes
"What is the XPath to select a range of nodes?"  So XPath may already
have all the machinery one could want.  Probably a negative is that the
straightforward specification would require the subscriber to implement
all of XPath.

Dale