A little information the app side of Green Up VT
It's no secret that I've blogged about the Green Up App a couple times before. Myself and the rest of the XenonApps crew had quite the weekend. After contacting the Green Up Organization we started to get some press in the local news about it. It was pretty exciting, and with the pressure on we wanted to make sure everything performed well.
So Friday Night, Josh Dickerson and I sat down and started migrating the applications that XenonApps wrote to our production database. We had a development server that had been serving us faithfully, but since we figured the load might be bigger than anticipated with all the press, we set everything up, and I configured Varnish and the other API related services like I had before. We had some troubles with getting the Apache configuration to stick, but after beating at it until 2am we finally got it.
Saturday morning I was up by 8am and at Josh's apartment, joined by our iOS developer Anders, monitoring the status of the API server and making sure that the web dashboard and web app client functioned properly. Around 9am or so we were noticing some small bugs in the error logs from the Administrative dashboard we had made. Something was up with the server configuration.
After 10 or so minutes of attempting to trace the mis-configuration and failing, we made the executive decision to swap the domain names to point to our development server again. Once we did that all of those errors disappeared. We were running on a smaller server, but throughout the entire day it held up.
The applications we made for Green Up were the following:
- iOS App
- API Server
- Web Client for Android and other smart phones
- Dashboard for the world to follow along
- Admin dashboard for GreenUp and ourselves to administer and monitor data
My role within the project was primarily focused on the API Server itself, constructing the documentation of the API so that the other applications could use the data without needing to know the internals of how they retrieved it (that is what an API is after all!). We originally used the GAE for the program, but when I performed a simple load test on it: I managed to seg-fault python. So, I took my documentation and used it as a specification for writing the C version of the API. It was a great experience. Programming in C is one of my favorite things to do, and getting to right not only the JSON and HTTP handling methods, but also interact with the low mySQL C API was just downright fun. You can read the commit messages on the API server's repository if you want all the details.
Overall, Green Up was a great success, not only for the local environment, but also as a milestone in XenonApps's life. As this marks our first successful deployment of an application. We've already identified some areas we want to improve in our client applications, and I've got a little bit of refactoring for the API itself to perform even better next year.