Network Working Group                                           A. Niemi
Request for Comments: 5264                                   M. Lonnfors
Category: Standards Track                                          Nokia
                                                             E. Leppanen
                                                              Individual
                                                          September 2008
        
Network Working Group                                           A. Niemi
Request for Comments: 5264                                   M. Lonnfors
Category: Standards Track                                          Nokia
                                                             E. Leppanen
                                                              Individual
                                                          September 2008
        

Publication of Partial Presence Information

部分存在信息的发布

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.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Abstract

摘要

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.

用于事件状态发布的会话发起协议(SIP)扩展描述了一种机制,通过该机制,存在用户代理能够向存在代理发布存在信息。使用状态信息数据格式(PIDF),每个状态发布都包含完整状态,而不管自上次更新以来该信息实际更改了多少。因此,用小的更改更新一个相当大的状态文档会带来相当大的开销,因此效率低下。特别是对于低带宽和高延迟链路,这会对系统造成相当大的负担。本备忘录定义了一种解决方案,通过引入允许发布部分状态信息的机制,有助于减少这些约束的影响并提高传输效率。

Table of Contents

目录

   1. Introduction ....................................................2
   2. Definitions and Document Conventions ............................3
   3. Overall Operation ...............................................3
      3.1. Presence Publication .......................................3
      3.2. Partial Presence Publication ...............................4
   4. Client and Server Operation .....................................5
      4.1. Content-Type for Partial Publications ......................5
      4.2. Generation of Partial Publications .........................5
      4.3. Processing of Partial Publications .........................7
           4.3.1. Processing <pidf-full> ..............................7
           4.3.2. Processing <pidf-diff> ..............................7
   5. Security Considerations .........................................8
   6. Examples ........................................................8
   7. Acknowledgements ...............................................12
   8. References .....................................................12
      8.1. Normative References ......................................12
      8.2. Informative References ....................................13
        
   1. Introduction ....................................................2
   2. Definitions and Document Conventions ............................3
   3. Overall Operation ...............................................3
      3.1. Presence Publication .......................................3
      3.2. Partial Presence Publication ...............................4
   4. Client and Server Operation .....................................5
      4.1. Content-Type for Partial Publications ......................5
      4.2. Generation of Partial Publications .........................5
      4.3. Processing of Partial Publications .........................7
           4.3.1. Processing <pidf-full> ..............................7
           4.3.2. Processing <pidf-diff> ..............................7
   5. Security Considerations .........................................8
   6. Examples ........................................................8
   7. Acknowledgements ...............................................12
   8. References .....................................................12
      8.1. Normative References ......................................12
      8.2. Informative References ....................................13
        
1. Introduction
1. 介绍

The Session Initiation Protocol (SIP) Extension for Event State Publication [RFC3903] allows Presence User Agents ('PUA') to publish presence information of a user ('presentity'). The Presence Agent (PA) collects publications from one or several presence user agents, and generates the composite event state of the presentity.

事件状态发布的会话启动协议(SIP)扩展[RFC3903]允许状态用户代理(“PUA”)发布用户的状态信息(“状态实体”)。存在代理(PA)从一个或多个存在用户代理收集发布,并生成存在实体的复合事件状态。

The baseline format for presence information is defined in the Presence Information Data Format (PIDF) [RFC3863] and is by default used in presence publication. The PIDF uses Extensible Markup Language (XML) [W3C.REC-xml], and groups data into elements called tuples. In addition, [RFC4479], [RFC4480], [RFC4481], [RFC4482], and [RFC5196] define extension elements that provide various additional features to PIDF.

状态信息的基线格式在状态信息数据格式(PIDF)[RFC3863]中定义,默认情况下用于状态发布。PIDF使用可扩展标记语言(XML)[W3C.recXML],并将数据分组到称为元组的元素中。此外,[RFC4479]、[RFC4480]、[RFC4481]、[RFC4482]和[RFC5196]定义了为PIDF提供各种附加功能的扩展元素。

Presence publication by default uses the PIDF document format, and each publication contains full state, regardless of how much of the presence information has actually changed since the previous update. As a consequence, updating a sizeable presence document especially with small changes bears a considerable overhead and is therefore inefficient. Publication of information over low bandwidth and high latency links further exacerbates this inefficiency.

状态发布默认使用PIDF文档格式,并且每个发布都包含完整状态,而不管自上次更新以来状态信息实际更改了多少。因此,更新一个相当大的状态文档(尤其是小的更改)会带来相当大的开销,因此效率低下。通过低带宽和高延迟链路发布信息进一步加剧了这种低效率。

This memo specifies a mechanism with which the PUA is after an initial full state publication able to publish only those parts of the presence document that have changed since the previous update. This is accomplished using the partial PIDF [RFC5262] document format

