Twitter Streams: a Glimpse of Future Realtime APIs?

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.

Be sure to read the next Real Time article: Real-time News Reader Shows Off Push-to-Browser


Comments (4)

[...] couple minutes. (In most cases, it might even be faster than your Twitter client if it’s not Real-Time APIed yet and set to poll every 5+ minutes.) Google Alerts Updates Email are clean, fast, and [...]

[...] streams, which we’ve covered previously, are a “push” technology. Rather than an application polling for the latest data, it [...]

[...] called these newer streaming APIs a glimpse of the future of real-time. It seems that future may not have XML. After all, JSON is the developer’s choice. Related [...]

[...] app will need to do is listen out for updates, queue them and process when ready. Twitter’s user stream API is also currently in beta, with desktop-only clients for [...]