4 ms·
> 1. XMPP is not battery-friendly on mobile devices (this primarily has/had to do with the absence of push notifications, it seems). I do use XMPP in a mobile
by Flowdalic 11y ago
> 1. XMPP is not battery-friendly on mobile devices (this primarily has/had to do with the absence of push notifications, it seems).
I do use XMPP in a mobile environment without any noticeable impact on battery runtime. It's not the protocol which drains your battery, but how one uses it: If there is frequent activity in terms of XMPP stanzas being exchanged between your device and the device's XMPP server, then the device will be unable to e.g. put the radio to sleep. Which, in turn, is of course causing battery drain.
The golden rules to prevent that:
1. Only send XMPP stanzas when necessary
2. Bundle and defer outgoing stanzas if possible
3. Tell your XMPP service when the device is inactive, so that the service is able to optimize the traffic (XEP-352: Client State Indiation [1])
4. Consider service-side stanza blocking (e.g. XEP-16: Privacy Lists) for stanzas of "unknown" origin to prevent malicious users from draining your battery.
1: https://xmpp.org/extensions/xep-0352.html https://xmpp.org/extensions/xep-0352.html
- joepie91_ 11y agoWhat are your thoughts on http://op-co.de/blog/posts/mobile_xmpp_in_2014/ http://op-co.de/blog/posts/mobile_xmpp_in_2014/ ?
- Flowdalic 11y agotl;dr It's being worked on (or already solved), but I'm sure the XMPP community welcomes additional contributors. 1-3. Could be solved with upcoming versions of XEP-313 MAM. 4. e2e There is currently a XSF GSOC project running, bringing axolotl to Conversations (and eventually describing the protocol as an XEP). 5. There are a few standards on how to perform encrypted file transfers, but implementations are lacking. You are invited to code one. 6. XEP-357: https://xmpp.org/extensions/xep-0357.html https://xmpp.org/extensions/xep-0357.html