Experimenting with Twitter
Not long after the Virginia Tech shootings there was an article on the College Web Editor blog asking if Twitter could be used for emergency communications. I argued that this would be a poor use of Twitter and of campus resources in a situation where resources are critical. I still stand by my reasoning for that particular use of Twitter. That isn’t to say that I don’t think that Twitter can’t be used on campus; I’ve been experimenting a tiny bit this week with something that I think Twitter is actually good at, disseminating casual information to those that decide they want it.
So, my little experiment is to send portal usage stats out via Twitter. The updates are sent every two hours between 8am and 6pm, Monday through Friday. Thank you, cron! There are so many moving parts in this that I’m tempted to fire up OmniGraffle to illustrate it, but I’ll try with just words and see how it goes.
The portal has multiple servers running behind the scenes so that we can deal with lots of traffic. Each of these servers have their own set of user sessions. We can query these servers for their session information, and we do this every 5 minutes and stick the information in a database (thank you perl and mysql). We have another internal system that allows us to graph and browse this data, which is incredibly helpful in looking for usage trends. I wrote a small ruby script that uses the Twitter gem written by John Nunemaker to query the stats database and then post the information to Twitter. Scott was even so kind as to place a Wordpress widget in our theme (top right) to show the information pulled directly from Twitter.
Now, some might call this a frivolous exercise but that would be ignoring the fact that we have to push a lot of information around campus and we need to be looking more at using proper APIs and not just don’t batch dumps of data to be imported by some other system. Our systems need to talk, and more importantly listen to what other systems are saying.

