Network Working Group M. Lonnfors Request for Comments: 5262 Nokia Category: Standards Track E. Leppanen Individual H. Khartabil Ericsson Australia J. Urpalainen Nokia September 2008
Presence Information Data Format (PIDF) Extension for Partial Presence
Status of This Memo
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
The Presence Information Document Format (PIDF) specifies the baseline XML-based format for describing presence information. One of the characteristics of the PIDF is that the document always needs to carry all presence information available for the presentity. In some environments where low bandwidth and high latency links can exist, it is often beneficial to limit the amount of transported information over the network. This document introduces a new MIME type that enables transporting of either only the changed parts or the full PIDF-based presence information.
The Presence Information Document Format (PIDF) [RFC3863] specifies the baseline XML-based format for describing presence information. One of the characteristics of the PIDF is that the document always needs to carry all presence information available for the presentity. In some environments where low bandwidth and high latency links can exist, it is often beneficial to limit the amount of transported information over the network.
This document introduces a new MIME-Type 'application/pidf-diff+xml', which enables transporting of either only the changed parts or the full PIDF based presence information. The root element of the document distinguishes whether the partial or full PIDF document content was transported.
Note: With this new MIME-Type, applications can easily negotiate the support of partial updates of presence by using the Accept header. If PIDF had initially been designed for partial updates, a new separate MIME-Type would have been unnecessary.
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 RFC 2119 [RFC2119] and indicate requirement levels for compliant implementations.
This memo makes use of the vocabulary defined in RFC 2778 [RFC2778]. In addition, the following terms are defined:
Full presence document: A presence document that contains all the presentity's presence information that is available to a particular watcher.
Partial presence document: A presence document that represents a fragment of the full presence document. A partial presence document can only be understood in the context of the full presence document, i.e., a partial presence document modifies a cached copy of the full presence document.
The MIME type 'application/pidf-diff+xml' defines the new content type for partial PIDF documents.
The XML Schema imports the PIDF [RFC3863] schema so that the full PIDF document content with the addition of a 'version' attribute can be transported. The root element of the document is then <pidf-full>, and the 'version' attribute information can be included within it. Otherwise, the content of <pidf-full> element is exactly the same as what would have been if 'application/pidf+xml' content type had been used. Although the XML Schema also allows using <presence> as the document root element, it is disallowed from applications utilizing this document format.
When only the changes of the presence document are transported, the model described in XML patch operations [RFC5261] is used. The root element of the document is then <pidf-diff>. The patch operation elements: <add>, <remove>, and <replace> allow changing the partial content of the cached local copy of the full presence document. The <add> element is used to add new content, the <replace> element updates, and the <remove> element removes existing content.
The optional 'version' attribute within the two possible document root elements contains a sequence number which is incremented by one between subsequent document updates, i.e., a more recent document update has a higher 'version' value than the previous one. This number can be used to ensure consistent updates as the recipient of
Lonnfors, et al. Standards Track [Page 3]
RFC 5262 Partial PIDF September 2008
the document can use the 'version' number to properly order received documents and to ensure that updates have not been lost. The usage of this attribute thus allows "state delta" processing described in [RFC3265]. Partial notification [RFC5263] uses a similar model. This number increments independently regardless of whether the <pidf-full> or the <pidf-diff> content is transported. In other words, a single version counter is maintained across <pidf-full> and <pidf-diff> documents.
Implementations using this document format MUST follow guidelines specified in the PIDF [RFC3863] and PIDF extension formats, for example, DataModel [RFC4479], Rich Presence Information Data (RPID) [RFC4480], and Contact Information in PIDF (CIPID) [RFC4482] MUST support the usage of the XML schema data type ID [W3C.REC-xmlschema-2-20041028] of these listed RFCs. Specifically, the XML document MUST be well formed and SHOULD be valid. This specification makes use of XML namespaces for identifying presence documents and document fragments. The namespace URI for elements defined by this specification is a URN [RFC2141], using the namespace identifier 'ietf' specified in RFC 2648 [RFC2648] and extended by RFC 3688 [RFC3688]. This URN is:
Every presence document compliant with this specification MAY contain an 'entity' attribute within the <pidf-diff> element. Its content, a presentity URI, MUST then be the same as the 'entity' attribute value of the <presence> element described in [RFC3863]. The usage of this presentity URI is described in more detail in Section 3.1 of [RFC4479].
The partial presence document SHOULD only contain those elements or attributes that have changed. However, when there are a lot of changes, the full presence document content can then be transported instead.
Optional parameters: Same as charset parameter of application/xml as specified in RFC 3023 [RFC3023]. Default value is UTF-8.
Encoding considerations: Same as encoding considerations of application/xml as specified in RFC 3023 [RFC3023].
Security considerations: See Section 10 of RFC 3023 [RFC3023]. This content type is designed to carry presence data, which may be considered private information. Appropriate precautions should be adopted to limit disclosure of this information.
<p:add sel="presence/note" pos="before"> <tuple id="ert4773"> <status> <basic>open</basic> </status> <contact priority="0.4">mailto:firstname.lastname@example.org</contact> <note xml:lang="en">This is a new tuple inserted between the last tuple and person element</note> </tuple> </p:add>
The XML schema for the 'application/pidf-diff+xml' data format. The included schema "urn:ietf:params:xml:schema:xml-patch-ops" is defined in [RFC5261], and the PIDF Schema "pidf.xsd" is imported from [RFC3863].
Systems compliant with Common Profile for Presence (CPP) [RFC3859] will not be by default able to use this specification. However, this will not cause any interoperability problems because all endpoints and gateways must support the default MIME type (application/pidf+xml) regardless of if they support this specification. Thus, if a gateway or another end point does not understand this specification it will not be used. In SIMPLE-based systems, use of this MIME type is negotiated using SIP content type negotiation mechanism as specified in partial notification [RFC5263].
Other CPP-compliant (other than SIP-based) systems can also support this specification if they have a mechanism to indicate support for it. If they do, it is possible to build a gateway that will preserve end-to-end integrity with usage of partial PIDF.
All security considerations identified for PIDF [RFC3863] apply unchanged for this document as presence information may contain highly sensitive information. Furthermore, the protocol SHOULD provide authorization policies what presence information can be given to which watchers, and when, see [RFC5025].
The PIDF [RFC3863] format is represented in XML that performs all character processing in terms of the Universal Character Set (UCS). Conformant XML processors MUST support both UTF-8 and UTF-16 encodings of the UCS. UTF-8 is the RECOMMENDED encoding of this partial presence format.
If the character set of the initial <pidf-full> document has been accepted by a receiving application, it MUST continue to accept the same character set with the subsequent <pidf-diff> documents. However, it MUST NOT need to accept a possible character set change.
Error conditions MAY be indicated by errors defined in [RFC5261]. This document doesn't define any additional error elements. If the 'version' or 'entity' attributes have incorrect content, it MAY be indicated by the <invalid-attribute-value> error element.
The authors would like to thank Jose Costa-Requena, Jyrki Aarnos, Jonathan Rosenberg, Dean Willis, Miguel Garcia, Krisztian Kiss, Ben Cambell, Robert Sparks, Anders Kristenssen, Aki Niemi, Jon Peterson, Gonzalo Camarillo, Lars Eggert, Lakshminath Dondeti, and Chris Newman for their valuable comments and contributions.
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at email@example.com.