开发者

Avoiding polling on services like Heroku and Google App Engine?

I do not think there's a way to do this but I thought I'd ask to see what workarounds p开发者_Go百科eople are using to avoid polling on Heroku and/or GAE.

How are you sending out notifications in somewhat real-time from these apps?


GAE can use one of the following to notify another system:

  • xmpp
  • urlfetch to a callback url
    • like to pubsubhubbub
  • send email


With Heroku's new Cedar stack you can do long polling.

There's a link to some long polling example code here.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