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

后端 未结 1 1510
暗喜
暗喜 2021-02-04 13:19

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 fi

相关标签:
1条回答
  • 2021-02-04 13:32

    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.

    0 讨论(0)
提交回复
热议问题