XEP-xxxx: Message State with Multiple Clients

Abstract:This document discusses the use of XMPP Extensions to provide a useful user experience when using multiple clients.
Author:Kevin Smith
Copyright:© 1999 - 2010 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:ProtoXEP
Type:Informational
Version:0.1
Last Updated:2010-08-12

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


Table of Contents


1. Introduction
    1.1. Behaviour
2. Typical Use
3. Specialized Use
    3.1. Stateless clients
    3.2. Bandwidth-Constrained Clients

Appendices
    A: Document Information
    B: Author Information
    C: Legal Notices
    D: Relation to XMPP
    E: Discussion Venue
    F: Requirements Conformance
    G: Notes
    H: Revision History


1. Introduction

Historically, there have been many problems with the experience when users have used multiple clients - either because they have multiple clients connected at once (e.g. a client on their phone and a client on their workstation), or because they use different machines at different times (e.g. a laptop when away and a desktop when at work). XEPs exist that can address these issues, and this Informational [proto]XEP documents a sensible approach to their collective use for providing a consistent user experience on all their devices or clients.

1.1 Behaviour

For examples of benefits, if their clients follow the recommendations in this document, a user will:

2. Typical Use

You would use message archiving to have a local message cache of the history (This is going to be needed for reasonable search and stuff, and consistent with things like Thunderbird's approach to IMAP), and that's just a case of "Server, send me all messages since timestamp X (my last archived message in the cache)" and it sending forwarding encapsulated messages and then saying Done. The client enables carbons. The client asks all other resources for any unread messages. As an unread message comes in, either from a carbon or directly, the client can then create a new chat window, and populate it with context from the local history cache. If an outgoing carbon comes in from a given resource, the client can mark as read all messages from the same jid to that resource, to stop having different clients look like they've got unread messages, when they were handled elsewhere.

3. Specialized Use

Some clients will not be able to implement all the recommendations due to operating constraints. In such cases it's recommended that they get as close to the Typical Use recommendations as possible. Suggested compromises for some cases are given below.

3.1 Stateless clients

If a client has limited (or no) storage available, it may be unable to persist a complete history of the user's conversations. In this case, it's recommended that the client still requests history from the message archive, but that instead of requesting a full history (asking for all messages that it hasn't yet seen), it requests a small amount of history (e.g. a week for a client with little storage, or an hour for a client with no storage) and stores this where it can (either in storage or in memory), and that it purges history older than this (either from storage or from memory, accordingly).

3.2 Bandwidth-Constrained Clients

Some clients will either wish to, or be able to, only use a little bandwidth, or to use it infrequently (e.g. those running on mobile phones). In these cases, it's recommended to request limited history (as for Stateless Clients), and also (if necessary) to not enable Carbons while they know the user is not actively attending to the client. This means that a client running in the background on a phone may turn off Carbons to avoid frequent bandwidth use while the user potentially chats on another device. When the client then comes to foreground, or gains the user's attention, the client may then enable Carbons, and also request unread messages from other clients. This means that the user may not be alerted to incoming messages directed at another client until the constrained client is in the foreground, so this should only be enabled if it's deemed necessary.


Appendices


Appendix A: Document Information

Series: XEP
Number: xxxx
Publisher: XMPP Standards Foundation
Status: ProtoXEP
Type: Informational
Version: 0.1
Last Updated: 2010-08-12
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: multiple-clients
This document in other formats: XML  PDF


Appendix B: Author Information

Kevin Smith

Email: kevin@kismith.co.uk
JabberID: kevin@doomsong.co.uk


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 - 2010 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. ##

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 from, out of, or in connection with the Specification or the implementation, deployment, or other use of 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 can be found at <http://xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XMPP Standards Foundation, 1899 Wynkoop Street, Suite 600, Denver, CO 80202 USA).

Appendix D: 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.


Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

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


Appendix F: Requirements Conformance

The following requirements 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".


Appendix G: Notes


Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

Version 0.1 (2010-08-12)

Initial version.

(ks)

END