避免对 Heroku 和 Google App Engine 等服务进行轮询?
我不认为有办法做到这一点,但我想我想看看人们使用什么解决方法来避免对 Heroku 和/或 GAE 进行轮询。
您如何从这些应用程序中实时发送通知?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我不认为有办法做到这一点,但我想我想看看人们使用什么解决方法来避免对 Heroku 和/或 GAE 进行轮询。
您如何从这些应用程序中实时发送通知?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
GAE 可以使用以下其中一项来通知另一个系统:
GAE can use one of the following to notify another system:
使用 Heroku 的新 Cedar 堆栈,您可以进行长轮询。
有一个链接到一些 长轮询示例代码位于此处。
With Heroku's new Cedar stack you can do long polling.
There's a link to some long polling example code here.
正如 @dar 提到的,您可以使用 PubSubHubbub 进行实时通知,无需轮询。 Nick Johnson 有一个关于使用现有的优秀教程 PubSubHubbub 服务器,甚至在您的应用程序中包含一个服务器。
这将使您可以实时发布提要并订阅它们,而无需轮询。
As @dar mentions, you can use PubSubHubbub to do realtime notification without polling. Nick Johnson has an excellent tutorial on using an existing PubSubHubbub server, or even including a server with your application.
This will let you publish feeds and subscribe to them in realtime without polling.