投票与推送 - 任何理由,以避免推送通知? [英] Poll vs. Push - Any reasons to avoid Push Notifications?

查看:267
本文介绍了投票与推送 - 任何理由,以避免推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚继承了使用的 5秒计时器轮询远程URL 的,看是否通过应用程序启动的一些工作已经完成了一个Android应用程序项目作为一个(技术)产品经理。我最初的当然反应是建议的与推/通知机制的替换此,preferably的Andr​​oid内置的GCM,所以工作是从手机上的应用程序中删除,并把服务器上一面。

令人惊讶的我遇到阻力来自开发团队。一位前产品经理(我的predecessor)似乎有明确要求的实施,这种方式工作。不幸的是,他不是大是记录他的决定,所以我现在必须尝试追溯其原因可能导致这一决定的理由,在实施变革。我想出了以下亲和禁忌清单:

魂斗罗推/ Pro的投票

  1. -
  2. -
  3. 来实现推送通知需要服务器端工作
  4. -
  5. 在没有直接的办法知道是否推送通知已成功传递
  6. 在缩放推送通知交付可以是一个痛苦

临推/孔特拉投票

  1. 工作是从设备中删除
    • 在低带宽的使用
    • 下电池使用
    • 更多敏感应用程序和设备
  2. 在服务器负载下降的设备不会轮询每x秒,即使没有发生任何变化(DDOS)
  3. -
  4. 在推速度更快(更敏感)超过5秒(当前定时器)
  5. 的推送通知交付证明是微不足道的实施与远程URL的民意调查(这是有道理的)
  6. 在缩放推送通知交付是一个解决的问题有很多开源项目和琐碎的实施与消息队列

  • 还有没有其他的原因,以避免推送通知,并使用轮询这个用例?
  • 还有没有其他的原因,以避免轮询和使用推送通知这个用例?
  • 在任何其他重要的东西我忘了吗?
解决方案
  

没有办法知道是否推送通知已成功传递

当然有:有设备在接收到推送消息的打你的服务器。你可能需要做的是,无论如何,如果有效载荷大于4K。

  

缩放推送通知交付可以是一个痛苦

它适用于相当大的用户群(如RememberTheMilk),那就是即使是基于XMPP持久套接字解决方案之前。

  

还有没有其他的原因,以避免推送通知,并使用轮询这个用例?

GCM没有服务等级保证。 GCM的是Android专用的;你可能会考虑一个包装周围,如Amazon SNS,如果你正在寻找的东西,将处理其他客户端操作系统。按涉及第三方,如谷歌,意味着你的原始推送消息的有效载荷将是可见的那些第三方的服务器解决方案;请用适当的应用程序级加密,如果这是一个问题(应该是)。

  

还有没有其他的原因,以避免轮询和使用推送通知这个用例?

一个五秒钟的民意调查,使 $ BABY_DEITY 哭了。

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?

解决方案

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.

这篇关于投票与推送 - 任何理由,以避免推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