Nginx, uWSGI, and web.py…and my new job
This past week I started a new job at Local Projects. I'm really excited about working with all the talented people there. One of the fun things about the job so far is that I'm doing a bunch of Python development with web.py. It's a great minimal web framework and working with Python has been great as well.
One of the things I wanted to do this weekend was to figure out how to run a web.py app with nginx and uWSGI. It took me ages to figure it out, but I finally got a working setup. This post is mostly to document the few things that made the difference.
First thing to note is that I did this all on a micro instance of Ubuntu 11.04 on EC2 (ami-1aad5273). Second, I installed the lastest versions of nginx and uWSGI from source. The following gist lists examples of the files I used to get this running. I should note that the config and .sh files are intended for running one server and one web.py application.
Quick Update
Howdy, everyone. It's been ages since I've written on this thing so I wanted to give you an update on what I've been up to.
Over the past summer and fall I had been working on a large project for a client that I, unfortunately, can't mention. I may not ever be able to mention it. The project itself was pretty cool. It was a product configuration application. The front end was built with Flash using Robotlegs as the core architecture. On the backend there was two systems. The application model was tied in with Magento and all data was accessed using AMF. I didn't build or maintain that bit, but I had the pleasure of working with Adil Hashem on that piece.
The other backend system was a Java image compositor. The image compositor already existed but it needed a different implementation for the application to scale. With the image compositor being written in Java I took the opportunity to get into Java web development. I spent a good couple of weeks getting into Spring Framework and its Web MVC component. I also started exploring usage of MongoDB for basic statistical tracking but in the end went with Amazon's SimpleDB for ease of use and to minimize future IT needs. The whole image compositor is hosted and supported with various Amazon web services including EC2, S3, and CloudFront. I also set up a pretty snazzy automated deployment process with Ant.
The product configuration application was just one part of a bigger project. My app was pretty much in order but a combination of problems from all sorts of sources caused the project to stagger and eventually the project abruptly ended. I wont go into anything beyond that because it doesn't really matter. I was certainly bummed out when I found out the project would never see the light of day. However, the positive side is that I learned a whole bunch of new stuff. I'm really stoked on Spring and MongoDB lately. I can whip up backend prototypes so quickly with those two pieces of software and Morphia which is a document mapper for Java.
After work for me stopped on that project I started getting into Android game development a bit. It was fun for a while but I eventually decided that I had been at Rokkan for long enough. Nearly 5 and a half years after I came to New York City to work for them I finally felt the need to move on. I interviewed at a bunch of places and I ended up taking a job at Syrup. Syrup is essentially a full blown advertising agency but they're quite small considering how much they do. They do broadcast, print, and digital. They brought me on as their CTO to help boost their digital offering. I'm working with some really creative people and its been awesome so far.
That's all for now. I'm hoping to get back into blogging a bit. I'm still trying to prototype ideas and I hope to share some of the things I run into along the way. Perhaps I'll write a post on Spring and MongoDB next. Who knows...until then, happy coding.
Great BitmapData Usage Example: messmaker.com
Here's a great example of a site that allows the user to create a custom composition by using a butt load of animated bitmap assets. I'm quite impressed, one of the most solid executions of this technique I've seen in a while. Not to mention Harry is a great little character to have as a host.
MSPCA Walk Boston
Assuming Boston doesn't get rocked by a tropical storm on Sunday, I'll be walking in the MSPCA / Angell Walk for Animals. I'm walking with the BeerAdvocate team. If you're also walking in this event, please say hello. If you'd like to sponsor me to the tune of, any donations are welcome and appreciated.
Ah, the North East.
I took a screen-cap of this yesterday... Thought it was funny/depressing. From the looks of it, everyone on the East Coast and parts of the Mid West are getting hammered by thunderstorms daily.
