In association with heise online

01 March 2013, 15:56

Twitter open sources Java streaming library Hosebird

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Twitter logo

Twitter has open sourced a Java library for its Streaming API. The Hosebird Client (hbc) supports OAuth and automatic reconnections with appropriate wait periods and Twitter says it has been "battle-tested in production" by its internal teams.

The library is in two parts: hbc-core and hbc-twitter4j. The hbc-core module pulls the actual messages from the API and implements a message queue that consumer applications can poll for tweets. The second module lets users plug the Twitter4J data model into the core library to parse tweets and display them in end-user applications.

Hosebird is able to use gzip compression and can access raw bytes payloads as well. Twitter also says that it provides "relevant statistics". The GitHub page for Hosebird includes instructions how to get started with the library. After setting up the connection information and creating a client to receive the messages with ClientBuilder, developers can receive a sample stream by compiling their example code with Maven and passing their access credentials and token to it. The README file on GitHub then goes into more detail on how to handle OAuth authentication correctly and how to work with and filter the firehose stream. Example code is also provided.

The Hosebird Client is released under the Apache 2.0 License and was authored by Steven Liu and Kevin Oliver.

(fab)

Print Version | Send by email | Permalink: http://h-online.com/-1814980
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit