
Twitter API: With Great Power Comes Great Responsibility - ocskills
http://www.zetetic.net/blog/2009/04/09/twitter-api-with-great-power-comes-great-responsibility/
======
ryanwaggoner
_...with hundreds of millions of users and thousands of application and sites
using the Twitter API..._

Twitter doesn't have hundreds of millions of users.

------
andr
Summary: Twitter changed their API, we didn't check properly for duplicate
tweets and screwed up our database.

~~~
ocskills
You're misreading the article. The problem has to do with uncoordinated
breaking changes to a public API. There were no problems for our apps.

Let me draw an analogy: imagine that one day before release MySQL (or pick
your favorite DB) decided to deprecate and ignore the the greater than >
operator on queries. No errors - it would just pretend that query clause
didn't exist and return all rows for queries that used a >. How would that
affect your application?

The point is that when you expose a public API it becomes a contract with your
developer community. If you make a breaking change to the API you have a
fundamental responsibility to effectively communicate the change and ensure
that it doesn't create massive and unpredictable results for clients. In this
case Twitter didn't do either.

~~~
jrockway
_Let me draw an analogy: imagine that one day before release MySQL (or pick
your favorite DB) decided to deprecate and ignore the the greater than >
operator on queries. No errors - it would just pretend that query clause
didn't exist and return all rows for queries that used a >. How would that
affect your application?_

Well, most people would run their test suite, notice that MySQL broke, and
then revert that MySQL update. Completely different.

When you are accepting untrusted data from the Internet, you need to validate
it. If Twitter sends you invalid data, it is your loss, not theirs. Code
accordingly.

~~~
jdminhbg
I got bitten by this as well, even though I'm checking for duplicates like you
suggest -- it just jacked the total bandwidth usage way up, because calls
previously returning 1 or 2 messages were suddenly returning the max every
time.

