Serverless Tech, Sports Radio and Sports Data

4 minute read Published:

I am a huge fan of Chicago sports, with an affinity for the Chicago White Sox, even though I grew up in the Northwest suburbs surrounded by Cubs fans. Unlike the stereotypes of Chicago baseball fans, I have no angst for the Northsiders. In fact, until the Sox decided to do their own rebuild, I was jealous of the Cubs and their ability to build a club that will have multiple years - if not decades - of success. Working in a technology field, I am afforded time during the day to listen to sports radio, which scratches my itch for the love of Chicago sports. I could write a whole separate blog post how Dan McNeil - a polarizing radio personality - got me into sports radio as a very impressionable 22 year old when he started hosting the mid-day show with Matt Spiegel on 670 the Score the summer of 2009. Spending my time as a summer intern, developing an internal web based tool on the Microsoft stack, listening to McNeil and Spiegel daily built a foundation for my sports radio fandom. While I do not get to listen as consistently in the past, I tune in to as much of the mid-day show on 670 the Score, which is now hosted by Matt Spiegel and Danny Parkins.

Near the end of February, there was a discussion between Spiegel and Parkins about one of the World Series legends for the 2016 Chicago Cubs - Kyle Schaweber. He primarily plays in left field but Joe Maddon, the Cubs manager, who likes to put players in different positions to keep them fresh and have options to change the lineup. Schwarber has a history of being a catcher in addition to playing the outfield which prompted the discussion - how many innings will Kyle Schwarber play as a catcher on the 2017 season? There was some back and forth banter and eventually an over/under 39.1 innings was set. While I was enjoying the conversation, my mind was racing with thoughts of how I could track this stat, along with many others, using technology. I ended up texting the show saying “You all should come up with a bunch of bets and I’ll create a website to track it”. To my surprise, Spiegel texted me back saying he likes the idea and asked me to email him. I’ll save the rest of that story for another time and get to the point - Spiegel and Parkins Bets was born. With an extremely tight deadline at the end of March, I created the website for listeners to enter in 25 Cubs and Sox “wagers”, which could mostly be tracked with available public APIs. When I closed the entries, there were a little over 1800 listeners who participated. Along with the hosts, I was super pleased and surprised by the amount of participation. Next step for this was to create a leaderboard to track how the listeners perform against others. I knew this could be done in a somewhat-automatic way but like most things, it would take time to develop. I was doing this for fun to explore new technology and mix in sports data. Currently, I track the results with a manual Python process. I am now working on moving this process to be fully automated and serverless by using Google Cloud Functions.

My first exposure to Google Cloud Platform was at my employer Aptitive. Google has been working on joining the cloud space dominated by Amazon. We at Aptitive are really into what Google is offering with their cloud platform, prompting us to join them as a certified Google Cloud partner. As I was thinking of the many different ways to have a daily update of users scores from the previous baseball day baseball game, I thought I should try the new and cool serverless technologies. There are many little small steps necessary to get updated stats, perfect for the function approach.

I am going to document my process of using Google Cloud Functions to get data changed. This will be fun since cloud functions are still in beta with Google and only support NodeJS. I have heard rumors they will support other languages (certainly Go!) as the product matures, which I hope - well really assume - is true. Stay tuned, as next I will outline the technical architecture of the site.