此备忘录指定了一种机制,在初始完整状态发布之后,PUA可以使用该机制仅发布自上次更新以来已更改的状态文档部分。这是使用部分PIDF[RFC5262]文档格式实现的

to communicate a set of presence document changes to the PA, who then applies the changes in sequence to its version of the presence document.

将一组状态文档更改传达给PA,PA随后将更改顺序应用于其状态文档版本。

This memo is structured in the following way: Section 3 gives an overview of the partial publication mechanism, Section 4 includes the detailed specification, Section 5 includes discussion of security considerations, and Section 6 includes examples of partial publication.

本备忘录的结构如下:第3节概述了部分发布机制,第4节包括详细规范,第5节包括对安全注意事项的讨论,第6节包括部分发布的示例。

2. Definitions and Document Conventions
2. 定义和文件惯例

In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in RFC 2119, BCP 14 [RFC2119], and indicate requirement levels for compliant implementations.

在本文件中,关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”将按照RFC 2119、BCP 14[RFC2119]中的描述进行解释,并指出合规实施的要求级别。

This document makes use of the vocabulary defined in the Model for Presence and Instant Messaging [RFC2778], the Event State Publication Extension to SIP [RFC3903], and the PIDF Extension for Partial Presence [RFC5262].

本文档使用存在和即时消息模型[RFC2778]中定义的词汇表、SIP的事件状态发布扩展[RFC3903]和部分存在的PIDF扩展[RFC5262]。

3. Overall Operation
3. 整体运作

This section introduces the baseline functionality for presence publication, and gives an overview of the partial publication mechanism. This section is informational in nature. It does not contain any normative statements.

本节介绍状态发布的基线功能,并概述部分发布机制。本节内容仅供参考。它不包含任何规范性声明。

3.1. Presence Publication
3.1. 状态出版物

Event State Publication is specified in [RFC3903].

[RFC3903]中指定了事件状态发布。

The publication of presence information consists of a presence user agent sending a SIP PUBLISH request [RFC3903] targeted to the address-of-record of the presentity, and serviced by a presence agent or compositor. The body of the PUBLISH request carries full event state in the form of a presence document.

呈现信息的发布包括呈现用户代理发送针对呈现实体的记录地址的SIP发布请求[RFC3903],并由呈现代理或合成器提供服务。发布请求的主体以状态文档的形式携带完整的事件状态。

The compositor processes the PUBLISH request and stores the presence information. It also assigns an entity-tag that is used to identify the publication. This entity-tag is returned to the PUA in the response to the PUBLISH request.

合成器处理发布请求并存储状态信息。它还指定用于标识发布的实体标记。该实体标记在发布请求的响应中返回给PUA。

The PUA uses the entity-tag in the following PUBLISH request for identifying the publication that the request is meant to refresh, modify or remove. Presence information is stored in an initial

PUA在以下发布请求中使用实体标记来标识该请求要刷新、修改或删除的发布。存在信息存储在初始状态中

publication, and maintained using the refreshing and modifying publications. Presence information disappears either by explicitly removing it or when it meets its expiration time.

发布,并使用刷新和修改发布进行维护。状态信息通过显式删除或在到期时消失。

3.2. Partial Presence Publication
3.2. 部分存在出版物

The partial publication mechanism enables the PUA to update only parts of its presence information, namely those sections of the presence document that have changed. The initial publication always carries full state. However, successive modifying publications to this initial presence state can communicate state deltas, i.e., one or more changes to the presence information since the previous update. Versioning of these partial publications is necessary to guarantee that the changes are applied in the correct order. The PUBLISH method [RFC3903] already accomplishes this using entity-tags and conditional requests, which guarantee correct ordering of publication updates.

部分发布机制使PUA能够仅更新其状态信息的一部分,即状态文档中已更改的部分。初始出版物始终带有完整状态。然而,将发布连续修改到此初始存在状态可以传递状态增量,即,自上次更新以来对存在信息的一个或多个更改。必须对这些部分出版物进行版本控制,以确保以正确的顺序应用更改。发布方法[RFC3903]已经使用实体标记和条件请求实现了这一点,这保证了发布更新的正确顺序。

Note that the partial PIDF format [RFC5262] contains the 'version' attribute that could be used for versioning as well. However, we chose not to introduce an additional versioning mechanism to partial publish, since that would only add ambiguity and a potentially undefined error case if the two versioning mechanisms were to somehow contradict.

请注意,部分PIDF格式[RFC5262]包含也可用于版本控制的“version”属性。然而,我们选择不在部分发布中引入额外的版本控制机制,因为如果这两种版本控制机制存在某种矛盾,那么这只会增加歧义和潜在的未定义错误。

