Saturday, April 18, 2009

Metra-Twitter Service Now Running on Google App Engine

When I first put together my Metra delay service on Twitter, I didn't think it would see a wide audience; I expected myself and maybe a few friends to take advantage of it. I certainly didn't foresee the media attention the feeds generated:

CBS2 Morning Show

Usage quickly spiked after these stories ran -- there are about 1200 people following the Metra feeds at this point. The only problem was that it was running on my personal computer. If I needed to reboot or experienced an internet outage, no updates were posted.

In an effort to make the service more robust, I decided to port to Google App Engine, which allows developers to create applications that run on Google infrastructure. App Engine has been around for about a year, but my Twitter app couldn't run there until a couple weeks ago, when the App Engine team unveiled Scheduled Tasks. This feature allows me to run my regular scans over Metra's delay info, and post the relevant material to Twitter.

All in all, porting to App Engine was a great experience. It's a very straightforward, developer-friendly environment, and I had fun doing it. And now I can turn off my computer again. :P

Monday, February 23, 2009

Metra Service Updates via Twitter

Winter in Chicago is still going strong, and nothing can be worse than standing in the cold, waiting for the Metra train that should have arrived 20 minutes ago. Although Metra makes delay information available via http://www.metrarail.com/Service_Updates/, it can be hard to remember to check before heading out in the morning.

I spent a couple hours coding with the python-twitter API last week, and now you can take advantage of
Twitter to keep track of Metra and get updates on your mobile device. Keep up with all delays by following @metradelays, or just monitor your own line with:

Union Pacific North:
@metraUPN
Union Pacific Northwest:
@metraUPNW
Union Pacific West:
@metraUPW

Milwaukee District North:
@metramdn
Milwaukee District West:
@metraMDW

North Central:
@metranc
Burlington Northern SF:
@metrabnsf

Heritage Corridor:
@metraHC
Rock Island District:
@metrari

Southwest Line: @metrasw
Electric Line:
@metrae


Happy commuting!