Twitter Streams: a Glimpse of Future Realtime APIs?

Adam DuVander
Jul. 29 2010, 03:22PM EDT

Twitter has started early beta testing for a new User Streams API. Currently the service is just for desktop clients, but it could eventually fuel other types of applications that need access to data in realtime. Similarly, the stream concept may be one we see used by other services.

Twitter's Taylor Singletary described user streams in the mailing list announcement:

The Twitter Streaming API allows a desktop client to efficiently and instantly receive nearly all updates required to keep a display up-to-date... Several interesting new event types are available: Favoriting, retweeting, following, and list additions are also streamed along with direct messages, mentions, the user timeline and the home timeline.

In recent months, Twitter has been tweaking its APIs to match the use cases of its developers, as well as relieve stress on its servers. A way to stream everything of interest to a particular user is a continuation of that process. Currently, apps piece together what they need from a combination of the standard REST API, Search and the original stream API.

The streaming API is different than the other two in that it uses a persistent connection between an application and Twitter. The data flows more-or-less continuously. Twitter shares some streaming API tips for those new to the concept.

It's possible that this persistent connection--as has long been used in socket programming--could become the preferred method for web APIs, especially those with realtime data. Another potential approach is seen in PubSubHubbub, as used by the Google Buzz firehose.

Adam DuVander Hi! I'm Developer Communications Director for SendGrid and former Executive Editor of ProgrammableWeb. I currently serve as a Contributing Editor. If you have API news, or are interested in writing for ProgrammableWeb, please contact editor@programmableweb.com Though I'm a fan of anything API-related, my particular interest is in mapping. I've published a how-to book, Map Scripting 101, to get anyone started making maps on websites. In a not-so-distant past life I wrote for Wired and Webmonkey.

Comments

Comments(4)

User HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.