To initialize its publication of presence information, the PUA first publishes a full state initial publication. The consequent modifying publications can carry either state deltas or full state. Both initial and modifying partial presence publications are accomplished using the 'application/pidf-diff+xml' content type [RFC5262], with the former using the <pidf-full> root element, and the latter using the <pidf-diff> or <pidf-full> root elements, respectively.

为了初始化状态信息的发布,PUA首先发布完整状态的初始发布。随后的修改发布可以携带状态增量或完整状态。初始和修改部分状态发布都是使用“application/pidf diff+xml”内容类型[RFC5262]完成的,前者使用<pidf full>根元素,后者分别使用<pidf diff>或<pidf full>根元素。

While the <pidf-full> encapsulates a regular PIDF document, the <pidf-diff> can contain one or more operations for adding new elements or attributes (<add> elements), replacing elements or attributes whose content has changed (<replace> elements), or indications of removal of certain elements or attributes (<remove> elements). The PUA is free to decide the granularity by which changes in presence information are communicated to the composer. It may very well happen that there are enough changes to be communicated that it is more efficient to send a full state publication instead of a set of state deltas.

虽然<pidf full>封装了常规的pidf文档,但是<pidf diff>可以包含一个或多个操作,用于添加新元素或属性(<add>元素),替换内容已更改的元素或属性(<replace>元素),或指示删除某些元素或属性(<remove>元素)。PUA可以自由决定将状态信息中的更改传达给作曲家的粒度。很可能会发生这样的情况:需要传达的更改足够多,因此发送完整的状态发布而不是一组状态增量更有效。

When the presence compositor receives a partial publication, it applies the included patch operations in sequence. The resulting changed (or patched) presence document is then submitted to the composition logic in the same manner as with a full state presence

当状态合成器接收到部分发布时,它会按顺序应用包含的修补程序操作。然后,以与完整状态存在相同的方式将结果更改(或修补)的存在文档提交到合成逻辑

publication. Similarly, any changes to the publication expiration apply to the full, patched presence publication. In other words, there is no possibility to roll back to an earlier version, except by submitting a full state publication.

出版同样,对发布过期时间的任何更改都适用于完整的、经过修补的状态发布。换言之,除非提交完整的国家出版物,否则不可能回滚到早期版本。

4. Client and Server Operation
4. 客户端和服务器操作

Unless otherwise specified in this document, the presence user agent and presence agent behavior are as defined in [RFC3903].

除非本文件另有规定,否则状态用户代理和状态代理行为的定义见[RFC3903]。

4.1. Content-Type for Partial Publications
4.1. 部分出版物的内容类型

The entities supporting the partial publication extension described in this document MUST support the 'application/pidf-diff+xml' content type defined in the partial PIDF format [RFC5262], in addition to the baseline 'application/pidf+xml' content type defined in [RFC3863].

除[RFC3863]中定义的基线“应用程序/pidf+xml”内容类型外,支持本文档中描述的部分发布扩展的实体必须支持部分pidf格式[RFC5262]中定义的“应用程序/pidf差异+xml”内容类型。

Listing the partial PIDF content type in the Accept header field of a SIP response is an explicit indication of support for the partial publication mechanism. The PUA can learn server support either as a result of an explicit query, i.e., in a response to an OPTIONS request, or by trial-and-error, i.e., after a 415 error response is returned to an attempted partial publication.

在SIP响应的Accept header字段中列出部分PIDF内容类型明确表示支持部分发布机制。PUA可以作为显式查询的结果(即,在对选项请求的响应中)或者通过试错(即,在415错误响应返回到尝试的部分发布之后)来学习服务器支持。

4.2. Generation of Partial Publications
4.2. 部分出版物的生成

Whenever a PUA decides to begin publication of partial presence information, it first needs to make an initial publication. This initial publication always carries full state. After the initial publication, presence information can be updated using modifying publications; the modifications can carry state deltas as well as full state. Finally, the publication can be terminated by explicit removal, or by expiration.

每当PUA决定开始发布部分状态信息时,它首先需要进行初始发布。此初始出版物始终包含完整的状态。初始发布后,可以使用修改发布更新状态信息;修改可以携带状态增量以及完整状态。最后,可以通过显式删除或过期来终止发布。

Both the initial and modifying publications make use of the partial presence document format [RFC5262], and all follow the normal rules for creating publications, as defined in RFC 3903 [RFC3903], Section 4.

初始出版物和修改出版物都使用部分存在文档格式[RFC5262],并且都遵循RFC 3903[RFC3903]第4节中定义的创建出版物的正常规则。

If the initial PUBLISH request returns a 415 (Unsupported Media Type), it means that the compositor did not understand the partial publication format. In this case, the PUA MUST follow normal procedures for handling a 400-class response, as specified in Section 8.1.3.5 of [RFC3261]. Specifically, the PUA SHOULD retry the publication using the default PIDF content type, namely 'application/ pidf+xml'. In addition, to find out a priori whether a specific presence compositor supports partial presence publication, the PUA MAY use the OPTIONS method, as described in [RFC3261].

