Google AppEngine vs Amazon EC2

amazon_appengine
Over the past 6 months, I've seen a number of blog posts evaluating the pros and cons of Amazon's EC2 service versus Google's AppEngine and I wanted to toss my assessment of the two services into the mix.

First off, I don't believe the two services really compete with each other. In the majority of cases, one service or the other is the clear choice for a specific usage. At its core, Amazon's EC2 allows you to scale any computer instance to n-instances, so you have total control over what's available on each virtual box. AppEngine abstracts away from the operating system (and the concept of a computer instance) and provides a deployment platform for Java/Python web applications. If you are building a web application supported by AppEngine (aka Java or Python based application), then the winner is clear as long as you don't need special functionality from the operating system. If you need more control over your system environment or special OS-specific tools (perhaps for OCR or something similar), then AppEngine won't provide the flexibility you need and EC2 is where its at.

Second, this should be obvious but it seems to get overlooked in many reviews but with Amazon EC2 you still need a sysadmin to setup and administer the instances. The restrictive nature of AppEngine's environment is what allows them to provide an OS-less application platform. This allows application developers to stay in the role they are best suited for, writing bug free code 😉 Especially with smaller development shops, being able to really focus on what you are best at, provides huge efficiency bonuses.

Third, AppEngine's deployment solution is portable while Amazon's EC2 is not. This is the only point where I see AppEngine being a clear winner. If you start out developing for AppEngine and then down the road decide you need the extra power Amazon EC2 provides, AppEngine's framework is both open source and portable so you could switch services with minimal rework. I have no idea what I smoking when I wrote that. While the AMI's for EC2 are not portable, you could certainly port your server configuration to another hosting company. Developing on AppEngine is significantly more restrictive on portability. Most of the "good stuff" on AppEngine revolves around the Google specific API's for stuff like User Auth, scalable datastore, cronjobs, etc. While the best parts of AppEngine create a vendor lock-in situation, there are some glimmers of hope on the horizon. Django-nonrel is a good example of wrapping up the non-relational database API into a single package that behaves like a standard database, allowing portbility from GAE's datastore back to SQL if necessary. Also worth checking out is appscale, an open source implementation of AppEngine's python and Java runtimes.

Fourth, due to the nature of AppEngine's API's and restrictions on use, GAE forces you to write code for scale. Super denormalized databases are great for operating in a distributed nature but they can be an unnecessary limit on your querying ability. If you haven't tried writing a geolocation based application on AppEngine, give it a shot. Yes, they provide a convient datatype for location data (db.GeoPt) but with SQL you can calculate distance (etc.) within your queries, currently not possible on the datastore. GAE also doesn't support long-running threads, you are limited to 30 seconds of execution time per task. Often cronjobs need to be written to run in a stateless fashion, evaluating where they need to begin and end. If scalability isn't really a concern but the ability to run complex data-crunching queries is - EC2 is a clear favorite.

I'm not trying to say AppEngine is superior. In fact, I don't believe either service to be the "king of the cloud". They both provide superior deployment options for very different situations. Before deciding on a platform, be realistic about the amount of flexibility you need now and in the future and go from there.

Cheers,
Todd

Todd Cullen

Todd Cullen is a founder at ReignDesign.

3 comments

  1. I’ve been comparing these too, but I have to disagree with the idea of App Engine being more portable. I love App Engine (and my blog is currently hosted on it), but it would be a significant amount of work to set up outside of App Engine (since it uses all Google’s APIs, authentication, etc.).

    On the other hand, anything running inside an EC2 instance can very easily be set up on the same OS on a physical box. IMO, this is far less effort than the GAE equiv.

    GAE has lots of advantages (such as having a huge free allowance), but I don’t think portability is one of them 🙂

    1. @Danny & @sam – completely agree with you guys. I’m not sure what the heck I was thinking when I wrote that (beer+blogging==perfection jk). Just updated the post.

  2. Similar to the last commenter, I’m surprised that you say portability is one of the benefits of App Engine. Have you had experience setting up GAE on an independent system or any reports of it?

Leave a Reply

Your email address will not be published. Required fields are marked *