[Summit] Mobile optimizations: presence queuing example

Jonas Lindberg jonasl at google.com
Wed Feb 10 12:22:43 CST 2010


Since there were a bunch of interest in mobile optimizations at the xmpp
summit, I'd like to share a simple presence queuing optimization available
in the Google Talk service. Hopefully those interested can play with this to
gain experience in how presence queuing affects battery life and use that
knowledge when designing future optimizations. This is not a standards
proposal of any sort.

The presence queue feature saves battery in two ways: (1) by queuing
presence going to the client and (2) by increasing the interval for
white-space pings sent from server to client.

Protocol example:

Client enables queuing:

   <iq from='node at domain/resource' type='set'>
     <query xmlns='google:queue'>

Server responds:

   <iq to=''node at domain/resource' type='result'/>

The possible 'commands' are:
<enable/>  -  enables presence queuing.
<disable/> -  disables presence queuing.
<flush/>   -  send all presence in queue to client.


 - Queued stanzas are presence available/unavailable. Presence subscribe,
message, iq etc are not queued.

 - Queue only keeps the last presence stanza for a given from-jid (i.e. full

 - There is a size limit for queue, when reached presence in queue is
flushed to the client.

 - When enabled, server-to-client white-space pinging is reduced to once
every ~30min.

Hopefully, some of you will find this helpful.

Jonas Lindberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/summit/attachments/20100210/2068f22a/attachment.htm>

More information about the Summit mailing list