diff --git a/xep-0352.xml b/xep-0352.xml new file mode 100644 index 00000000..aee6331b --- /dev/null +++ b/xep-0352.xml @@ -0,0 +1,153 @@ + + +%ents; +]> + + +
+ Client State Indication + This document defines a way for the client to indicate its active/inactive state. + &LEGALNOTICE; + 0352 + Experimental + Standards Track + Standards + Council + + XMPP Core + + + + NOT_YET_ASSIGNED + &mwild; + + 0.1 + 2014-08-28 + XEP Editor (asw) +

Initial published version approved by the XMPP Council.

+
+ + 0.0.1 + 2014-08-14 + mw +

First draft.

+
+
+ + +

It is common for IM clients to be logged in and 'online' even while the user is not interacting with the application. This + protocol allows the client to indicate to the server when the user is not actively using the client, allowing the server to + optimise traffic to the client accordingly. This can save bandwidth and resources on both the client and server.

+
+ + +

The aim of this specification is to provide a simple and efficient protocol for the client to report its + state to the server. Exactly how the server uses this information is beyond the scope of this document, although + some examples are given.

+

Other extensions exist, such as &xep0273;, which also aim to optimise the traffic between the client and server. + A notable difference is that instead of being client-controlled, CSI shifts the responsibility to the server, and + aims to just provide the server with enough information to implement various optimisations itself.

+
+ + + +

Juliet has an XMPP client on her phone, which is available to receive messages. However most of the time + Juliet has her phone screen turned off and is not interested in the status of her contacts unless they are + communicating with her.

+ +

Juliet's client informs the server when Juliet is not interacting with it. The server uses this information to + suppress or reduce stanzas that are unimportant, such as status updates.

+ +

When Juliet returns to her IM client, the client again informs the server, this time to report that it is active + again. The server then disables its traffic optimisations and restores the stream to its normal state.

+
+ +

When the server knows that the user is not engaging with their client many optimisations become possible. For + example a server could:

+
    +
  • Suppress presence updates until the client becomes active again. On becoming active, push the latest + presence from each contact.
  • +
  • Discard messages containing only &xep0085; payloads.
  • +
  • Defer or discard unimportant PEP notifications, possibly unsubscribe from certain PEP nodes + until the client becomes active again.
  • +
+ +

This list is for example only, a server is not required to implement all or any of these, nor is it prevented + from implementing other behaviour not listed here. Regardless of what optimisations a server implements, it SHOULD + provide a way for administrators to configure them, and MAY provide such configuration to users also (e.g., through an + ad-hoc command).

+
+
+ + +

If the server supports CSI, it advertises it in the stream features after the client has authenticated:

+ + + + + ]]> +
+ + +

A stream always begins in 'active' state. If a client wishes to inform the server that it has become inactive, + it sends an <inactive/> element in the 'urn:xmpp:csi:0' namespace:

+ + ]]> + +

As might be anticipated, when the client is active again it sends an <active/> element:

+ + ]]> + +

There is no reply from the server to either of these elements (though they may indirectly cause the server to + send stanzas, e.g., to update presence information when the client becomes active after a period of inactivity).

+
+
+ +

As this protocol is for indication only, clients MUST NOT make assumptions about how the server + will use the active/inactive state information.

+ +

The server MUST assume all clients to be in the 'active' state until the client indicates otherwise. Also the + CSI active/inactive state is unrelated to the user's presence, the server MUST treat the two independently.

+ +

This protocol is intended primarily for clients with human interaction. Due to the open-ended nature of + the possible optimisations implemented by the server, it may not be suitable for non-IM purposes where the + fully standard behaviour of XMPP is required.

+
+ +

To protect the privacy of users, servers MUST NOT reveal the clients active/inactive state to other + entities on the network.

+
+ +

This document requires no interaction with &IANA;.

+
+ +

This document requires no interaction with ®ISTRAR;.

+
+ + + + + + + + + + + + + + + + + ]]> + +
diff --git a/xep.ent b/xep.ent index 1e6c3deb..b304fb64 100644 --- a/xep.ent +++ b/xep.ent @@ -1332,4 +1332,4 @@ IANA Service Location Protocol, Version 2 (SLPv2) Templates Rayo Clustering (XEP-0349) XEP-0349: Rayo Clustering <http://xmpp.org/extensions/xep-0349.html>." > Data Forms Geolocation Element (XEP-0350) XEP-0350: Data Forms Geolocation Element <http://xmpp.org/extensions/xep-0350.html>." > Recipient Server Side Notifications Filtering (XEP-0351) XEP-0351: Recipient Server Side Notifications Filtering <http://xmpp.org/extensions/xep-0351.html>." > -Data Forms Geolocation Element (XEP-0350) XEP-0350: Data Forms Geolocation Element <http://xmpp.org/extensions/xep-0350.html>." > +Client State Indication (XEP-0352) XEP-0352: Client State Indication <http://xmpp.org/extensions/xep-0352.html>." >