PP8: Asynchronous change notification for HTTP-based resources

Lisa Dusseault <lisa@osafoundation.org> Fri, 18 January 2008 19:01 UTC

Return-path: <discuss-bounces@apps.ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1JFwSk-0002VV-SU; Fri, 18 Jan 2008 14:01:10 -0500
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1JFwSj-0002UN-F6 for discuss-confirm+ok@megatron.ietf.org; Fri, 18 Jan 2008 14:01:09 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JFwSj-0002Ta-54 for discuss@apps.ietf.org; Fri, 18 Jan 2008 14:01:09 -0500
Received: from laweleka.osafoundation.org ([204.152.186.98]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JFwSi-0001hH-E0 for discuss@apps.ietf.org; Fri, 18 Jan 2008 14:01:09 -0500
Received: from localhost (laweleka.osafoundation.org [127.0.0.1]) by laweleka.osafoundation.org (Postfix) with ESMTP id 8D2A71421FD for <discuss@apps.ietf.org>; Fri, 18 Jan 2008 11:01:10 -0800 (PST)
X-Virus-Scanned: by amavisd-new and clamav at osafoundation.org
Received: from laweleka.osafoundation.org ([127.0.0.1]) by localhost (laweleka.osafoundation.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SuLnScK3KqKe for <discuss@apps.ietf.org>; Fri, 18 Jan 2008 11:01:01 -0800 (PST)
Received: from [192.168.1.101] (unknown [74.95.2.169]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by laweleka.osafoundation.org (Postfix) with ESMTP id 493CF142201 for <discuss@apps.ietf.org>; Fri, 18 Jan 2008 11:01:01 -0800 (PST)
Mime-Version: 1.0 (Apple Message framework v752.3)
Content-Transfer-Encoding: 7bit
Message-Id: <C84985D1-E485-4C6B-997D-9D7DB7286F95@osafoundation.org>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
To: Apps Discuss <discuss@apps.ietf.org>
From: Lisa Dusseault <lisa@osafoundation.org>
Subject: PP8: Asynchronous change notification for HTTP-based resources
Date: Fri, 18 Jan 2008 11:00:57 -0800
X-Mailer: Apple Mail (2.752.3)
X-Spam-Score: -4.0 (----)
X-Scan-Signature: f4c2cf0bccc868e4cc88dace71fb3f44
X-BeenThere: discuss@apps.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: general discussion of application-layer protocols <discuss.apps.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=unsubscribe>
List-Post: <mailto:discuss@apps.ietf.org>
List-Help: <mailto:discuss-request@apps.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=subscribe>
Errors-To: discuss-bounces@apps.ietf.org

Asynchronous change notification for HTTP-based resources
Rohan Mahy

see also: http://svn.resiprocate.org/rep/ietf-drafts/rohan/web-notify/ 
draft-mahy-http-change-notification-via-sip-00.html


Many applications are interested in timely notification about changes
of HTTP-based resources. For example:
- appointments changing in a set of CalDAV calendars
- web-based news or blog-articles updated (the typical domain of Atom  
and RSS)
- my photo directory changing
- a subdirectory changing in a large software project's source code  
repository
- a change to the state of an Internet Draft in the tracker.

Current practices in change notification involve polling individual
HTTP resources, or polling some kind of HTTP "catalog" resource to see
what resources have changed. Both of these methods inherently suck.
The "catalog" approach at least substantially reduces the number of
resources that need to be polled, but the amount of time to wait
between polls is always one-sided compromise and rarely optimal for
response time, network usage, and battery life.

In many applications it is useful to listen for changes for whole
subtrees starting from a specific collection.  For example,
registering interest once for all photos in my "family" photo
directory or all source code for the "foo" project.  In other
applications it is useful to find out only when a small part of a
single large XML document changes.

I believe we need async notifications for these types of events.  SIP
and XMPP both have notification mechanisms (SIP Events and XMPP
PubSub, respectively). Both of these protocols are appropriate.  I
used SIP to make a concrete draft [1] because I am more familiar with
it. There is also a WebDAV-specific notification scheme described for
XMPP in [2].

In some cases details about what resources have changed needs to be
filtered for privacy reasons.  For example, assume Alice has
publicly-readable photos and photos viewable only by a handful of her
friends. If Alice adds (or deletes) a new private photo, we want to
notify those who were authorized to fetch the photo only, not everyone
who asks to be notified when Alice's photos change.  This could result
in different notifications based on who is requesting them.

We usually care about the state or status or these resources, rather
than a detailed blow-by-blow about how a resource ended up in a
particular state.  However, sometimes we may want to track a version
history for some resources.

Regardless, the native representation of an HTTP-resource could be
anything, not just files and directories in a filesystem. Changes to
these resources could be caused by non-HTTP operations (such as
modifying a database), using standard HTTP methods, or using WebDAV.