1. 1. Introduction

1.1. 1.1. Overview

  • The Extensible Messaging and Presence Protocol (XMPP) is a protocol for streaming XML [XML] elements in order to exchange messages and presence information in close to real time. The core features of XMPP are defined in Extensible Messaging and Presence Protocol (XMPP): Core [XMPP-CORE]. These features -- mainly XML streams, use

    of TLS and SASL, and the <message/>, <presence/>, and <iq/> children of the stream root -- provide the building blocks for many types of near-real-time applications, which may be layered on top of the core by sending application-specific data qualified by particular XML namespaces [XML-NAMES]. This memo describes extensions to and applications of the core features of XMPP that provide the basic functionality expected of an instant messaging (IM) and presence application as defined in RFC 2779 [IMP-REQS].

XMPP是一种将XML elements流化以达到近乎实时地传递消息(message)和在线信息(presence information)的协议。XMPP的核心功能在(XMPP): Core [XMPP-CORE]中定义。这些功能——主要包括XML的流化,TLS和SASL的使用,以及像<message/>,<presence/>以及<iq/>这样的流的子元素——提供给我们一些素材,使我们能创建很多"半实时(near-real-time)"的应用程序,而这些半实时的应用程序或许会位于应用程序的核心层之上,专门负责发送由程序专用的XML数据。这份memo讲述的是怎样扩展和使用XMPP的核心功能,而XMPP的核心协议仅涵盖了由RFC 2779 [IMP-REQS]定义的,基本的IM和presence application 所应该提供的功能。

Saint-Andre Standards Track [Page 2]

RFC 3921 XMPP IM October 2004

1.2. 1.2. Requirements

  • For the purposes of this memo, the requirements of a basic instant messaging and presence application are defined by [IMP-REQS], which at a high level stipulates that a user must be able to complete the following use cases: 作为本文档的基础,基本的IM和"在线应用程序presence application"的要求 刊载在[IMP-REQS]里面。这份文档在大体上规定了用户必须能完成如下的功能。 o Exchange messages with other users
    • 与其它用户交换消息
    o Exchange presence information with other users
    • 与其它用户交换在线信息
    o Manage subscriptions to and from other users
    • 管理和限制自己或他人的在线信息的发布
    o Manage items in a contact list (in XMPP this is called a "roster")
    • 管理通讯录里的资料(XMPP称之为roster)
    o Block communications to or from specific other users
    • 切断与他人的通讯
    Detailed definitions of these functionality areas are contained in [IMP-REQS], and the interested reader is directed to that document regarding the requirements addressed herein. 这些功能的详细定义刊载在[IMP-REQS]里,感兴趣的读者可以自己去看。 [IMP-REQS] also stipulates that presence services must be separable from instant messaging services; i.e., it must be possible to use the protocol to provide a presence service, an instant messaging service, or both. Although the text of this memo assumes that implementations and deployments will want to offer a unified instant messaging and presence service, there is no requirement that a service must offer both a presence service and an instant messaging service, and the protocol makes it possible to offer separate and distinct services for presence and for instant messaging. [IMP-REQS]同时还规定,在线信息的服务必须与及时信息的服务相分离。比方说, 协议必须允许你只使用在线信息,或及时信息服务,当然也可以两个都用。虽然 我们认为真正实现的时候,在线信息和及时信息服务肯定是合二为一的,但是它 也没有强求你一定必须同时提供在线信息合及时信息服务。这个协议完全允许你 提供单独的在线信息或及时信息服务。 Note: While XMPP-based instant messaging and presence meets the requirements of [IMP-REQS], it was not designed explicitly with that specification in mind, since the base protocol evolved through an open development process within the Jabber open-source community before RFC 2779 was written. Note also that although protocols addressing many other functionality areas have been defined in the Jabber community, such protocols are not included in this memo because they are not required by [IMP-REQS]. 注意:虽然基于XMPP的及时信息和在线服务符合[IMP-REQS]的要求,但它并 不是刻意去实现的,因为Jabber开源社区早在RFC 2779发布之前就已经促成了 基本的协议。同时还要指出的是,虽然Jabber社区还为协议设计了很多别的方面 的功能,但由于[IMP-REQS]并没有要求,因此我们这里也就不涉及了。

1.3. 1.3. Terminology

  • This memo inherits the terminology defined in [XMPP-CORE]. The capitalized 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, RFC 2119 [TERMS].

Saint-Andre Standards Track [Page 3]

RFC 3921 XMPP IM October 2004