Twitter app development best practices?

To name a few.

  • Aggressive caching. Don't call out to the API unless you have to.
    • I generally pull down as much data as I can upfront and store it somewhere. Then I operate off the local store until it runs out and needs to be refreshed.
  • Avoid doing things in real time. Queue up requests and make them on a timer.
    • If you're on Linux, cronjobs are the easiest way to do this.
  • Combine requests as much as possible.

Well you have 100 requests per hour, so the question is how do you balance it between the various types of requests. I think the best option is the way is how TweetDeck which allows you to set the percentage and saves the rest of the % for posting (because that is important too): alt text
(source: livefilestore.com)

Around the caching a database would be good, and I would ignore deleted ones - once you have downloaded the tweet it doesn't matter if it was deleted. If you wanted to, you could in theory just try to open the page with the tweet and if you get a 404 then it's been deleted. That means no cost against the API.

Tags:

Twitter