Network Working Group M. Nottingham Internet-Draft June 24, 2005 Expires: December 26, 2005 Feed History: Enabling Stateful Syndication draft-nottingham-atompub-feed-history-00 Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on December 26, 2005. Copyright Notice Copyright (C) The Internet Society (2005). Abstract This document specifies mechanisms that allow feed publishers to give hints about the nature of the feed's statefulness, and a means of retrieving "missed" entries from a stateful feed. 1. Introduction RFCxxxx describes a Feed Document as 'a representation of an Atom feed, including metadata about the feed, and some or all of the entries associated with it'. Because Feed Documents usually only Nottingham Expires December 26, 2005 [Page 1] Internet-Draft Feed History June 2005 contain the last several entries in a logical feed, consuming software often keeps copies of all entries that have been previously seen, effectively keeping a history of its contents. However, not all feeds benefit from this practice; in some, old entries are not relevant to the current contents of the feed. For example, it's not desireable to keep history in this manner with a "top ten" feed; it is not desireable to show old entries, because it would imply that the previous number one is now number eleven, and so forth. Feeds that encourage this practice have a different problem. If consuming software does not poll often enough, some entries may be missed, causing them to be silently omitted. For some applications, this is a serious error on its own. Even in non-critical applications, this phenomenon can cause publishers to make Feed Documents contain more entries than reasonably necessary, just to assure that consumers have an amply large window in which to reconstruct the feed's state. This document specifies mechanisms that allow feed publishers to give hints as to the nature of the feed with regard to state, and a means of retrieving "missed" entries from a stateful feed. 2. Notational Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119], as scoped to those conformance targets. In this specification, "Feed Document" refers to an Atom Feed Document. Note that these mechanisms MAY also be used in other XML- based syndication formats, such as the various flavours of RSS. In this specification, "head section" refers to the children of the Feed Document's document-wide metadata container; e.g., the child elements of the atom:feed element in an Atom Feed Document. This specification uses XML Namespaces to uniquely identify XML element names. It uses the following namespace prefix for the indicated namespace URI; "atom": [[TBD]] "fh": [[TBD]] Nottingham Expires December 26, 2005 [Page 2] Internet-Draft Feed History June 2005 3. The Stateful Flag The stateful flag is an XML element in a Feed Document's head section whose content is either "0" or "1". Whitespace in its content MUST be ignored by processors. For example, 1 If the content of the stateful flag is "0", it indicates that the Feed Document is a complete representation of the entire feed; previous entries SHOULD NOT be considered part of the feed by consumers. For example, a feed that represents a ranking that varies over time, such as "Top Twenty Records" or "Most Popular Items" should be marked with a stateful flag of "0". If the content of the stateful flag is "1", it indicates that the Feed Document is a potentially partial representation of the entire feed; previous entries MUST be considered part of the feed by consumers. For example, a feed that represents a chronological list, such as "ExampleCo Press Releases" or "Widget Project Updates" should be marked with a stateful flag of "1". 4. The 'this' and 'prev' Link Relations A Feed Document containing a stateful flag with the content "1" SHOULD also contain an atom:link element with the relation "this", and optionally a Link element with the relation "prev", in its head section. The value of the "this" link relation's href attribute MUST be a URI indicating a permanent location that is unique to that Feed Document instance; i.e., the content obtained by dereferencing that URI SHOULD NOT change over time. This URI can be thought of as pointing to a snapshot of the feed at a particular point in time. The value of the "prev" link relation's href attribute MUST be a URI indicating the location of the previous representation of the feed; i.e., the last Feed Document's "this" URI. Nottingham Expires December 26, 2005 [Page 3] Internet-Draft Feed History June 2005 For example,