XEP-xxxx: XMPP Nodes

This specification more clearly defines the nature of nodes as used in the Service Discovery and Publish-Subscribe extensions to the Extensible Messaging and Presence Protocol (XMPP).


WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document must not be referred to as an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://www.xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.


Document Information

Series: XEP
Number: xxxx
Publisher: XMPP Standards Foundation
Status: ProtoXEP
Type: Informational
Version: 0.0.2
Last Updated: 2008-02-08
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: N/A


Author Information

Peter Saint-Andre

JabberID: stpeter@jabber.org
URI: https://stpeter.im/

Ralph Meijer

Email: ralphm@ik.nu
JabberID: ralphm@ik.nu


Legal Notices

Copyright

This XMPP Extension Protocol is copyright (c) 1999 - 2008 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at <http://www.xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Discussion Venue

The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.

Errata may be sent to <editor@xmpp.org>.

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Conformance Terms

The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".


Table of Contents


1. Introduction
2. Definition
3. Use in XMPP URIs
4. Internationalization Considerations
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
Notes
Revision History


1. Introduction

Both Service Discovery [1] and Publish-Subscribe [2] refer to "nodes" in relation to XMPP entities. However, the concept of an XMPP node has never been clearly specified (e.g., in RFC 3920 [3]). This document attempts to remedy that oversight.

2. Definition

To clarify the nature of a node, it is first helpful to describe the architecture of XMPP systems.

Because XMPP is a client-server technology that relies on the Domain Name System, the fundamental building block of XMPP systems is the "domain". The idea of an Internet domain is borrowed from the real world, where a domain is an area of physical territory over which an individual or organization has control (e.g., the United States of America). Similarly, an Internet domain (e.g., jabber.org or xmpp.org) is a virtual space or area that is controlled by an individual or organization (e.g., Jeremie Miller or the XMPP Standards Foundation). Given the workings of the Domain Name System, it is also possible to have subdomains such as planet.jabber.org or interop.xmpp.org, which can be seen as the virtual equivalent of administrative subdivisions in the real world (e.g., a particular state within the USA, such as Colorado). In any case, a domain identifier is the primary portion of a JabberID (e.g., "jabber.org" in the JID "stpeter@jabber.org"), and can stand alone as a complete JabberID.

A given physical domain contains particular points or places. Similarly, a given virtual domain can contain particular points or entities. These entities are often thought of as accounts (e.g., the URI mailto:stpeter@jabber.org represents an email account and the URI xmpp:stpeter@jabber.org represents an XMPP account), but other entity types are possible (e.g., jdev@conference.jabber.org happens to be a Multi-User Chat [4] room). Confusingly, the part of a JabberID that identifies an account or entity within the scope of an XMPP domain is called a node (e.g., the string "stpeter" in the JabberID stpeter@jabber.org is called a "node identifier"). Unfortunately, this usage collides with the term "node" as used in Service Discovery and Publish-Subscribe. Therefore we suggest the term "local" for a particular point or entity in an XMPP domain. A local identifier is an optional secondary portion of a JabberID (e.g., "stpeter" in the JID "stpeter@jabber.org").

A given domain or local can have various assets associated with it; in XMPP these assets are called "resources". In the case of an account registered with an XMPP service, such resources are typically devices or connections. In the case of a multi-user chat room, such resources are usually room occupants. And so on. A resource identifier is an optional tertiary portion of a JabberID (e.g., "roundabout" in the JID "stpeter@jabber.org/roundabout" or "psa" in the JID "jdev@conference.jabber.org/psa").

The Service Discovery and Publish-Subscribe extensions to XMPP use an optional quaternary identifer called a "node", which identifies a particular facet or aspect of an XMPP domain, local, or resource. The exact nature of a node depends on the protocol in use:

As shown in the following examples, a node is not encapsulated in the JabberID but instead is communicated in protocol to indicate that the interaction is directed to or from a specific facet of a domain, a local, or a resource.

Example 1. Nodes in Service Discovery: a disco#info request directed to a specific node

<iq type='get'
    from='romeo@montague.net/orchard'
    to='mim.shakespeare.lit'
    id='info3'>
  <query xmlns='http://jabber.org/protocol/disco#info' 
         node='http://jabber.org/protocol/commands'/>
</iq>
  

Example 2. Nodes in Publish-Subscribe: a publish request directed to a specific node

<iq type='set'
    from='hamlet@denmark.lit/blogbot'
    to='pubsub.shakespeare.lit'
    id='pub1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='princely_musings'>
      <item>
        <entry xmlns='http://www.w3.org/2005/Atom'>
          <title>Soliloquy</title>
          <summary>
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them?
          </summary>
          <link rel='alternate' type='text/html'
                href='http://denmark.lit/2003/12/13/atom03'/>
          <id>tag:denmark.lit,2003:entry-32397</id>
          <published>2003-12-13T18:30:02Z</published>
          <updated>2003-12-13T18:30:02Z</updated>
        </entry>
      </item>
    </publish>
  </pubsub>
</iq>
  

3. Use in XMPP URIs

As authorized by XMPP URI Query Components [6], the XMPP Registrar [7] maintains a registry of queries and key-value pairs for use in XMPP URIs (see <http://www.xmpp.org/registrar/querytypes.html>).

The "disco" and "pubsub" querytypes are already registered, including the "node" key.

In order to specify a node "foo" as a quaternary identifier without specifying a "disco" querytype or "pubsub" querytype, an XMPP URI may be constructed as follows:

Example 3. XMPP URI With Node

xmpp:romeo@example.org?;node=foo
  

This URI can be parsed as follows:

  1. Primary identifier: "example.org"
  2. Secondary identifier: "romeo"
  3. Tertiary identifier: [none]
  4. Quaternary identifier: "foo"

4. Internationalization Considerations

An XMPP node may include any UTF-8 character.

5. Security Considerations

This specification introduces no security considerations above and beyond those discussed in RFC 3920, XEP-0030, XEP-0060.

6. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [8].

7. XMPP Registrar Considerations

This document requires no interaction with the XMPP Registrar [9].


Notes

1. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.

2. XEP-0060: Publish-Subscribe <http://www.xmpp.org/extensions/xep-0060.html>.

3. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc3920>.

4. XEP-0045: Multi-User Chat <http://www.xmpp.org/extensions/xep-0045.html>.

5. XEP-0050: Ad-Hoc Commands <http://www.xmpp.org/extensions/xep-0050.html>.

6. XEP-0147: XMPP URI Query Components <http://www.xmpp.org/extensions/xep-0147.html>.

7. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://www.xmpp.org/registrar/>.

8. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

9. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://www.xmpp.org/registrar/>.


Revision History

Version 0.0.2 (2008-02-08)

Added more examples.

(psa)

Version 0.0.1 (2008-02-07)

First draft.

(psa)

END