Mobile Optimzations for XMPP Servers

With XMPP being available on mobile devices, it stands to reason that clients will have their own ways to reduce battery, network usage, and create a better user experience.  Some will ignore presence stanzas while asleep, while others will only deliver certain stanza types while idle.  However, optimizations for mobile devices don’t have to be limited to client programs.  Servers too can provide logic that helps to improve mobile client usage as well, and Tigase has a few strategies built right in.  Let’s take a look at them.

Previously, Tigase implemented custom IQ stanzas, which when sent to the server would change the way the server sends (or does not send) stanzas to the requesting user.  This behavior would then be applied to the requesting JID until it was deactivated.

<iq type="set" id="aa1ad">
     <mobile  xmlns="http://tigase.org/protocol/mobile#v1"  enable="true"/>
</iq>

This would enable Mobilev1 queuing for the sending server.  3 different algorithms were included with Tigase:

- V1 which would hold all stanzas in a queue

- V2 which would only keep the last presence from each source in queue

- V3 which would do the same as V2, but also queue message carbons

These could be enabled or disabled VIA the plugins section of the init.properties file.

--sm-plugins=+mobile_v1

Most recently, Tigase has enabled support for XEP-0352 Client State Indication, and is turned on by default.  Now these plugins can be activated using a standardized stanza.

<inactive xmlns='urn:xmpp:csi:0'/>

By default, the V2 algorithm dictates the server’s behavior, which will only keep the last presence stanza in queue from users.  This reduces the number of stanzas sent to the client when they become active again.

If you want to change the queuing algorithm, this is now set by configuring sess-man in init.properties.

sess-man/plugins-conf/urn\:xmpp\:csi\:0/logic=tigase.xmpp.impl.MobileV1

Mobile v3 plugin currently cannot work with XEP-0352 however, so you are limited to V1 or V2.

However implemented, these strategies can drastically reduce the amount of traffic sent to idle devices, enabling mobile clients to still be connected in real-time without an undue drain on battery and bandwidth resources.

For more details on settings see http://docs.tigase.org/tigase-server/snapshot/Administration_Guide/html/#sessMan

 

 

Get in touch

We provide software products, consulting and custom development services

Tigase, Inc.
100 Pine Street, Suite 1250
San Francisco, CA 94111, USA
Phone: (415) 315 9771

Follow us on:

Twitter

  • Tigase XMPP Server v7.1.2 Has been Released! This is a maintenance release for v7.1 and derivatives. Details here: https://t.co/oczXeZeYFH 6 days 18 hours ago
  • Are you using Tigase XMPP Server? Use to let the world know. Want to be featured user? PM us! 1 week 4 days ago
Back to Top