Twitter Streams: a Glimpse of Future Realtime APIs?

Adam DuVander, July 29th, 2010

TwitterTwitter 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.

Both comments and pings are currently closed.

4 Responses to “Twitter Streams: a Glimpse of Future Realtime APIs?”

August 12th, 2010
at 5:16 pm
Comment by: Twitter Search History Dwindling, Now at Four Days

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

September 2nd, 2010
at 8:03 am
Comment by: Twitter Opens the Floodgates, Slightly

[...] 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 [...]

October 15th, 2010
at 1:02 pm
Comment by: Twitter Tip: Email Notifications for @replies //

[...] 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 [...]

November 10th, 2010
at 8:52 pm
Comment by: Twitter Goes JSON-Only With One API, More to Come?

[...] 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 [...]

Follow the PW team on Twitter

APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.