如果初始发布请求返回415(不支持的媒体类型),则表示合成器不理解部分发布格式。在这种情况下,PUA必须按照[RFC3261]第8.1.3.5节规定的正常程序处理400级响应。具体来说,PUA应该使用默认的PIDF内容类型,即“application/PIDF+xml”,重试发布。此外,为了预先确定特定呈现合成器是否支持部分呈现发布,PUA可以使用选项方法,如[RFC3261]中所述。

To construct a full-state publication, the PUA uses the following process:

为了构建完整的州出版物,PUA使用以下过程:

o The Content-Type header field in the PUBLISH request MUST be set to the value 'application/pidf-diff+xml'.

o 发布请求中的内容类型标头字段必须设置为值“application/pidf diff+xml”。

o The document in the body of the request is populated with a <pidf-full> root element that includes the 'entity' attribute set to identify the presentity.

o 请求正文中的文档填充有一个<pidf full>根元素,该根元素包括用于标识存在实体的“entity”属性集。

o Under the <pidf-full> root element exists all of the children of a PIDF [RFC3863] <presence> element. This document contains the full state of which the PUA is aware, and MAY include elements from any extension namespace.

o 在<pidf full>根元素下,存在pidf[RFC3863]<presence>元素的所有子元素。此文档包含PUA知道的完整状态,并且可能包含来自任何扩展命名空间的元素。

To construct a partial publication, the following process is followed:

要构造部分发布,请遵循以下过程:

o The Content-Type header field in the PUBLISH request MUST be set to the value 'application/pidf-diff+xml'.

o 发布请求中的内容类型标头字段必须设置为值“application/pidf diff+xml”。

o The document in the body of the request is populated with a <pidf-diff> root element that includes the 'entity' attribute identifying the presentity.

o 请求主体中的文档填充有一个<pidf diff>根元素,该元素包括标识存在实体的“entity”属性。

o Under the <pidf-diff> root element exists a set of patch operations that communicate the changes to the presentity's presence information. These operations MUST be constructed in sequence, and as defined in the partial PIDF format [RFC5262].

o 在<pidf diff>根元素下存在一组补丁操作,这些操作将更改传达给存在实体的存在信息。这些操作必须按照部分PIDF格式[RFC5262]中的定义顺序构造。

The PUA is free to decide the granularity by which changes in the presentity's presence information are communicated to the presence compositor. In order to reduce unnecessary network traffic, the PUA SHOULD batch several patch operations in a single PUBLISH request.

PUA可自由决定将呈现实体的呈现信息中的变化传达给呈现合成器的粒度。为了减少不必要的网络流量,PUA应该在一个发布请求中批处理多个修补程序操作。

A reasonable granularity might be to batch state changes resulting from related UI events together in a single PUBLISH request. For example, when the user sets their status to "Away", several things including freetext notes, service availability, and activities might change as a result.

合理的粒度可能是将相关UI事件导致的状态更改批处理在单个发布请求中。例如,当用户将其状态设置为“离开”时,包括freetext备注、服务可用性和活动在内的一些内容可能会因此而改变。

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.

如果增量状态的大小大于完整状态的大小,则PUA应改为发送带有完整状态的修改发布,除非无法进行此大小比较。

To an implementation that generates state deltas directly out of its internal events, it may not be trivial to determine the size of the corresponding full state.

对于直接从内部事件生成状态增量的实现来说,确定相应完整状态的大小可能不是一件小事。

4.3. Processing of Partial Publications
4.3. 部分出版物的处理

For each resource, the compositor maintains a record for each of the publications. These are indexed using the entity-tag of the publications.

对于每个资源,合成器为每个发布维护一个记录。使用发布的实体标记对它们进行索引。

Processing of publications generally follows the guidelines set in [RFC3903]. In addition, processing PUBLISH requests that contain 'application/pidf-diff+xml' require some extra processing that is dependant on whether the request contains full or partial state.

出版物的处理通常遵循[RFC3903]中规定的指南。此外,处理包含“application/pidf diff+xml”的发布请求需要一些额外的处理,这取决于请求是包含完全状态还是部分状态。

4.3.1. Processing <pidf-full>
4.3.1. 处理<pidf full>

If the value of the Content-Type header field is 'application/ pidf-diff+xml', and the document therein contains a <pidf-full> root element, the publication contains full presence information, and the next step applies:

如果内容类型标题字段的值为“application/pidf diff+xml”,并且其中的文档包含<pidf full>根元素,则发布包含完整的状态信息,下一步适用:

o The compositor MUST take the received presence document under the <pidf-full> as the local presence document, replacing any previous publications.

