views:

232

answers:

2

Hello,

I want to develop a web application that uses the Twitter API. Before going any further there are some questions that require answer:

  1. Should I store on my server the list of followers/following or should I query the API each time?
  2. Same as 1 but for tweets instead of people.
  3. If I store messages in my application, search should be performed on the local database or using the API?

Mostly sure unimportant details: ASP.NET (MVC?) and MSSQL will be used.

+1  A: 

Roughly, this can help you to make a decision:

  • Can your application run even if that API server is down or do you have any API call count limit?

If you answer "Yes" to any of this questions, cache that information.

Rubens Farias
I know there is a limit to the number of GETs/hour. In the current stage is not known if the limit will be reached often. BTW how is the API uptime?
Victor Hurdugaci
If you app needs to display data, even when you API server is down, you'll need to store data to display when this happens
Rubens Farias
+3  A: 

i would use the api, and if you find the app is pulling data slowly or you're running into limits, cache some of the results in the session (like the followers list could be cached and refreshed if it's more than 10 minutes old). you could also put the cache in mssql if you need even greater persistence.

System.Web.Caching.Cache is useful for that...

the twitter search api has a lot of options and can search through wider time ranges, so i would use that.

TweetSharp is an easy-to-use twitter api for .net that simplifies a lot of the operations:

http://tweetsharp.com/

jspcal
Thank you! Will take a look at tweetsharp
Victor Hurdugaci

related questions