As I’ve been working on my current animation-web-photo-what have you thesis project, I’ve spent more time than usual researching tech solutions. This has been something of a luxury as I’ve had the opportunity to experiment with a number of languages and frameworks that I normally don’t get the opportunity to use. On the other hand, it’s also been a struggle for me to choose the tool best suited for the job, because as anyone who codes knows, it’s the worst feeling in the world to be knee deep in one platform and come up against a major structural incompatibility with a core aspect of your project.
When I began this project I knew I wanted to build an interactive animation that changed based on an automated analysis of online user-generated text. Based on my previous animation experiments, I wanted the animation itself to be combination of traditional 2-d frame animation and composited photographs. I knew a little about developing web apps and natural language processing, but hoped the details of the project would develop as I learned more about the technology.
Because of the text analysis functionality, I decided that python was a good choice for a core language. Python also has a number of libraries that allow it to interface pretty easily with the Flickr api and Flickr was where I had decided to pull images and text from.
I first experimented with Google App engine’s SDK for python, mainly because it was free. I was pleased with it at first, but soon became frustrated because I kept having to modify all of my python libraries to run correctly with the weird version of Python that app engine utilizes. I gave up and decided to build the back end of my site as a stand-alone install of Django on Apache with a PostgreSQL database. So far I’ve been really pleased with this choice. Aside from a bit of a hang-up in I encountered in efficiently serving static media, Django has really impressed me with its well-designed, easy to use data structure and accessible learning curve. (I know I’m late to the game in this regard, but I’ve already decided to run it as the back end for a number of my other projects after this one is wrapped up.)
In terms of hosting, for a while I was messing with Amazon’s EC2, but have since switched over to Webfaction. I think it was the right choice, as EC2 was a bit too barebones for someone with no experience in server administration. (I now know why sysadmins are so justifiably grumpy all of the time; their job is very, very difficult and they deserve far more appreciation than they receive.) I’m still using EC2 instances to run some topic modeling scripts real-quick-like, but all real-time processing functionality has been transferred to Webfaction. Once I was on Webfaction, it was a snap to install all of the natural language processing python libraries I needed (NLTK and Gensim) and their dependencies and get back to work.
Coming next, Part 2: Building an online animation engine wherein I sacrifice all developer cred and choose flash.