Welcome to EMC Consulting Blogs Sign in | Join | Help

SSIS Junkie

Tweetpoll – My first Windows Azure application is live


My first Windows Azure app is (at the time of writing) up and running at http://tweetpoll.cloudapp.net/. I’ve not built it to provide anything particularly useful but what it does do is demonstrate the capabilities of Windows Azure storage, web roles and worker roles and has afforded me the opportunity to get my hands dirty with Windows Azure, something I’ve been meaning to do for quite a while. The source code is available at http://tweetpoll.codeplex.com.

What does it do?

Very simply, the application displays the distribution of the lengths of Twitter statuses (“tweets”) from Twitter’s public timeline. Here’s a screenshot of that display:

image Unsurprisingly 140 is the most common length for a Tweet however it seems that there are a great number in the 40-80 character range as well. It’ll be interesting to see if the graph smoothes out over time.

The web page front-ending the application also does a few ancillary things:

  • Displays the total number of tweets that the application has fetched
  • Displays a sample of messages currently residing on the application’s queue (more on the queue later)
  • Displays the number of times that the web page has been accessed

TweetPoll won’t be available forever, I suspect that the moment Microsoft start charging for hosting on Azure that I’ll take it down but in the meantime feel free to stare transfixed as the numbers twitch before your very eyes!!!! Great fun I’m sure you’ll agree!!!

How does it do it?

My application consists of a worker role and a web role. The worker role has responsibility for:

  • Polling Twitter’s public timeline for the 20 most recent tweets
  • Pushing a message onto an Azure queue for each tweet
  • Popping a message from the head the Azure queue
  • Calculating the length of the tweet in the popped message
  • Incrementing the counter for that particular Tweet length which is persisted in an Azure table

The web role has responsibility for:

Here is an architecture diagram that depicts the whole system:

imageIt is of course totally unnecessary for one thread to push a message onto a queue just for another to pop it off again but this isn’t meant to be a real-world scenario; I just wanted to use as many pieces of Azure as possible.

Under the covers I used the Storage Client sample code from the Azure SDK which made interacting with Azure storage rather simple.

Thanks go to…

Howard van Rooijen for pointing me at Flot, a Javascript graphing engine.

John O’Brien for his rather spiffing Azure Queue watcher gadget for Windows Sidebar which polls an Azure queue to detect the number of messages and which helped me immensely during development.


Its also quite gratifying to deploy your app to the cloud, set it running, and watch as the gadget starts ticking over as messages are pushed on and popped off.


That’s it. I hope the source code up on Codeplex helps anyone else that may be venturing into the world of Azure development. Any questions, just ask!


Published Wednesday, May 06, 2009 2:41 PM by jamie.thomson
Filed under: , ,



Dew Drop - May 7, 2009 | Alvin Ashcraft's Morning Dew said:

May 7, 2009 1:52 PM

SSIS Junkie said:

Two days ago I blogged about my first Windows Azure application Tweetpoll that I set into motion sometime

May 8, 2009 3:52 PM

SSIS Junkie said:

Applications hosted on Windows Azure will create log files and given that we don’t have access to the

May 14, 2009 1:39 PM

SSIS Junkie said:

I’ve just read a mildly interesting article The Twitpocalypse is Near: Will Your Twitter Client Survive?

June 9, 2009 10:31 AM

SSIS Junkie said:

Just lately I’ve been doing a lot of messing around with Windows Azure the main focus of which has been

June 29, 2009 2:29 PM

SSIS Junkie said:

Since I started dealing with Azure tables I’ve become frustrated that there is no ad-hoc query tool,

July 6, 2009 4:51 PM
New Comments to this post are disabled

This Blog


Powered by Community Server (Personal Edition), by Telligent Systems