PubNub is optimized for mobile devices, providing more functionality (e.g. catch-up on messages when moving between cell towers or to/from Wi-Fi) and deployed more economically, compared to alternative or self-hosted solutions.
Battery savings are achieved via an uncommonly long keep-alive connection that is set to one hour. A ping is sent every 300 seconds (5 minutes), long enough to provide the best mix between mobile performance and economical battery usage. PubNub also selects the best transport for your device automatically. Battery saving tips with PubNub on mobile devices include:
- Keeping messages as small as possible (compacting).
- Sending fewer messages by aggregating payloads.
- Multiple channels over a single connection with Stream Filtering