JEP-0162: Best Practices for Roster and Subscription Management

This document specifies best practices for roster and subscription management in Jabber/XMPP clients.


WARNING: This Informational JEP is Experimental. Publication as a Jabber Enhancement Proposal does not imply approval of this proposal by the Jabber Software Foundation. Implementation of the best practice or protocol profile described herein is encouraged in exploratory implementations, although production systems should not deploy implementations of this protocol until it advances to a status of Draft.


JEP Information

Status: Experimental
Type: Informational
Number: 0162
Version: 0.1
Last Updated: 2005-10-19
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: None
Supersedes: None
Superseded By: None
Short Name: N/A
Wiki Page: <http://wiki.jabber.org/index.php/Best Practices for Roster and Subscription Management (JEP-0162)>

Author Information

Lucas Nussbaum

Email: lucas@lucas-nussbaum.net
JID: lucas@nussbaum.fr

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2005 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

Discussion Venue

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

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 Jabber Software 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 JEP 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 keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.


Table of Contents

1. Introduction
1.1. Motivation
1.2. Overview of subscription states
2. Removal of Contacts
3. Display of Contacts in the Roster
Notes
Revision History


1. Introduction

1.1 Motivation

RFC 3921 [1] explains how subscriptions and rosters integrate. However, several points are left to the client author's discretion, and this can lead to some confusion among client developers. This JEP specifies best practices that enable all Jabber clients to manage subscriptions and roster in a coherent way, thus making sure that such clients will not surprise end users with unexpected behavior.

1.2 Overview of subscription states

As defined in RFC 3921 (sections 6, 7, 8), a roster item can have one of the following subscription states:

Additionally, if subscription='from' or subscription='none', you can have ask='suscribe', which means you sent a subscription request to the item but haven't received an answer yet.

2. Removal of Contacts

It is necessary to distinguish two things:

Three problems have to be taken into consideration here:

Therefore, the following behavior is RECOMMENDED for Jabber clients:

  1. When the user asks for the removal of an item with subscription='both', the Jabber client SHOULD ask the user whether he wants to revoke the contact's authorization to see the user's presence too. This action SHOULD be called "Remove" since this is the convention used by other IM systems.

  2. The Jabber client SHOULD NOT remove the contact from the roster. There are two exceptions:

    1. The Jabber client MAY remove the contact from the roster if the user explicitely asked (so the user has to be informed he might remove both presence subscriptions).

    2. The jabber client MAY transparently remove the contact from the roster if the user asked to, and if subscription='none' or subscription='to'.

In addition to the "Remove" action described above, the client MAY provide a way to revoke the contact's subscription to the user's presence. This action, if provided, SHOULD be called "Block" since this is the convention used by other IM networks.

3. Display of Contacts in the Roster

Defining a sensible roster policy is difficult, because many users have different, special needs. We have to ensure that:

The user's roster contains both contacts of interest for the user (contacts with subscription='both' or subscription='to') and contacts which are only interested in receiving the user's presence information. Also, the user might be interested in having some contacts even with subscription='none', because he often send messages to them but isn't interested in their presence.

Therefore, the following types of contacts SHOULD be displayed by clients:

The client MAY display contacts with subscription='from' which don't match one of the above cases in an additional 'Observers' group. If no 'Observers' group is used, the client SHOULD NOT display contacts which don't match one of the above rules.

Some users give nicknames to contacts they do not want to see, to be able to remember who they are when cleaning the roster. An additional 'Hidden' group MAY be used to handle such contacts. The client SHOULD NOT display contacts if one of their groups is the 'Hidden' group. (This mean that if contact 'C' is in groups 'G' and 'Hidden', 'C' should never be displayed, even in group 'G'.)


Notes

1. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://www.ietf.org/rfc/rfc3921.txt>.


Revision History

Version 0.1 (2005-10-19)

Initial JEP version. (lnu)

Version 0.0.3 (2005-10-18)

Added a remark about "Remove" vs "Block" in other IM systems. (lnu)

Version 0.0.2 (2005-10-07)

Integrated some feedback for standards-jig. (lnu)

Version 0.0.1 (2005-10-04)

First draft. (lnu)


END