This commit is contained in:
Peter Saint-Andre 2012-05-29 10:32:00 -06:00
parent 7ef6dbe89a
commit 6627f58b8d
1 changed files with 17 additions and 11 deletions

28
xep-0312.xml Normal file → Executable file
View File

@ -22,6 +22,12 @@
<shortname>NOT_YET_ASSIGNED</shortname>
&hildjj;
&stpeter;
<revision>
<version>0.3</version>
<date>2012-05-29</date>
<initials>psa</initials>
<remark><p>Corrected namespace to use namespace versioning; tweaked some of the delivery rules.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2012-03-08</date>
@ -53,22 +59,22 @@
</section1>
<section1 topic='How It Works' anchor='feature'>
<p>When sending initial presence, A subscriber (more precisely, a subscriber's specific full JID) can indicate how long ago it last logged out by including an &lt;ago/&gt; element qualifed by the 'urn:xmpp:ago' namespace; the 'secs' attribute indicates the number of seconds since this resource was last online.</p>
<p>When sending initial presence, a subscriber (more precisely, a subscriber's specific full JID) can indicate how long ago it last logged out by including an &lt;ago/&gt; element qualifed by the 'urn:xmpp:ago:0' namespace; the 'secs' attribute indicates the number of seconds since this resource was last online.</p>
<example caption='Last Logout Indication in Initial Presence'><![CDATA[
<presence from='juliet@capulet.com/balcony'>
<ago xmlns='urn:xmpp:ago' secs='86511'/>
<ago xmlns='urn:xmpp:ago:0' secs='86511'/>
</presence>
]]></example>
<p>Upon receiving such an indication, a pubsub or PEP service that supports presence-based notifications and the "pubsub-since" feature defined herein would behave as follows:</p>
<ol>
<li>The service MUST send to the subscriber's full JID all of the notifications stored in the relevant node's history that were generated since the last logout time.</li>
<li>The service MAY adjust its definition of "interim notification" to account for reasonable clock skew (e.g., including notifications up to five minutes older than the subscriber's last logout time).</li>
<li>The service MUST send to the subscriber's full JID all of the notifications stored in the relevant node's history that were generated since the last logout time (although see the rule #2 and rule #5 below).</li>
<li>The service SHOULD NOT include items that were deleted from the node, and MAY purge the node if items are deleted (naturally, if the node is purged then the service would not be able to meet rule #1 above).</li>
<li>The service SHOULD include only the final version of each pubsub notification (e.g., in case of items that were updated during the period when the subscriber was offline).</li>
<li>The service SHOULD NOT include items that were removed from the node.</li>
<li>The service MAY adjust its definition of "interim notification" to account for reasonable clock skew (e.g., including notifications up to five minutes older than the subscriber's last logout time).</li>
<li>The service MAY limit the number of notifications that it sends to avoid resource contraints.</li>
<li>The service MAY include &xep0059; data so that the subscriber can page through the set of interim notifications.</li>
</ol>
<p>If the pubsub service receives subsequent available presence from that full JID (even a presence update that includes the last availability indication), it MUST behave according to the rules in XEP-0060 or XEP-0163 (typically this means it would do nothing, since presence-based notifications toggle notifications on when receiving initial presence and toggling notifications off when receiving unavailable presence).</p>
<p>If the pubsub service receives subsequent available presence from that full JID (even a presence update that includes the last availability indication), it MUST behave according to the rules in XEP-0060 or XEP-0163 (typically this means it would do nothing, since presence-based delivery toggles notifications "on" when receiving initial presence and toggles notifications "off" when receiving unavailable presence).</p>
</section1>
<section1 topic='Determining Support' anchor='disco'>
@ -106,12 +112,12 @@
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<p>The Last Activity extension (XEP-0012) notates time in seconds before the moment of stanza generation. Although some commenters have suggested that it would be easier to implement last activity notations in terms of UTC timestamps, clients can mitigate some implementation problems by storing the last activity time in UTC instead of local time (in case the device is moved across time zones) and by using standard technologies for clock synchronization such as &rfc1305; and &xep0202;. The five-minute grace period is merely an implementation suggestion; implementation and deployment experience might indicate that other values are more prudent.</p>
<p>The Last Activity extension (XEP-0012) notates time in seconds before the moment of stanza generation. Although some commenters have suggested that it would be easier to implement last activity notations in terms of UTC timestamps, clients can mitigate some implementation problems by storing the last activity time in UTC instead of local time (in case the device is moved across time zones) and by using standard technologies for clock synchronization such as &rfc1305; and &xep0202;. The five-minute grace period is merely a suggestion for developers; implementation and deployment experience might indicate that other values are more prudent.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-namespaces'>
<p>The &REGISTRAR; shall add 'urn:xmpp:ago' to its registry at &NAMESPACES;.</p>
<p>The &REGISTRAR; shall add 'urn:xmpp:ago:0' to its registry at &NAMESPACES;.</p>
</section2>
<section2 topic='Service Discovery Features' anchor='registrar-features'>
<p>Support for the feature defined in this document is advertised by the "http://jabber.org/protocol/pubsub#since" Service Discovery feature.</p>
@ -123,7 +129,7 @@
The pubsub or PEP service sends interim notifications upon receiving
initial presence containing the subscriber's last logout time.
</desc>
<doc>XEP-xxxx</doc>
<doc>XEP-0312</doc>
</var>
]]></code>
</section2>
@ -135,8 +141,8 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:ago'
xmlns='urn:xmpp:ago'
targetNamespace='urn:xmpp:ago:0'
xmlns='urn:xmpp:ago:0'
elementFormDefault='qualified'>
<xs:element name='ago'>