In the past I’ve covered extensively NoSQL-based Twitter apps — since that post I’ve added some more: here, here and here — but interestingly enough not many of these where using CouchDB, the NoSQL database for the web that recently released its 1.0 version.
Things can definitely change after reading the article written by Mark Headd explaining what makes CouchDB a perfect fit for Twitter applications:
- You interact with a CouchDB instance the same way that you interact with the Twitter API — by making HTTP calls. This can help keep the code for your application clean and simple, and provides lots of opportunities for code reuse within your application.
- The structure of documents in CouchDB are JSON, which is one of the formats returned from the Twitter API when searching for Tweets (or “status objects” in Twitter parlance).
- Documents in a CouchDB database are assigned a globally unique ID — it’s how documents are distinguished from one another. Twitter also uses unique identifiers for status objects, so using the ID of a Twitter status object as the ID for a document in CouchDB makes life pretty easy for a Twitter app developer.
While not directly related to this, there’s also another connection between CouchDB and Twitter: Gizzard framework can be used for scaling CouchDB.