To App Engine or not to App Engine

The web development landscape has gotten a lot more interesting over the past several years. Web frameworks have been popping up like dandelions, new and interesting languages have become popular and even entire hosted web platforms have emerged.

With the advent of platforms like Google App Engine (and hey, AppJet, I’m looking at you), starting your next project is not just about deciding on a language anymore. Instead, it’s about weighing trade-offs between entire platforms: from the language and available frameworks to the way the app is deployed and scaled using them.

In deciding what to use for my next project, I’m weighing the benefits and costs of using App Engine — and it’s no straightforward task.

The hard parts

  1. Datastore design — What’s that line about premature optimization, again? Well, with Google App Engine, you’re basically confronted with the task of designing a scalable data layout from the very early stages of developing your application. Datastore queries are restricted in ways such that you simply can’t not think about the effect they’ll have as you scale to millions of users — which is obviously not a pressing concern for most endeavors.
  2. Application monitoring — Performing queries that would be simple in a standard RDBMS are not straightforward in App Engine, so figuring out even how many users you have or how many records of a certain type exist in your datastore is not easy. (To do it, you’ll need to actually keep track of those counts somewhere as the data is coming in or perform some very heavy calculations on demand.) Furthermore, there’s no interface to the actual hardware or software running your application besides the sparse App Engine administration console — so more interesting statistics about performance and deeper analysis into your traffic are hard to come by.
  3. Limited framework access — Django ships with App Engine and can be easily included in any project (an old version of it, but you can upgrade it yourself manually if you like). But as you’ll quickly discover, almost none of the amazing features of Django are enabled for App Engine. A lot of the easy administration interfaces provided by the framework are impossible to use with the aforementioned datastore restrictions, and as such, you’re on your own.
  4. Quotas — Quotas are something I haven’t actually run into with App Engine, but they’re a scary upper bound when you’re building what’s sure to be the Next Big Thing. Some of them would easily be reached with a few hundred users: An app that sends out e-mail notifications frequently could easily hit a paltry 2000 e-mails a day, for example, with no way yet to buy more quota — though we hear it’s coming soon.

The reward

  1. Wonderfully easy development setup — The App Engine development server is wonderful. As I noted in my previous post, there are some inconsistencies with the production environment, but you really can’t beat the way it all works. The OS X client is really spectacular in particular. While designing and coding an App Engine app isn’t always the easiest task, the development server and mock datastore are just great.
  2. Wonderfully easy deployment — Deploying new versions of an app to App Engine is great. With some tips from a Google IO talk called Building Quality Apps on App Engine, I setup a deployment script to safely deploy new versions of the code by incrementing the application’s version number to match my Subversion revision number, which is further utilized in the app for smart caching of minified JavaScript and CSS — and it’s a breeze. I can deploy a new version, check it out to make sure it works as planned and turn it on as the default version quickly and easily. If something blows up, fix and repeat or revert. Fantastic.
  3. Built-in scaling — It’s a disadvantage because you have to think about it early on, but it’s an advantage because once you do, you theoretically don’t have to again. The hardware and software automatically grow your app across Google’s infrastructure, and as long as you’ve structured your data properly and had efficiency in mind you should be set as traffic grows. You never have to think about moving to a distributed database infrastructure after the fact or about how to go from a single server or set of servers to a server farm. Twitter on App Engine probably would have just… worked.
  4. No network administrator needed — In a similar vein, system configuration, maintenance, backup and the like are all taken care of with App Engine for free. You never have to worry about keeping your version of PHP up to date or migrating to a new version of PostgreSQL or upgrading your hard drives.

Non-conclusion

There are a lot of costs and a lot of benefits to using App Engine. If you’re planning on building a big app with a lot of users, it could be worth it to put the extra time in to build it out with Google — but it’s not an easy decision by any means.

Comments on “To App Engine or not to App Engine”

There are no comments on this entry yet.

Add a comment

Thanks for visiting! Looking for more? Check out the archives.