rfc-5264

Publication of Partial Presence Information

A. Niemi, M. Lonnfors, E. Leppanen
date2008-09 streamIETF arearai wgsimple statusPROPOSED STANDARD pages15 canonicalhttps://www.rfc-editor.org/rfc/rfc5264 doi10.17487/RFC5264
The Session Initiation Protocol (SIP) Extension for Event State Publication describes a mechanism with which a presence user agent is able to publish presence information to a presence agent. Using the Presence Information Data Format (PIDF), each presence publication contains full state, regardless of how much of that information has actually changed since the previous update. As a consequence, updating a sizeable presence document with small changes bears a considerable overhead and is therefore inefficient. Especially with low bandwidth and high latency links, this can constitute a considerable burden to the system. This memo defines a solution that aids in reducing the impact of those constraints and increases transport efficiency by introducing a mechanism that allows for publication of partial presence information. [STANDARDS-TRACK]

Extracted elements (19)

design-rationale §4.3.2

The compositor does not keep a record of applied patches, so there is no rollback to an earlier version when a partial publication expires; instead, the entire full state is cleared. This simplifies compositor state management at the cost of requiring a new full-state publication after expiry.

sip, realtime

design-rationale §3.2

The partial PIDF format (RFC 5262) contains a 'version' attribute that could serve for versioning, but the RFC deliberately chose not to introduce an additional versioning mechanism. Using both entity-tags (from RFC 3903) and the PIDF version attribute would add ambiguity and a potentially undefined error case if the two mechanisms contradicted each other.

sip, realtime

interoperability-note §4.1

Server support for partial publication can be discovered by the PUA either via an explicit OPTIONS query (checking the Accept header in the response) or by trial-and-error after receiving a 415 error response to an attempted partial publication.

sip, realtime

normative-requirement §4.1 MUST

Entities supporting the partial publication extension MUST support the 'application/pidf-diff+xml' content type defined in RFC 5262, in addition to the baseline 'application/pidf+xml' content type.

sip, realtime

normative-requirement §4.3.2 MUST

For a modifying publication containing <pidf-diff>, the compositor MUST apply the included patch operations in sequence against its locally stored presence document. If the publication is an initial publication with <pidf-diff>, it MUST be rejected with an appropriate error response such as 400 (Invalid Partial Publication).

sip, realtime

normative-requirement §4.3.2 MUST

If a publication carrying partial presence information expires without the PUA refreshing it, the compositor MUST clear the entire full state publication (no rollback to earlier versions).

sip, realtime

normative-requirement §4.3.2 MUST

If any other errors are encountered before the entire partial publication (including all patch operations) is completely processed, the compositor MUST reject with 500 (Server Internal Error) and revert to its original locally stored presence information.

sip, realtime

normative-requirement §4.3.1 MUST

If errors are encountered before the entire <pidf-full> publication is completely processed, the compositor MUST reject the request with a 500 (Server Internal Error) response and revert to its original locally stored presence information.

sip, realtime

normative-requirement §4.3.2 MUST

If the compositor encounters errors while processing the 'application/pidf-diff+xml' document, it MUST reject the request with a 400 (Bad Request) response, and MAY include diagnostics in the body using error condition elements from RFC 5261 Section 5.1.

sip, realtime

normative-requirement §4.2 MUST

If the initial PUBLISH request returns a 415 (Unsupported Media Type), the PUA MUST follow normal procedures for handling a 400-class response per RFC 3261 Section 8.1.3.5, and SHOULD retry the publication using the default 'application/pidf+xml' content type.

sip, realtime

normative-requirement §4.2 SHOULD

If the size of the delta state becomes more than the size of the full state, the PUA SHOULD instead send a modifying publication carrying full state, unless this size comparison is not possible.

sip, realtime

normative-requirement §4.2 SHOULD

The PUA SHOULD batch several patch operations in a single PUBLISH request to reduce unnecessary network traffic.

sip, realtime

normative-requirement §4.2 MUST

To construct a full-state publication, the Content-Type header field in the PUBLISH request MUST be set to 'application/pidf-diff+xml', and the body MUST be populated with a <pidf-full> root element including the 'entity' attribute.

sip, realtime

normative-requirement §4.2 MUST

To construct a partial publication, the Content-Type MUST be 'application/pidf-diff+xml', the body MUST use a <pidf-diff> root element with the 'entity' attribute, and patch operations MUST be constructed in sequence as defined in RFC 5262.

sip, realtime

normative-requirement §4.3.1 MUST

When processing a <pidf-full> document, the compositor MUST take the received presence document as the local presence document, replacing any previous publications.

sip, realtime

protocol-element §4.3

The compositor maintains a per-resource record for each publication indexed by entity-tag. The entity-tag is assigned by the compositor and returned in the response; the PUA uses the SIP-If-Match header with this entity-tag to identify which publication a modifying request targets.

sip, realtime

protocol-element §3.2

The partial publication mechanism uses the 'application/pidf-diff+xml' content type (RFC 5262) with two root elements: <pidf-full> for full-state publications and <pidf-diff> for state-delta publications. The initial publication always carries full state via <pidf-full>; modifying publications may use either.

sip, realtime

protocol-element §3.2

The <pidf-diff> element contains patch operations: <add> for adding new elements or attributes, <replace> for replacing changed elements or attributes, and <remove> for indicating removal of elements or attributes.

sip, realtime

security-consideration §5

This specification relies entirely on the security model of RFC 3903 (SIP Event State Publication). All security considerations identified in RFC 3903 apply in entirety; this specification adds no new security considerations.

security, sip