Re: [dispatch] Proposal for Per Resource Events Protocol

Michael Toomim <toomim@gmail.com> Thu, 17 August 2023 06:26 UTC

Return-Path: <toomim@gmail.com>
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 20363C14CF0D for <dispatch@ietfa.amsl.com>; Wed, 16 Aug 2023 23:26:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.198
X-Spam-Level:
X-Spam-Status: No, score=-7.198 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.091, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 CTcrXWlvc5Dn for <dispatch@ietfa.amsl.com>; Wed, 16 Aug 2023 23:26:36 -0700 (PDT)
Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D6CCBC14CF1F for <dispatch@ietf.org>; Wed, 16 Aug 2023 23:26:31 -0700 (PDT)
Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-688769faa09so1744642b3a.2 for <dispatch@ietf.org>; Wed, 16 Aug 2023 23:26:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692253591; x=1692858391; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=uEQPMVaTpkCBEjH/p9cUECHAenGGKSXwzjpFGr21V00=; b=jhjtqAIvg0qLYUJaViyBn2DepJS1DoDJ9lNENPel3DNvkEJ5yk0NifbF5qmyR9Bnye 1oxZfowBSXkjS9Lgpd/YY2VjlKWATgRXqnCP5Tkx0IubivxZZLBrbdCST+lvcX8VfC9F SkkbxFq5v9uxwVEGpJr5vMcAqLYAnzyY3UpInl+v72t3EFMyvSAK2phOP6fGH/zyQAOl JLDbrHfTm2o3PdB8jZAqBzlNKWUuEYN94+MV+2PhhbOatTzt7bE/N9jYMLy8c5lifJ2p wcT58FzeQDU5vBteNhJquKVtVbumvmVjUUIbTHbuOWw391DDGatEcK6rqi/YikeN5y5g PdxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692253591; x=1692858391; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=uEQPMVaTpkCBEjH/p9cUECHAenGGKSXwzjpFGr21V00=; b=YaUjymUeTD2uR+uuNqyuVeJKdghk2pjSG/i9/Kn7l8It3SG3W+YJs9z8snb4IgTr4Y o+RBsu0s4ne2C4vmVAQdoQELz9IwTE1NnS8I/OM3JLweog11A2qWTWpeBQ9u5oOJVNpX oS3eB8Dwuvf6XSckprJPe0Fl5RlF8cRnKDO5F/laq3Qt84i79fqAdlTW/g4wSh6E6Zkv B42to3uHRTjv2QjtHHr5kiThLILln0X8jaZgn4aXm3bDIUVwKyH02eJt36Nseps/tumT j4/16Pr+Po4v5Asf8hWcDpxzwXgAWe1Oflkj2lm43DRotor6JFbNeT9CAjPBiXdsTeyB pgSg==
X-Gm-Message-State: AOJu0YzezDWqWilG5Leek+XqKxT7cnVURoAnS4hanMEHdk/3WPnH4XAW Y1m9gBugwl9rYeuUuEkD+Vs=
X-Google-Smtp-Source: AGHT+IGh5w2gFHNkD7R4eP3JNFkqbh474bjad97wOuA11IonLGL/knYxa6qrCeLQL/4RxPQQz+y+Hg==
X-Received: by 2002:a05:6a20:729d:b0:13d:ee19:771f with SMTP id o29-20020a056a20729d00b0013dee19771fmr5453214pzk.8.1692253590952; Wed, 16 Aug 2023 23:26:30 -0700 (PDT)
Received: from [192.168.1.152] ([201.139.235.38]) by smtp.gmail.com with ESMTPSA id n4-20020a170903110400b001bba373919bsm14191348plh.261.2023.08.16.23.26.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Aug 2023 23:26:29 -0700 (PDT)
Content-Type: multipart/alternative; boundary="------------65BBkY51ygn4O0P35BhMZxPB"
Message-ID: <24e0d924-d087-bf7a-f74e-315f07295fd9@gmail.com>
Date: Wed, 16 Aug 2023 23:26:04 -0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0
Content-Language: en-US
To: "Dale R. Worley" <worley@ariadne.com>, dispatch@ietf.org
Cc: Rahul Gupta <cxres=40protonmail.com@dmarc.ietf.org>, Tim Bray <tbray@textuality.com>
References: <87msyqhkt0.fsf@hobgoblin.ariadne.com>
From: Michael Toomim <toomim@gmail.com>
In-Reply-To: <87msyqhkt0.fsf@hobgoblin.ariadne.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/ZqrJtE01HbpSZ_DVHrZh7BvsSKc>
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 06:26:41 -0000

Dale:
>> Now that you make me think of it, using SIP's SUBSCRIBE/NOTIFY mechanism
>> (RFC 3265) for notifications might be a good solution.  ...
> I started looking into this and discovered that we already have such a
> mechanism:
>
> 5989 A SIP Event Package for Subscribing to Changes to an HTTP Resource.
>       A.B. Roach. October 2010. (Format: TXT, HTML) (Status: PROPOSED
>       STANDARD) (DOI: 10.17487/RFC5989)

These are excellent finds!

Thank you, Dale. I've been making a list of RFCs doing state 
synchronization, so that we can generalize them into a single 
interoperable protocol. This is quite helpful to discover!

And now just a couple questions:

Dale:

> 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"?

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

> (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.
>> 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.