o 排字员必须将<pidf full>下收到的状态文档作为本地状态文档,以替换以前的任何出版物。

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

如果在完整处理整个发布之前遇到任何错误,合成器必须以500(服务器内部错误)响应拒绝请求,并恢复到其原始的本地存储的状态信息。

4.3.2. Processing <pidf-diff>
4.3.2. 处理<pidf diff>

If the value of the Content-Type header field is 'application/ pidf-diff+xml', and the document in the body contains a <pidf-diff> root element, the publication contains partial presence information (state delta), and the next steps apply:

如果内容类型标题字段的值为“application/pidf diff+xml”,并且正文中的文档包含<pidf diff>根元素,则发布包含部分存在信息(状态增量),接下来的步骤适用:

o If the publication containing the <pidf-diff> root element is a modifying publication (i.e., contains an If-Match header field with a valid entity-tag), the compositor MUST apply the included patch operations in sequence against its locally stored presence document.

o 如果包含<pidf diff>根元素的发布是修改发布(即,包含带有有效实体标记的If Match头字段),则合成器必须对其本地存储的存在文档按顺序应用包含的修补程序操作。

o Else, the publication is an initial publication, for which only <pidf-full> is allowed. Therefore, the publication MUST be rejected with an appropriate error response, such as a 400 (Invalid Partial Publication).

o 否则,该发布是初始发布,仅允许<pidf full>。因此,必须使用适当的错误响应拒绝发布,例如400(无效的部分发布)。

If a publication carrying partial presence information expires without the PUA refreshing it, the compositor MUST clear the entire, full state publication.

如果包含部分状态信息的发布在未经PUA刷新的情况下过期,则合成器必须清除整个完整状态的发布。

This means that the compositor does not keep a record of the applied patches, and consequently (unlike some versioning systems), the compositor does not roll back to an earlier version if a particular partial publication were to expire.

这意味着合成器不会保留应用补丁的记录,因此(与某些版本控制系统不同),如果特定的部分发布即将过期,合成器不会回滚到早期版本。

If the compositor encounters errors while processing the 'application/pidf-diff+xml' document, it MUST reject the request with a 400 (Bad Request) response. In addition, the compositor MAY include diagnostics information in the body of the response, using an appropriate error condition element defined in Section 5.1. of [RFC5261].

如果合成器在处理“application/pidf diff+xml”文档时遇到错误,它必须以400(错误请求)响应拒绝该请求。此外,合成器可使用第5.1节中定义的适当错误条件元素,在响应正文中包含诊断信息。属于[RFC5261]。

If any other errors are encountered before the entire partial publication is completely processed, including all of the patch operations in the 'application/pidf-diff+xml' body, the compositor MUST reject the request with a 500 (Server Internal Error) response, and revert back to its original, locally stored presence information.

如果在完整处理整个部分发布之前遇到任何其他错误,包括“应用程序/pidf diff+xml”正文中的所有修补程序操作,则合成器必须以500(服务器内部错误)响应拒绝该请求,并还原回其原始的本地存储状态信息。

5. Security Considerations
5. 安全考虑

This specification relies on protocol behavior defined in [RFC3903]. General security considerations related to Event State Publication are extensively discussed in that specification and all the identified security considerations apply to this document in entirety. In addition, this specification adds no new security considerations.

本规范依赖于[RFC3903]中定义的协议行为。该规范广泛讨论了与事件状态发布相关的一般安全注意事项,所有确定的安全注意事项全部适用于本文档。此外,本规范未添加新的安全注意事项。

6. Examples
6. 例子

The following message flow (Figure 1) shows an example of a presence system that applies the partial publication mechanism.

下面的消息流(图1)显示了应用部分发布机制的状态系统的示例。

First, the PUA sends an initial publication that contains full state. In return, it receives a 200 OK response containing an entity-tag. This entity-tag serves as a reference with which the initial full state can be updated using partial publications containing state deltas.

首先,PUA发送包含完整状态的初始发布。作为回报,它接收一个包含实体标记的200OK响应。此实体标记用作引用,可以使用包含状态增量的部分发布更新初始完整状态。

Then at some point the resource state changes, and the PUA assembles these changes into a set of patch operations. It then sends a modifying publication containing the patch operations, using the entity-tag as a reference to the publication against which the patches are to be applied. The compositor applies the received patch operations to its local presence document in sequence, and returns a 200 OK, which includes a new entity-tag.

