mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
copy edit
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1404 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
360de1eed6
commit
ce06980ec7
64
xep-0168.xml
64
xep-0168.xml
@ -7,7 +7,7 @@
|
||||
<xep>
|
||||
<header>
|
||||
<title>Resource Application Priority</title>
|
||||
<abstract>This document defines an XMPP protocol extension to indicate the presence priority of XMPP resources for applications other than messaging.</abstract>
|
||||
<abstract>This document defines an XMPP protocol extension to indicate the presence priority of XMPP resources for applications other than standard XMPP messaging.</abstract>
|
||||
&LEGALNOTICE;
|
||||
<number>0168</number>
|
||||
<status>Experimental</status>
|
||||
@ -98,7 +98,7 @@
|
||||
</revision>
|
||||
</header>
|
||||
<section1 topic='Introduction' anchor='intro'>
|
||||
<p>Within the Extensible Messaging and Presence Protocol (XMPP; see &rfc3920;), presence indicates availability for communication. Specifically, in systems that bundle presence and instant messaging (see &rfc3921;), the <priority/> child of the XMPP &PRESENCE; stanza indicates availability for communications qualified by the "jabber:client" namespace. However, a wide variety of entities might provide XMPP presence, including entities that are not primarily focused on IM (e.g., phones) or even entities that do not support XMPP messaging at all.</p>
|
||||
<p>Within the Extensible Messaging and Presence Protocol (XMPP; see &rfc3920;), presence indicates availability for communication. Specifically, in systems that bundle presence and instant messaging (see &rfc3921;), the <priority/> child of the XMPP &PRESENCE; stanza indicates availability for communications qualified by the "jabber:client" namespace, especially instant messaging. However, a wide variety of entities might provide XMPP presence, including entities that are not primarily focused on IM (e.g., phones) or even entities that do not support XMPP messaging at all.</p>
|
||||
<p>Consider a scenario in which a contact wants to initiate a voice chat (see &xep0167;) with a user who has the following three XMPP resources:</p>
|
||||
<table caption='Application Presence'>
|
||||
<tr>
|
||||
@ -123,8 +123,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
<p>If the contact chooses the resource with which it initiates a voice chat based on the standard XMPP <priority/> element, the resulting behavior could be misleading (i.e., initiating the voice chat with the "desktop" resource rather than the "mobile" resource).</p>
|
||||
<p>What is needed is a way for the user's clients to indicate that the application priority for the three resources is different from the standard XMPP priority. Such information can also be used by an XMPP server to route XMPP &MESSAGE; stanzas directed to a user's bare JID (&BAREJID;). This document defines such a mechanism via an optional XMPP presence extension.</p>
|
||||
<p>In addition, this document also defines a way for an XMPP server to flag which resource it considers to be primary for any given application type, if it has information -- such as communication preferences -- that can help it determine the primary resource.</p>
|
||||
<p>What is needed is a way for the user's clients to indicate that the application priority for the three resources is different from the standard XMPP priority. This document defines such a mechanism via an optional XMPP presence extension.</p>
|
||||
<p>As extensions to that core use case, this document also defines:</p>
|
||||
<ul>
|
||||
<li>A way for an XMPP server to mark which resource it considers to be primary for any given application type, if it has information -- such as communication preferences -- that can help it determine the primary resource.</li>
|
||||
<li>A way for an XMPP server to use application priority data for more intelligent routing of specially-labelled XMPP &MESSAGE; stanzas directed to a user's bare JID (&BAREJID;).</li>
|
||||
</ul>
|
||||
</section1>
|
||||
<section1 topic='Application Priority' anchor='rap'>
|
||||
<section2 topic='Format' anchor='rap-format'>
|
||||
@ -193,9 +197,9 @@
|
||||
<p>For the three resources ("desktop", "pda", and "mobile") mentioned above, the pubsub notifications received by a contact would be as follows.</p>
|
||||
<example caption='Contact receives pubsub notifications from user'><![CDATA[
|
||||
<message from='juliet@capulet.lit'
|
||||
id='rap1'
|
||||
to='romeo@montague.lit/orchard'
|
||||
type='headline'
|
||||
id='rap1'>
|
||||
type='headline'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0168.html#ns'>
|
||||
<item>
|
||||
@ -211,9 +215,9 @@
|
||||
</message>
|
||||
|
||||
<message from='juliet@capulet.lit'
|
||||
id='rap2'
|
||||
to='romeo@montague.lit/orchard'
|
||||
type='headline'
|
||||
id='rap2'>
|
||||
type='headline'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0168.html#ns'>
|
||||
<item>
|
||||
@ -229,9 +233,9 @@
|
||||
</message>
|
||||
|
||||
<message from='juliet@capulet.lit'
|
||||
id='rap3'
|
||||
to='romeo@montague.lit/orchard'
|
||||
type='headline'
|
||||
id='rap3'>
|
||||
type='headline'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0168.html#ns'>
|
||||
<item>
|
||||
@ -249,7 +253,7 @@
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='Flagging the Primary Resource' anchor='flag'>
|
||||
<p>The user's server may have special information that enables it to flag a resource as primary for a given application type. For instance, the server may include a communication policy service that enables the user to define (outside the context of any presence priorities) that she would prefer to be called at her desktop computer only between the hours of 9:00 AM and 5:00 PM local time, prefer to be called on her mobile phone at all other times, and so on.</p>
|
||||
<p>The user's XMPP server may have special information that enables it to flag a resource as primary for a given application type. For instance, the server may include a communication policy service that enables the user to define (outside the context of any presence priorities) that she would prefer to be called at her desktop computer only between the hours of 9:00 AM and 5:00 PM local time, prefer to be called on her mobile phone at all other times, and so on.</p>
|
||||
<p>To flag the primary resource related to a specific application type, the server shall add a <primary/> child to the relevant RAP element. Here is an example:</p>
|
||||
<example caption='Primary resource flag'><![CDATA[
|
||||
<presence from='juliet@capulet.lit/mobile'>
|
||||
@ -261,25 +265,25 @@
|
||||
</rap>
|
||||
</presence>
|
||||
]]></example>
|
||||
<p>The following business rules apply to resource flagging by the server:</p>
|
||||
<p>The following business rules apply to primary resource flagging by the server:</p>
|
||||
<ol start='1'>
|
||||
<li><p>A server MAY add the primary resource flag to the presence broadcasts generated by the resource it determines is "most available" for a given application type.</p></li>
|
||||
<li><p>A server MAY add the <primary/> element to RAP data generated by the resource it determines is "most available" for a given application type.</p></li>
|
||||
<li><p>Because the default 'ns' is "jabber:client", to flag the primary resource for standard XMPP communications the server SHOULD NOT include a 'ns' attribute, SHOULD NOT include a 'num' attribute, and MUST include a <primary/> child.</p></li>
|
||||
<li><p>An available resource that has specified a negative priority for an application type MUST NOT be flagged as the primary resource for that application type.</p></li>
|
||||
<li><p>A client SHOULD NOT include the primary resource flag in presence stanzas that it generates; however, if a client includes the primary resource flag in a presence stanza, the server SHOULD remove or overwrite the flag.</p></li>
|
||||
<li><p>In response to a presence probe, a server SHOULD send presence from the primary resource first (this enables the receiving client to skip any local most-available algorithms it might implement).</p></li>
|
||||
<li><p>If the primary resource changes for a given application type, a server MUST push presence (including the primary resource flag) for the new primary resource. If the change in primary resource occurs because of a presence broadcast from the current primary resource, the server MUST push presence from the current primary resource (without the primary resource flag) before pushing presence from the new primary resource (including the primary resource flag).</p></li>
|
||||
<li><p>A client SHOULD NOT include the <primary/> element in RAP data that it generates; however, if a client includes <primary/> element, the server SHOULD remove or overwrite the element.</p></li>
|
||||
<li><p>In response to a presence probe, a server SHOULD send presence from the primary resource first (this enables the receiving client to skip any local "most-available-resource" algorithms it might implement) if the client includes RAP data in presence.</p></li>
|
||||
<li><p>If the primary resource changes for a given application type and the client includes RAP data in presence, a server MUST broadcast updated presence information (including the <primary/> element) for the new primary resource. If the change in primary resource occurs because of a presence broadcast from the current primary resource, the server MUST push presence from the current primary resource (without the <primary/> element) before pushing presence from the new primary resource (including the <primary/> element).</p></li>
|
||||
</ol>
|
||||
</section1>
|
||||
<section1 topic='RAP-Based Message Routing' anchor='route'>
|
||||
<p>A server MAY use the RAP data provided by clients in order to route incoming &MESSAGE; stanzas directed to the bare JID (&BAREJID;) of a registered account. In order to enable such routing, the sender MUST include an empty <route/> element qualified by the 'http://www.xmpp.org/extensions/xep-0168.html#ns-raproute' namespace &NSNOTE; including an 'ns' attribute corresponding to the desired application.</p>
|
||||
<p>For example, consider a &xep0155; request sent from one user (Romeo) to another (Juliet), where the users do not share presence. Romeo wants the request to be delivered to the highest-priority resource for the "http://www.xmpp.org/extensions/xep-0167#ns" application type.</p>
|
||||
<p>A server MAY use the RAP data provided by a client in determing how to route incoming &MESSAGE; stanzas directed to the bare JID (&BAREJID;) of a registered account. In order to enable such routing, the sender MUST include an empty <route/> element qualified by the 'http://www.xmpp.org/extensions/xep-0168.html#ns-raproute' namespace &NSNOTE; including an 'ns' attribute corresponding to the desired application type.</p>
|
||||
<p>For example, consider a &xep0155; request sent from one user (Romeo) to another (Juliet), where the users do not share presence. Romeo wants the request to be delivered to the highest-priority resource for the "http://www.xmpp.org/extensions/xep-0167.html#ns" application type.</p>
|
||||
<example caption="User requests session"><![CDATA[
|
||||
<message type='headline'
|
||||
from='romeo@montague.lit/orchard'
|
||||
to='juliet@capulet.lit'>
|
||||
<message from='romeo@montague.lit/orchard'
|
||||
to='juliet@capulet.lit'
|
||||
type='headline'>
|
||||
<route xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns-raproute'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'/>
|
||||
ns='http://www.xmpp.org/extensions/xep-0167.html#ns'/>
|
||||
<thread>ffd7076498744578d10edabfe7f4a866</thread>
|
||||
<feature xmlns='http://jabber.org/protocol/feature-neg'>
|
||||
<x xmlns='jabber:x:data' type='form'>
|
||||
@ -295,15 +299,15 @@
|
||||
</feature>
|
||||
</message>
|
||||
]]></example>
|
||||
<p>If Juliet's server supports RAP routing, it would then deliver the message to whichever of Juliet's resources has the highest priority for the "http://www.xmpp.org/extensions/xep-0167#ns" application type.</p>
|
||||
<p>If Juliet's server supports RAP routing, it would then deliver the message to whichever of Juliet's resources has the highest priority for the "http://www.xmpp.org/extensions/xep-0167.html#ns" application type.</p>
|
||||
</section1>
|
||||
<section1 topic='Determining Support' anchor='disco'>
|
||||
<p>In order to discover whether a server or other entity supports this protocol, an entity MUST use &xep0030; or the dynamic profile of service discovery defined in &xep0115;.</p>
|
||||
<example caption='Entity queries a server regarding protocol support'><![CDATA[
|
||||
<iq type='get'
|
||||
from='juliet@capulet.lit/balcony'
|
||||
<iq from='juliet@capulet.lit/balcony'
|
||||
id='disco1'
|
||||
to='capulet.lit'
|
||||
id='disco1'>
|
||||
type='get'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
||||
</iq>
|
||||
]]></example>
|
||||
@ -313,10 +317,10 @@
|
||||
<li>For RAP routing, "http://www.xmpp.org/extensions/xep-0168.html#ns-route"</li>
|
||||
</ul>
|
||||
<example caption='Server communicates protocol support for RAP'><![CDATA[
|
||||
<iq type='result'
|
||||
from='capulet.lit'
|
||||
<iq from='capulet.lit'
|
||||
id='disco1'
|
||||
to='juliet@capulet.lit/balcony'
|
||||
id='disco1'>
|
||||
type='result'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||
...
|
||||
<feature var='http://www.xmpp.org/extensions/xep-0168.html#ns'/>
|
||||
@ -357,7 +361,7 @@
|
||||
<xs:element name='rap'>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name='primary' type='empty' minOccurs='0'/>
|
||||
<xs:element name='primary' type='empty' minOccurs='0' maxOccurs='1'/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name='ns' type='xs:string' default='jabber:client'/>
|
||||
<xs:attribute name='num' type='xs:byte'/>
|
||||
|
Loading…
Reference in New Issue
Block a user