No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0296.xml 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Best Practices for Resource Locking</title>
  10. <abstract>This document specifies best practices to be followed by Jabber/XMPP clients about when to lock into, and unlock away from, resources.</abstract>
  11. &LEGALNOTICE;
  12. <number>0296</number>
  13. <status>Deferred</status>
  14. <lastcall>2011-08-05</lastcall>
  15. <type>Informational</type>
  16. <sig>Standards</sig>
  17. <approver>Council</approver>
  18. <dependencies>
  19. <spec>XMPP Core</spec>
  20. <spec>XMPP IM</spec>
  21. <spec>XEP-0085</spec>
  22. <spec>XEP-0201</spec>
  23. </dependencies>
  24. <supersedes/>
  25. <supersededby/>
  26. <shortname>NOT_YET_ASSIGNED</shortname>
  27. <author>
  28. <firstname>Matthew </firstname>
  29. <surname>Miller</surname>
  30. <email>linuxwolf@outer-planes.net</email>
  31. <jid>linuxwolf@outer-planes.net</jid>
  32. </author>
  33. <revision>
  34. <version>0.2</version>
  35. <date>2011-08-18</date>
  36. <initials>mam</initials>
  37. <remark><p>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</p></remark>
  38. </revision>
  39. <revision>
  40. <version>0.1</version>
  41. <date>2011-04-11</date>
  42. <initials>psa</initials>
  43. <remark><p>Initial published version.</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.0.1</version>
  47. <date>2011-03-14</date>
  48. <initials>mm</initials>
  49. <remark><p>Initial draft</p></remark>
  50. </revision>
  51. </header>
  52. <section1 topic='Introduction' anchor='intro'>
  53. <p>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:</p>
  54. <ol>
  55. <li>Send the first message in a chat session to the bare JID &LOCALBARE; of the intended recipient</li>
  56. <li>Send messages to the full JID &LOCALFULL; only after receiving a reply from the recipient (this is called "locking" into that full JID).</li>
  57. <li>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).</li>
  58. </ol>
  59. <p>However, following only these guidelines can still lead to "disjointed" chat conversations in clients, epsecially if multiple resources are in play.</p>
  60. <p>This specification reinforces the recommendations from XMPP-IM and provides additional implementation guidance to developers of XMPP clients.</p>
  61. </section1>
  62. <section1 topic='General Rules' anchor='general'>
  63. <!-- <p>TODO: simple state chart</p> -->
  64. <section2 topic='Initial Conversation State' anchor='general-nolock'>
  65. <p>A client MUST start conversations in the unlocked state. In this state, a client MUST send &MESSAGE;s to a conversee's bare JID.</p>
  66. </section2>
  67. <section2 topic='Locking a Conversation' anchor='general-lock'>
  68. <p>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.</p>
  69. </section2>
  70. <section2 topic='Unlocking a Conversation' anchor='general-unlock'>
  71. <p>A client MUST unlock a chat session from a resource when one of the following conditions is met:</p>
  72. <ul>
  73. <li>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.</li>
  74. <li>any &PRESENCE; update from any resource for the conversee's bare JID, including &lt;presence type='unavailable'/&gt;. The client SHOULD revert to the initial state, sending any following correspondence to the conversee's bare JID.</li>
  75. </ul>
  76. </section2>
  77. <section2 topic='Interactions with Chat States' anchor='interact-csn'>
  78. <p>If a client supports &xep0085;, then the following additional considerations apply:</p>
  79. <ul>
  80. <li>If a client receives a &MESSAGE; with a &lt;gone xmlns='http://jabber.org/protocol/chatstates'/&gt; chat state, it SHOULD unlock the coversation.</li>
  81. </ul>
  82. </section2>
  83. </section1>
  84. <section1 topic='User Agent Implementation Notes' anchor='impl'>
  85. <p>This section is non-normative, but provides additional guidelines for clients that interact directly with users.</p>
  86. <section2 topic='User Experience Considerations' anchor='experience'>
  87. <p>To further improve the user experience, clients are strongly encouraged to implement Chat State Notifications and adhere to the recommendations from &xep0201;.</p>
  88. </section2>
  89. <section2 topic='Idle Conversations' anchor='idle-chat'>
  90. <p>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.</p>
  91. </section2>
  92. <section2 topic='Overall Inactivity' anchor='idle-user'>
  93. <p>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.</p>
  94. </section2>
  95. <!-- <section2 topic='Mobile Considerations' anchor='mobile'>
  96. <p>TODO: notes on mobile clients (aggressiveness of unlocking, interactions with &xep0273;?)</p>
  97. </section2> -->
  98. </section1>
  99. <section1 topic='Security Considerations' anchor='security'>
  100. <p>This document introduces no known security vulnerabilities.</p>
  101. </section1>
  102. <section1 topic='IANA Considerations' anchor='iana'>
  103. <p>This document requires no interaction with &IANA;.</p>
  104. </section1>
  105. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  106. <p>This document requires no interaction with the &REGISTRAR;.</p>
  107. </section1>
  108. </xep>