然后在某个时刻,资源状态发生变化,PUA将这些变化组合成一组补丁操作。然后,它发送一个包含修补程序操作的修改发布,使用实体标记作为对要应用修补程序的发布的引用。合成器将收到的补丁操作按顺序应用于其本地状态文档,并返回一个200 OK,其中包括一个新的实体标记。

                                             Presence Agent /
                     PUA                        Compositor
                      | (M1) PUBLISH                |
                      |---------------------------->|
                      | (M2) 200 OK                 |
                      |<----------------------------|
                      |                             |
                      |                             |
                      |                             |
                      | (M3) PUBLISH                |
                      |---------------------------->|
                      | (M4) 200 OK                 |
                      |<----------------------------|
                      |                             |
                     _|_                           _|_
        
                                             Presence Agent /
                     PUA                        Compositor
                      | (M1) PUBLISH                |
                      |---------------------------->|
                      | (M2) 200 OK                 |
                      |<----------------------------|
                      |                             |
                      |                             |
                      |                             |
                      | (M3) PUBLISH                |
                      |---------------------------->|
                      | (M4) 200 OK                 |
                      |<----------------------------|
                      |                             |
                     _|_                           _|_
        

Figure 1: Partial Publication Message Flow

图1:部分发布消息流

Message details:

信息详情:

   (M1): PUA -> Compositor
        
   (M1): PUA -> Compositor
        
         PUBLISH sip:resource@example.com SIP/2.0
         ...
         Event: presence
         Expires: 3600
         Content-Type: application/pidf-diff+xml
         Content-Length: 1457
        
         PUBLISH sip:resource@example.com SIP/2.0
         ...
         Event: presence
         Expires: 3600
         Content-Type: application/pidf-diff+xml
         Content-Length: 1457
        
         <?xml version="1.0" encoding="UTF-8"?>
         <p:pidf-full xmlns="urn:ietf:params:xml:ns:pidf"
                xmlns:p="urn:ietf:params:xml:ns:pidf-diff"
                xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"
                xmlns:c="urn:ietf:params:xml:ns:pidf:caps"
                entity="pres:someone@example.com">
        
         <?xml version="1.0" encoding="UTF-8"?>
         <p:pidf-full xmlns="urn:ietf:params:xml:ns:pidf"
                xmlns:p="urn:ietf:params:xml:ns:pidf-diff"
                xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"
                xmlns:c="urn:ietf:params:xml:ns:pidf:caps"
                entity="pres:someone@example.com">
        
          <tuple id="sg89ae">
           <status>
            <basic>open</basic>
            <r:relationship>assistant</r:relationship>
           </status>
           <c:servcaps>
            <c:audio>true</c:audio>
            <c:video>false</c:video>
            <c:message>true</c:message>
           </c:servcaps>
           <contact priority="0.8">tel:09012345678</contact>
          </tuple>
        
          <tuple id="sg89ae">
           <status>
            <basic>open</basic>
            <r:relationship>assistant</r:relationship>
           </status>
           <c:servcaps>
            <c:audio>true</c:audio>
            <c:video>false</c:video>
            <c:message>true</c:message>
           </c:servcaps>
           <contact priority="0.8">tel:09012345678</contact>
          </tuple>
        
          <tuple id="cg231jcr">
           <status>
            <basic>open</basic>
           </status>
           <contact priority="1.0">im:pep@example.com</contact>
          </tuple>
        
          <tuple id="cg231jcr">
           <status>
            <basic>open</basic>
           </status>
           <contact priority="1.0">im:pep@example.com</contact>
          </tuple>
        
          <tuple id="r1230d">
           <status>
            <basic>closed</basic>
            <r:activity>meeting</r:activity>
           </status>
           <r:homepage>http://example.com/~pep/</r:homepage>
           <r:icon>http://example.com/~pep/icon.gif</r:icon>
           <r:card>http://example.com/~pep/card.vcd</r:card>
           <contact priority="0.9">sip:pep@example.com</contact>
          </tuple>
        
          <tuple id="r1230d">
           <status>
            <basic>closed</basic>
            <r:activity>meeting</r:activity>
           </status>
           <r:homepage>http://example.com/~pep/</r:homepage>
           <r:icon>http://example.com/~pep/icon.gif</r:icon>
           <r:card>http://example.com/~pep/card.vcd</r:card>
           <contact priority="0.9">sip:pep@example.com</contact>
          </tuple>
        
          <note xml:lang="en">Full state presence document</note>
          <r:person>
           <r:status>
            <r:activities>
             <r:on-the-phone/>
             <r:busy/>
            </r:activities>
           </r:status>
          </r:person>
        
          <note xml:lang="en">Full state presence document</note>
          <r:person>
           <r:status>
            <r:activities>
             <r:on-the-phone/>
             <r:busy/>
            </r:activities>
           </r:status>
          </r:person>
        
          <r:device id="urn:esn:600b40c7">
           <r:status>
            <c:devcaps>
             <c:mobility>
              <c:supported>
               <c:mobile/>
              </c:supported>
             </c:mobility>
            </c:devcaps>
           </r:status>
          </r:device>
        
          <r:device id="urn:esn:600b40c7">
           <r:status>
            <c:devcaps>
             <c:mobility>
              <c:supported>
               <c:mobile/>
              </c:supported>
             </c:mobility>
            </c:devcaps>
           </r:status>
          </r:device>
        
         </p:pidf-full>
        
         </p:pidf-full>
        
   (M2): Compositor -> PUA
        
   (M2): Compositor -> PUA
        

SIP/2.0 200 OK ... SIP-ETag: 61763862389729 Expires: 3600 Content-Length: 0

SIP/2.0 200正常。。。SIP ETag:61763862389729过期时间:3600内容长度:0

   (M3): PUA -> Compositor
        
   (M3): PUA -> Compositor
        
         PUBLISH sip:resource@example.com SIP/2.0
         ...
         Event: presence
         SIP-If-Match: 61763862389729
         Expires: 3600
         Content-Type: application/pidf-diff+xml
         Content-Length: 778
        
         PUBLISH sip:resource@example.com SIP/2.0
         ...
         Event: presence
         SIP-If-Match: 61763862389729
         Expires: 3600
         Content-Type: application/pidf-diff+xml
         Content-Length: 778
        
         <?xml version="1.0" encoding="UTF-8"?>
         <p:pidf-diff xmlns="urn:ietf:params:xml:ns:pidf"
                      xmlns:p="urn:ietf:params:xml:ns:pidf-diff"
                      xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"
                      entity="pres:someone@example.com">
        
         <?xml version="1.0" encoding="UTF-8"?>
         <p:pidf-diff xmlns="urn:ietf:params:xml:ns:pidf"
                      xmlns:p="urn:ietf:params:xml:ns:pidf-diff"
                      xmlns:r="urn:ietf:params:xml:ns:pidf:rpid"
                      entity="pres:someone@example.com">
        
          <p:add sel="presence/note" pos="before"><tuple id="ert4773">
           <status>
            <basic>open</basic>
           </status>
           <contact priority="0.4">mailto:pep@example.com</contact>
           <note xml:lang="en">This is a new tuple inserted
                 between the last tuple and note element</note>
          </tuple>
        
          <p:add sel="presence/note" pos="before"><tuple id="ert4773">
           <status>
            <basic>open</basic>
           </status>
           <contact priority="0.4">mailto:pep@example.com</contact>
           <note xml:lang="en">This is a new tuple inserted
                 between the last tuple and note element</note>
          </tuple>
        
          </p:add>
          <p:replace sel="*/tuple[@id='r1230d']/status/basic/text()"
           >open</p:replace>
        
          </p:add>
          <p:replace sel="*/tuple[@id='r1230d']/status/basic/text()"
           >open</p:replace>
        
          <p:remove sel="*/r:person/r:status/r:activities/r:busy"/>
        
          <p:remove sel="*/r:person/r:status/r:activities/r:busy"/>
        
          <p:replace sel="*/tuple[@id='cg231jcr']/contact/@priority"
           >0.7</p:replace>
        
          <p:replace sel="*/tuple[@id='cg231jcr']/contact/@priority"
           >0.7</p:replace>
        
         </p:pidf-diff>
        
         </p:pidf-diff>
        
   (M4): Compositor -> PUA
        
   (M4): Compositor -> PUA
        

SIP/2.0 200 OK ... SIP-ETag: 18764920981476 Expires: 3600 Content-Length: 0

SIP/2.0 200正常。。。SIP ETag:18764920981476过期时间:3600内容长度:0

7. Acknowledgements
7. 致谢

The authors would like to thank Atle Monrad, Christian Schmidt, George Foti, Fridy Sharon-Fridman, and Avshalom Houri for review comments.

作者要感谢Atle Monrad、Christian Schmidt、George Foti、Fridy Sharon Fridman和Avshalom Houri的评论意见。

8. References
8. 工具书类
8.1. Normative References
8.1. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC3903] Niemi, A., "Session Initiation Protocol (SIP) Extension for Event State Publication", RFC 3903, October 2004.

[RFC3903]Niemi,A.,“事件状态发布的会话启动协议(SIP)扩展”,RFC 3903,2004年10月。

[RFC3863] Sugano, H., Fujimoto, S., Klyne, G., Bateman, A., Carr, W., and J. Peterson, "Presence Information Data Format (PIDF)", RFC 3863, August 2004.

[RFC3863]Sugano,H.,Fujimoto,S.,Klyne,G.,Batman,A.,Carr,W.,和J.Peterson,“状态信息数据格式(PIDF)”,RFC 38632004年8月。

