Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Poll vs. Push - Any reasons to avoid Push Notifications?

I just inherited an Android app project as a (technical) product manager that uses a 5 second timer to poll a remote URL to see if some work initiated by the app has finished. My initial reaction of course was to suggest to replace this with a push/notifications mechanism, preferably Android's built in GCM, so the work is removed from the app on the phone and put on the server side.

Surprisingly I met resistance from the development team. A former product manager (my predecessor) seems to have explicitly requested the implementation to work this way. Unfortunately, he wasn't big on documenting his decisions, so I now have to try to retrace which reasons could have led to this decision to justify a change in the implementation. I came up with the following pro and contra list:

Contra Push / Pro Poll

  1. -
  2. -
  3. Server side work needed to implement push notifications
  4. -
  5. No direct way to know if push notification was successfully delivered
  6. Scaling push notification delivery can be a pain

Pro Push / Contra Poll

  1. Work is removed from device
    • Lower bandwith usage
    • Lower battery usage
    • More responsive application and device
  2. Server load is lowered as devices don't poll every x seconds even if nothing changed (DDOS)
  3. -
  4. Push is faster (more responsive) than 5 seconds (current timer)
  5. Delivery proof of push notification is trivial to implement with a poll of a remote URL (here it makes sense)
  6. Scaling push notification delivery is a solved problem with lots of open source projects and trivial implementation with a message-queue

  • Are there any other reasons to avoid Push Notifications and use Polling for this usecase?
  • Are there any other reasons to avoid Polling and use Push Notifications for this usecase?
  • Any other important things I forgot?
like image 265
janpio Avatar asked Nov 16 '13 13:11

janpio


People also ask

Are push notifications harmful?

No, push notifications are not toxic, harmful, or spamming messages. When used correctly. However, they can become very much so. Especially if you don't know your way around these means of mass communication.

Do most people have push notifications off?

Why 60% of your users opt-out of push notifications, and what to do about it. In some product categories, over 60% of their users turn off push notifications. In others, a mere 20% do.

Why do users ignore notifications?

Remember, the reason why people mute notifications is because they're annoying. As we saw earlier, sending too many notifications in a week can be so annoying that it will cause people to stop using your app altogether.

Should you use push notifications?

Use push notifications to message your users when they might need a reminder about something. People find value in receiving push notifications that alert them of updates or changes to their upcoming travel plans, reservations, deliveries, and other time-sensitive topics.


1 Answers

No way to know if push notification was successfully delivered

Sure there is: have the device hit your server upon receipt of the push message. You might need to do that anyway, if the payload is bigger than 4K.

Scaling push notification delivery can be a pain

It works for fairly large user bases (e.g., RememberTheMilk), and that was even before the XMPP based persistent socket solution.

Are there any other reasons to avoid Push Notifications and use Polling for this usecase?

GCM has no service level guarantee. GCM is Android-specific; you might consider a wrapper around it, like Amazon SNS, if you are looking for something that will handle other client operating systems. Push solutions involving third parties, like Google, means that your raw push message payload will be visible to those third parties' servers; please use suitable app-level encryption if this is a concern (and it should be).

Are there any other reasons to avoid Polling and use Push Notifications for this usecase?

A five-second poll makes $BABY_DEITY cry.

like image 63
CommonsWare Avatar answered Sep 20 '22 07:09

CommonsWare