It was in my first topcoder development challenge and it is basically a tutorial challenge where we needed to install HPVertica DB, capture a ton of tweets based on cash tag $HPQ, and use the HP Idol, which has an API to perform sentiment analysis for tweet content.

With that in mind I decided to start this challenge with Play Framework to learn a little bit and see how fast I could create this WebApp from scratch without know the tool. I took about 1 and half week to build and document all the stuff.

Play framework is a very powerful framework in which you can easily plug different technologies and libs and keep focused in the development. It provides you a sort of minimum viable architecture for your app.

In addition, another reason to choose this technology is because I could use Java and it was one of the requirements for the challenge.

I use Akka tool kit to orchestrate the messages received from Twitter Stream API and results obtained from Twitter Search API, to parse and send the info to HP Idol Sentiment Analysis API.

The Redis was crucial to keep the results in queues in order to avoid flooding the HP API. HP Vertica DB was pretty easy to install because I followed a tutorial which created the models for me.

Also I created a pub-sub on redis, so each new client connected to my app would open a web socket connection with my backend and subscribe a redis channel in which I published all the results returned by HP API, the results with the sentiment score.

The front-end I decided to use highcharts because it provides a rich set of charts and they look awesome. So I created 3 charts. 1 for real time results, 1 for historical results and another with some statistics about which % of captured tweets were positive, negative or neutral.

It was a pretty nice challenge, I got the first place with my solution and won $1800 :D

Built With

Share this project:

Updates