[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.

[RFC3261]Rosenberg,J.,Schulzrinne,H.,Camarillo,G.,Johnston,A.,Peterson,J.,Sparks,R.,Handley,M.,和E.Schooler,“SIP:会话启动协议”,RFC 3261,2002年6月。

[RFC5262] Lonnfors, M., Costa-Requena, J., Leppanen, E., and H. Khartabil, "Presence Information Data Format (PIDF) Extension for Partial Presence", RFC 5262, September 2008.

[RFC5262]Lonnfors,M.,Costa Requena,J.,Leppanen,E.,和H.Khartabil,“局部存在的存在信息数据格式(PIDF)扩展”,RFC 5262,2008年9月。

[RFC5261] Urpalainen, J., "An Extensible Markup Language (XML) Patch Operations Framework Utilizing XML Path Language (XPath) Selectors", RFC 5261, September 2008.

[RFC5261]Urpalainen,J.,“利用XML路径语言(XPath)选择器的可扩展标记语言(XML)修补程序操作框架”,RFC 52612008年9月。

8.2. Informative References
8.2. 资料性引用

[RFC2778] Day, M., Rosenberg, J., and H. Sugano, "A Model for Presence and Instant Messaging", RFC 2778, February 2000.

[RFC2778]Day,M.,Rosenberg,J.,和H.Sugano,“状态和即时信息模型”,RFC 27782000年2月。

[RFC4479] Rosenberg, J., "A Data Model for Presence", RFC 4479, July 2006.

[RFC4479]Rosenberg,J.,“存在的数据模型”,RFC 4479,2006年7月。

[RFC4480] Schulzrinne, H., Gurbani, V., Kyzivat, P., and J. Rosenberg, "RPID: Rich Presence Extensions to the Presence Information Data Format (PIDF)", RFC 4480, July 2006.

[RFC4480]Schulzrinne,H.,Gurbani,V.,Kyzivat,P.,和J.Rosenberg,“RPID:状态信息数据格式(PIDF)的丰富状态扩展”,RFC 44802006年7月。

[RFC4481] Schulzrinne, H., "Timed Presence Extensions to the Presence Information Data Format (PIDF) to Indicate Status Information for Past and Future Time Intervals", RFC 4481, July 2006.

[RFC4481]Schulzrinne,H.,“状态信息数据格式(PIDF)的定时状态扩展,用于指示过去和未来时间间隔的状态信息”,RFC 4481,2006年7月。

[RFC4482] Schulzrinne, H., "CIPID: Contact Information for the Presence Information Data Format", RFC 4482, July 2006.

[RFC4482]Schulzrinne,H.,“CIPID:状态信息数据格式的联系信息”,RFC 4482,2006年7月。

[RFC5196] Lonnfors, M. and K. Kiss, "Session Initiation Protocol (SIP) User Agent Capability Extension to Presence Information Data Format (PIDF)", RFC 5196, September 2008.

[RFC5196]Lonnfors,M.和K.Kiss,“会话启动协议(SIP)用户代理能力扩展到状态信息数据格式(PIDF)”,RFC 51962008年9月。

[W3C.REC-xml] Bray, T., Paoli, J., Sperberg-McQueen, C., and E. Maler, "Extensible Markup Language (XML) 1.0 (2nd ed)", W3C REC-xml, October 2000, <http://www.w3.org/TR/REC-xml>.

[W3C.REC xml]Bray,T.,Paoli,J.,Sperberg McQueen,C.,和E.Maler,“可扩展标记语言(xml)1.0(第二版)”,W3C REC xml,2000年10月<http://www.w3.org/TR/REC-xml>.

Authors' Addresses

作者地址

Aki Niemi Nokia P.O. Box 407 NOKIA GROUP, FIN 00045 Finland

芬兰芬兰芬兰诺基亚集团Aki Niemi诺基亚邮政信箱407

   Phone: +358 71 8008000
   EMail: aki.niemi@nokia.com
        
   Phone: +358 71 8008000
   EMail: aki.niemi@nokia.com
        

Mikko Lonnfors Nokia Itamerenkatu 11-13 Helsinki Finland

芬兰赫尔辛基11-13日

   Phone: +358 71 8008000
   EMail: mikko.lonnfors@nokia.com
        
   Phone: +358 71 8008000
   EMail: mikko.lonnfors@nokia.com
        

Eva Leppanen Individual Lempaala Finland

Eva Leppanen芬兰伦帕拉个体酒店

   EMail: eva.leppanen@saunalahti.fi
        
   EMail: eva.leppanen@saunalahti.fi
        

Full Copyright Statement

完整版权声明

Copyright (C) The IETF Trust (2008).

版权所有(C)IETF信托基金(2008年)。

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.

本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

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.

本文件及其包含的信息以“原样”为基础提供,贡献者、他/她所代表或赞助的组织(如有)、互联网协会、IETF信托基金和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Intellectual Property

知识产权

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.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和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.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为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 ietf-ipr@ietf.org.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.