开发者

Using Twitter to propogate status of a web app

I'm building a web app that many people will be using at the same time. I have a requirement that whenever one user has a significant event (like winning a game), information about it is sent to all of the other users. Not for them to do anything about it, just to allow them to see a running list of coo开发者_如何学Pythonl stuff that's happening. I imagine that these significant events will happen at a rate of about twice a minute for the entire system.

I was thinking about all of the server resources and code that would be needed to support this, and then I suddenly thought I could simply do this with Twitter. Every time a significant event happened our server could send out a tweet about it, and each page of the web app could include a little javascript widget that displayed all of these tweets. As an added bonus, people who just wanted to follow what was going on with the app could do so with a simple Twitter client.

Before I go too deeply into this, I wanted to hear some feedback on whether you think this is a good idea or not. What sorts of things should I be looking at to do this right?


Two issues I see:

  1. You will wind up rate limited if your app sends out too many tweets in a short period. You get 350 OAuth calls per hour.
  2. You'd be relying on the Twitter API, which can be shaky at times. If this is critical to your app, you'd be better off handing it yourself.


Why not use an RSS feed instead?

Non-proprietary, unlimited, fully controlled by you, potential for more than 140chars, probably easier to code and almost definitely easier to maintain as the API won't change when you least expect it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