This Is Nowhere: The Server Side
Oct 15, 2021 20:40

Pretty early on in the planning stages for This Is Nowhere, it was clear that it would be a client-server system. Web or mobile app clients would check in with a central server for authentication as well as to get the latest updated version of the content. We'd also need to keep track of where the audience members were headed, to ensure we didn't break capacity limits for some of the venues.

Early on, I had considered having all of the data stored locally in the app, but it became pretty clear that the content would be constantly evolving and changing throughout the process, and up to the last minute. Instead, this project would need a server-hosted content management system to specify all the details about the locations and their related stories.

While many aspects of the client side of things were going to be new technologies for me, such as Swift and React Native, the server side would be something of a relief, built in technologies I’ve been working with for many years: a Ruby on Rails app with a PostgresSQL back-end and hosted on Heroku.

Rails lets you build and modify full featured web apps quickly and cleanly. It’s been my tool of choice and sometimes secret weapon in my freelance work for over a decade now. Data listings and forms are easy to set up. Most importantly for this project, it lets you describe complex data models with just a few lines of code. Outputting simple data in JSON format only takes a “.to_json” method, while complex data can be handled with a fairly simple description file.

Heroku is a cloud-based hosting platform I use for all of my Rails projects. Launching a new project on Heroku from scratch takes only a few minutes. Scaling on Heroku is a simple matter of moving a slider and picking from a menu on a web interface, or running a single line in a terminal.

The great thing with using Heroku for a theatre project is that it tracks billing by the minute. When we only have a handful of people working on the content or testing the client apps, I could run it on a single inexpensive instance for about $7 a month. When time came for the live show with hundreds of people hitting it in real time, I could ramp it up to multiple monster dedicated multicore servers to deal with the traffic - BUT ONLY FOR THE FEW HOURS OF THE SHOW and then dial it back to the base level again afterwards.

This heavy capacity would normally cost thousands of dollars per month - but for just five “shows” of about four hours each, the total hosting cost was about $30 - less than a round of drinks at the closing party.

It was fun to turn up the dial to ludicrous power even if just for a little while.