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-0318.xml 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 Client Initiated Presence Probes</title>
  10. <abstract>This specification defines a way to determine the time when a XMPP entity has last changed its presence. Using client initiated presence probes the current presence of subscribed XMPP users can be requested. In addition a protocol to request the uptime of servers and components is defined herein.</abstract>
  11. &LEGALNOTICE;
  12. <number>0318</number>
  13. <status>Deferred</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XMPP IM</spec>
  19. <spec>XEP-0203</spec>
  20. </dependencies>
  21. <supersedes>
  22. <spec>XEP-0012</spec>
  23. </supersedes>
  24. <supersededby/>
  25. <shortname>last-presence</shortname>
  26. &tobias;
  27. <revision>
  28. <version>0.2</version>
  29. <date>2013-08-06</date>
  30. <initials>tobias</initials>
  31. <remark><p>Fix issues raised in XMPP Council meeting.</p></remark>
  32. </revision>
  33. <revision>
  34. <version>0.1</version>
  35. <date>2013-03-04</date>
  36. <initials>psa</initials>
  37. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  38. </revision>
  39. <revision>
  40. <version>0.0.1</version>
  41. <date>2013-02-20</date>
  42. <initials>tobias</initials>
  43. <remark><p>Initial version.</p></remark>
  44. </revision>
  45. </header>
  46. <section1 topic='Introduction' anchor='intro'>
  47. <p>&rfc6121;, section 4.3, defines presence probes as a way for servers to actively ping for presence status of XMPP contacts. In some scenarios however, clients want to request an update on the status of a XMPP contact.</p>
  48. </section1>
  49. <section1 topic='Rationale' anchor='rationale'>
  50. <p>While &rfc6121; specifically advises against (SHOULD NOT) clients sending presence probes to XMPP contacts, there are valid scenarios where XMPP clients want to send presence probes.</p>
  51. <p>According to &rfc6121;, contacts a client doesn't have presence information on, are expected to be offline and server aren't mandated to explicitly send offline presence to the client for offline users.</p>
  52. <p>In addition, clients in constrained environments (i.e. mobile clients), could explicitly tell the server to filter out presence stanzas of certain kind, to keep communication to a minimum. One such protocol is &xep0273;.</p>
  53. <p>This causes presence information to be outdated and any information, that might have been attached to the offline presence, i.e. &xep0203;, to be missing at client side.</p>
  54. <p>Sending presence probes from the client should be based on human request, i.e. opening a chat dialog to an offline contact when messing full presence information for that contact. Clients MUST NOT send presence probes to all contacts that they think are offline after login.</p>
  55. </section1>
  56. <section1 topic='Use Cases' anchor='usecases'>
  57. <p>This section describes two major use cases of the described protocol, client initiated presence probes.</p>
  58. <section2 topic='Requesting up-to-date Presence of a XMPP Entity' anchor='presence-pull'>
  59. <p>In some situations, after login, the client has incomplete presence information for offline contacts. The user might be interested in status text of the offline presence of a contact or when a contact went offline. This information can be requested, i.e. when the user opens a chat dialog to an offline user, using a client initiated presence probe and is described in the following two examples.</p>
  60. <p>Initialilly a client requests the current presence information of a contact by sending out a presence probe.</p>
  61. <example caption='Request for up-to-date Presence using Presence Probe'><![CDATA[
  62. <presence from='juliet@capulet.com/balcony' to='romeo@montague.com' type='probe' />]]></example>
  63. <p>The other side's server, in this example montague.com, then responds with the last known presence of the user, including &xep0203; and other information provided by the user.</p>
  64. <example caption='Presence Reply in Response to Presence Probe'><![CDATA[
  65. <presence from='romeo@montague.com' to='juliet@capulet.com/balcony' type='unavailable'>
  66. <status>Going offline. Out of battery.</status>
  67. <delay xmlns='urn:xmpp:delay'
  68. from='romeo@montague.com/balcony'
  69. stamp='2012-09-10T23:41:07Z'/>
  70. </presence>]]></example>
  71. </section2>
  72. <section2 topic='Requesting Uptime of a XMPP Server' anchor='uptime-request'>
  73. <p>XMPP servers typically don't have all the properties known from XMPP clients, like presence or rosters. However, &xep0267; for example added rosters to XMPP servers.</p>
  74. <p>In a similar manner, this extension describes the use of presence for XMPP servers and XMPP components. Basically, when a XMPP server or component starts up it's expected to set its presence to online.</p>
  75. <p>With this concept, any party could easily request the time a XMPP server or component went online, by sending a presence probe to it.</p>
  76. <example caption='Request for Presence of a XMPP Server'><![CDATA[
  77. <presence from='juliet@capulet.com/balcony' to='montague.com' type='probe' />]]></example>
  78. <p>In response, the requester receives a presence stanza, which contains &xep0203; information, indicating the time the server went online.</p>
  79. <example caption='Response from XMPP Server indicating uptime'><![CDATA[
  80. <presence from='montague.com' to='juliet@capulet.com/balcony'>
  81. <delay xmlns='urn:xmpp:delay'
  82. from='montague.com'
  83. stamp='2012-09-10T23:41:07Z'/>
  84. </presence>]]></example>
  85. </section2>
  86. </section1>
  87. <section1 topic='Acknowledgements' anchor='ack'>
  88. <p>Thanks to Kim Alvefur and Lance Stout for their helpful comments.</p>
  89. </section1>
  90. <section1 topic='Security Considerations' anchor='security'>
  91. <p>Adding delayed delivery notation to the presence probe responses exposes information a user might not expect to have exposed. However, the information about last presence change is known to all entities subscribed to one's presence which are online. This extension just provides this information to XMPP entities which have been offline during the course of presence change.</p>
  92. <p>The security considerations of &xep0082; apply here.</p>
  93. </section1>
  94. <section1 topic='IANA Considerations' anchor='iana'>
  95. <p>This document requires no interaction with &IANA;.</p>
  96. </section1>
  97. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  98. <p>This document requires no interaction with the &REGISTRAR;.</p>
  99. </section1>
  100. </xep>