%ents; ]>
Best Practices for Resource Locking This document specifies best practices to be followed by Jabber/XMPP clients about when to lock into, and unlock away from, resources. &LEGALNOTICE; 0296 Deferred 2011-08-05 Informational Standards Council XMPP Core XMPP IM XEP-0085 XEP-0201 NOT_YET_ASSIGNED Matthew Miller linuxwolf@outer-planes.net linuxwolf@outer-planes.net 0.2 2011-08-18 mam

Expanded intro with a short problem description; moved chat states considerations to their own section; tightened requirement regarding a message from different resource from MAY to SHOULD; loosened requirement regarding a message with 'gone' from MUST to SHOULD; added missing but required sections

0.1 2011-04-11 psa

Initial published version.

0.0.1 2011-03-14 mm

Initial draft

The goal of this specification is to provide implementation guidance for XMPP clients to improve the user experience when maintaining a chat conversation between the user and a conversee. Section 5.1 of &xmppim; defines the concept of a "one-to-one chat session" and recommends that clients support the behavior described there, including:

  1. Send the first message in a chat session to the bare JID &LOCALBARE; of the intended recipient
  2. Send messages to the full JID &LOCALFULL; only after receiving a reply from the recipient (this is called "locking" into that full JID).
  3. Send messages to the bare JID again if the presence of the recipient changes in any way (this is called "unlocking" from the full JID).

However, following only these guidelines can still lead to "disjointed" chat conversations in clients, epsecially if multiple resources are in play.

This specification reinforces the recommendations from XMPP-IM and provides additional implementation guidance to developers of XMPP clients.

A client MUST start conversations in the unlocked state. In this state, a client MUST send &MESSAGE;s to a conversee's bare JID.

Once a client receives a chat &MESSAGE; from the conversee, whether or not this client initiated the conversation, it MUST lock the conversation. The client MUST remember the conversee's full JID and send further correspondence to this full JID until one of the unlocking conditions are met.

A client MUST unlock a chat session from a resource when one of the following conditions is met:

  • A &MESSAGE; from the same bare JID, but a different resource, is received. In this case, the client SHOULD lock to the new resource; or the client MAY revert to the initial state, sending any following correspondence to the conversee's bare JID.
  • any &PRESENCE; update from any resource for the conversee's bare JID, including <presence type='unavailable'/>. The client SHOULD revert to the initial state, sending any following correspondence to the conversee's bare JID.

If a client supports &xep0085;, then the following additional considerations apply:

  • If a client receives a &MESSAGE; with a <gone xmlns='http://jabber.org/protocol/chatstates'/> chat state, it SHOULD unlock the coversation.

This section is non-normative, but provides additional guidelines for clients that interact directly with users.

To further improve the user experience, clients are strongly encouraged to implement Chat State Notifications and adhere to the recommendations from &xep0201;.

A client MAY take into account the lack of activity of a conversation. Exactly how much inactivity constitutes an idle conversation is left to implementations to determine.

A client MAY take into account the overall lack of activity of a user, in which case it is RECOMMENDED the client send a &PRESENCE; update to trigger any conversations to unlock. The exact conditions and &PRESENCE; information conveyed is left to implementations to determine.

This document introduces no known security vulnerabilities.

This document requires no interaction with &IANA;.

This document requires no interaction with the ®ISTRAR;.