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-0023.xml 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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>Message Expiration</title>
  10. <abstract>This specification documents an historical protocol that was used to specify expiration dates for messages; this protocol has been deprecated in favor of XEP-0079: Advanced Message Processing.</abstract>
  11. &LEGALNOTICE;
  12. <number>0023</number>
  13. <status>Obsolete</status>
  14. <type>Historical</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. </dependencies>
  19. <supersedes/>
  20. <supersededby>
  21. <spec>XEP-0079</spec>
  22. </supersededby>
  23. <shortname>x-expire</shortname>
  24. <schemaloc>
  25. <url>http://www.xmpp.org/schemas/x-expire.xsd</url>
  26. </schemaloc>
  27. &jer;
  28. <author>
  29. <firstname>DJ</firstname>
  30. <surname>Adams</surname>
  31. <email>dj.adams@pobox.com</email>
  32. <jid>dj@gnu.mine.nu</jid>
  33. </author>
  34. <author>
  35. <firstname>Harold</firstname>
  36. <surname>Gottschalk</surname>
  37. <email>heg@imissary.com</email>
  38. <jid>heg@imissary.com</jid>
  39. </author>
  40. <revision>
  41. <version>1.3</version>
  42. <date>2009-06-03</date>
  43. <initials>psa</initials>
  44. <remark><p>Per a vote of the XMPP Council, changed status to Obsolete.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>1.2</version>
  48. <date>2004-10-18</date>
  49. <initials>psa</initials>
  50. <remark><p>Per a vote of the Jabber Council, changed status to Deprecated since message expiration functionality should be implemented via XEP-0079: Advanced Message Processing.</p></remark>
  51. </revision>
  52. <revision>
  53. <version>1.1</version>
  54. <date>2004-01-06</date>
  55. <initials>psa</initials>
  56. <remark><p>Added XML schema; added security, IANA, and XMPP Registrar considerations.</p></remark>
  57. </revision>
  58. <revision>
  59. <version>1.0</version>
  60. <date>2002-07-15</date>
  61. <initials>psa</initials>
  62. <remark><p>Changed status to Active.</p></remark>
  63. </revision>
  64. <revision>
  65. <version>0.9</version>
  66. <date>2002-03-19</date>
  67. <initials>dja</initials>
  68. <remark><p>Added remarks about client-end expiry.</p></remark>
  69. </revision>
  70. <revision>
  71. <version>0.1</version>
  72. <date>2002-03-07</date>
  73. <initials>dja</initials>
  74. <remark><p>Initial draft.</p></remark>
  75. </revision>
  76. </header>
  77. <section1 topic='Introduction'>
  78. <p><em>Note Well: The protocol described herein has been deprecated by the &XSF;. The recommended protocol for implementing message expiration functionality is now &xep0079;.</em></p>
  79. <p>It is sometimes helpful to indicate that a piece of information has a finite useful life or time-to-live (TTL). In the context of instant messaging, the main use of a TTL is to indicate that a message must or should be used by or read by a certain time, usually because the message has meaning or purpose only within a finite amount of time. In normal usage, such a message should be discarded after the specified time has passed if it has not been used or read by that time.</p>
  80. <p>In Jabber, TTL functionality has been implemented informally using the jabber:x:expire namespace. Support for this namespace was added to the &jabberd; server as well as some clients and components in early 2001. Specifically, that support has involved the following two areas of responsibility:</p>
  81. <ul>
  82. <li>The sender of the message is responsible for attaching a jabber:x:expire extension to the XML stanza (usually a message).</li>
  83. <li>Mechanisms involved in the store-and-forward of such a stanza
  84. <note>The best-known example of a mechanism that handles storing and forwarding of XML stanzas is the Jabber Session Manager (JSM) within current Jabber server implementations, specifically the mod_offline module. However, expiration of an XML stanza could also be handled by a Jabber client.</note>
  85. en route to its intended recipient are responsible for checking the remaining time to live and expiring (discarding) the XML stanza if necessary.</li>
  86. </ul>
  87. </section1>
  88. <section1 topic='Specifying a TTL'>
  89. <p>An Endpoint can specify a TTL for an XML stanza that it wishes to send by attaching an &lt;x/&gt; extension qualified by the jabber:x:expire namespace. The extension contains no children, only a 'seconds' attribute that contains a value representing the stanza's TTL, in seconds.</p>
  90. <example caption='Specifying a 30-minute TTL for a message'>
  91. SEND: &lt;message to='sabine@gnu.mine.nu' id='msg811'&gt;
  92. &lt;subject&gt;Eccles cakes!&lt;/subject&gt;
  93. &lt;body&gt;
  94. I've got some freshly made Eccles cakes here, come
  95. round for one before they all disappear!
  96. &lt;/body&gt;
  97. &lt;x xmlns='jabber:x:expire' seconds='1800'/&gt;
  98. &lt;/message&gt;
  99. </example>
  100. </section1>
  101. <section1 topic='Handling XML Stanzas with a TTL'>
  102. <p>Any mechanism that is involved in the storage, forwarding, and general handling of XML stanzas must check for the presence of such an extension and act accordingly, expiring (discarding) any stanzas that have exceeded their TTL lifetime. The jabber:x:expire namespace allows for a further attribute inside the &lt;x/&gt; extension: 'stored'. Here, the mechanism can record a value representing when the stanza was committed to storage, so that when the stanza is eventually retrieved for forwarding to the intended recipient, the elapsed time of storage can be calculated. This is to prevent the stanza from being held in 'suspended animation'.</p>
  103. <p>Here we see what the original message looks like after the stanza has been committed to storage and the time of storage recorded:</p>
  104. <example caption='Recording a storage-time in the extension'>
  105. SEND: &lt;message to='sabine@gnu.mine.nu' id='msg811'&gt;
  106. &lt;subject&gt;Eccles cakes!&lt;/subject&gt;
  107. &lt;body&gt;
  108. I've got some freshly made Eccles cakes here, come
  109. round for one before they all disappear!
  110. &lt;/body&gt;
  111. &lt;x xmlns='jabber:x:expire'
  112. seconds='1800'
  113. stored='912830221'/&gt;
  114. &lt;/message&gt;
  115. </example>
  116. <p>When Sabine attempts to retrieve her offline messages, the store-and-forward mechanism (e.g., mod_offline) compares the current time against the stored attribute. If the 1800 seconds have passed, the mechanism should simply drop the message, without notifying either the sender or the intended recipient. No Eccles cakes for Sabine!</p>
  117. <section2 topic='Usage in client space'>
  118. <p>Although current usage of jabber:x:expire is most commonly seen in server implementations to address any TTL requirements of stored messages, Jabber clients can also be seen as handlers of messages that may contain expiration extension information. If a message is received by a Jabber client, and not immediately displayed to the user, the client must check for TTL information and expire the message (rather than display it to the user) if appropriate.</p>
  119. </section2>
  120. </section1>
  121. <section1 topic='Security Considerations'>
  122. <p>There are no security features or concerns related to this proposal.</p>
  123. </section1>
  124. <section1 topic='IANA Considerations'>
  125. <p>This document requires no interaction with &IANA;.</p>
  126. </section1>
  127. <section1 topic='XMPP Registrar Considerations'>
  128. <p>No action on the part of the &REGISTRAR; is necessary as a result of this document, since 'jabber:x:expire' is already a registered protocol namespace.</p>
  129. </section1>
  130. <section1 topic='XML Schema'>
  131. <code><![CDATA[
  132. <?xml version='1.0' encoding='UTF-8'?>
  133. <xs:schema
  134. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  135. targetNamespace='jabber:x:expire'
  136. xmlns='jabber:x:expire'
  137. elementFormDefault='qualified'>
  138. <xs:annotation>
  139. <xs:documentation>
  140. The protocol documented by this schema is defined in
  141. XEP-0023: http://www.xmpp.org/extensions/xep-0023.html
  142. </xs:documentation>
  143. </xs:annotation>
  144. <xs:element name='x'>
  145. <xs:complexType>
  146. <xs:simpleContent>
  147. <xs:extension base='empty'>
  148. <xs:attribute name='seconds' type='xs:unsignedLong' use='required'/>
  149. <xs:attribute name='stored' type='xs:unsignedLong' use='optional'/>
  150. </xs:extension>
  151. </xs:simpleContent>
  152. </xs:complexType>
  153. </xs:element>
  154. <xs:simpleType name='empty'>
  155. <xs:restriction base='xs:string'>
  156. <xs:enumeration value=''/>
  157. </xs:restriction>
  158. </xs:simpleType>
  159. </xs:schema>
  160. ]]></code>
  161. </section1>
  162. <section1 topic='Open Issues'>
  163. <ol>
  164. <li>The jabber:x:expire namespace is processed only for delayed messages and only by servers and subsystems which support this informational draft. Therefore it is possible or even likely that a TTL will not be properly handled from the user perspective.</li>
  165. <li>A physical, time-based TTL is not implemented by this document, and would not be possible across systems without synchronized time.</li>
  166. </ol>
  167. </section1>
  168. </xep>