详解XMPP协议,RFC 6121对RFC3021做的几点改进

来源:互联网 发布:淘宝图片授权管理 编辑:程序博客网 时间:2024/04/29 07:08

xmpp.orgs发布了Updated XMPP RFCs

新发布的RFC 6120RFC 6121,RFC 6122分别对RFC 3920RFC 3921RFC 3922做了改进升级。我列了一下RFC 6121RFC3921所做的改进,供大家参考:

翻译得不是很正确的话,希望指正。

1.     取消会话建立协议,并删除3921第三节中的会话建立内容。但是,在实际产品中,从兼容性上面的考虑,建议建立空会话。

2.     为了更加无缝的同步不同服务器上用户的订阅(subscription)状态,明确和修改了presence的订阅请求(requirement)、探测(probes)和通知(notifications)的错误处理

3.     更改出席探测(presence probes)中“from”元素中的full jid(username@domain/resource)为不带资源的bare jid(username@domain)

4.     根据实施和部署的经验,调整、优化stanza 的投递规则

5.     明确阐明服务器可以向所有的资源(这里可以理解为客户端)投递消息节(stanza),如果它存在让资源(这里可以理解为客户端)选择是否接收服务端消息的方法。

6.     允许服务器采用自己的算法去确定哪个资源最好用(most available),并投递消息。但是在RFC3921中推荐的基于presence优先级的算法,仍然可用

7.     新增可选名册roster(可以理解为联系人列表)信息版本,使在两个会话间roster改变很小的情况下,可以节省带宽。有关协议最初在[XEP-0237]中描述。

8.     增加了服务器对原采用的出席订阅方式(即通过类型为subscribed的出席信息节)的支持。通过设置一个新的”approved”属性,为“true”则采用原来的订阅方式,为“false”则采用默认方式。

9.     在“parent”属性中增加 <thread/>元素

10.  将通讯阻塞协议移回到 [XEP‑0016]

11.  推荐探测(probes) 返回出席(presence)不可用的状态

12.  明确了presence的探针处理结果,发送给full JIDs

13.  明确阐明presence的默认优先级为0

14.  删除支持“_im”“_pres”SRV记录的建议

 

附原文区别:

 

  • The protocol for session establishment was determined to be unnecessary and therefore the content previously defined in Section 3 of RFC 3921 was removed. However, for the sake of backward-compatibility server implementations are encouraged to advertise support for the feature, even though session establishment is a "no-op".
  • In order to more seamlessly repair lack of synchronization in subscription states between rosters located at different servers, clarified and modified error handling related to presence subscription requests, presence probes and presence notifications.
  • Changed the 'from' address for presence probes so that it is the bare JID, not the full JID.
  • Adjusted and clarified stanza delivery rules based on implementation and deployment experience.
  • Explicitly specified that a server is allowed to deliver a message stanza of type "normal" or "chat" to all resources if it has a method for allowing resources to opt in to such behavior.
  • Allowed a server to use its own algorithm for determining the "most available" resource for the purpose of message delivery, but mentioned the recommended algorithm from RFC 3921 (based on presence priority) as one possible algorithm.
  • Added optional versioning of roster information to save bandwidth in cases where the roster has not changed (or has changed very little) between sessions; the relevant protocol interactions were originally described in [XEP‑0237].
  • Added optional server support for pre-approved presence subscriptions via presence stanzas of type "subscribed", including a new 'approved' attribute that can be set to "true" (for a pre-approved subscription) or "false" (the default).
  • Added optional 'parent' attribute to <thread/> element.
  • Moved the protocol for communications blocking (specified in Section 10 of RFC 3921) back to [XEP‑0016], from which it was originally taken.
  • Recommended returning presence unavailable in response to probes.
  • Clarified handling of presence probes sent to full JIDs.
  • Explicitly specified that the default value for the presence <priority/> element is zero.
  • Removed recommendation to support the "_im" and "_pres" SRV records.
原创粉丝点击