Search code examples
long-pollingmqttgprs

MQTT long polling over GPRS/HSDPA


I'd like to use MQTT to send control information to a device, but I'm concerned that leaving the MQTT client and cell data connection up (basically in long-polling mode) is somehow bad. Either from a data charges, network usage, battery life, or some other aspect?

Another approach might be to send an SMS to the device when it has a message to pick up - but that seems to defeat the purpose of MQTT and also introduces a long delay while dialing and setting up the GPRS connection.

Is there any reason I should be concerned on this approach?


Solution

  • I think this approach is quite valid - think of it this way: Your App's long polling transfers a very small volume of data, as long as it just polls, so

    • the data usage should be miniscule
    • the battery is impacted only for the data sent in addition to the keepalive, which is at least an order of magnitude higher than the long polling
    • as a reference: ActiveSync, which runs all the time, is nothing else than a fancy form of long polling