I was having a play with the Java Google App Engine (GAE). They have had a Python App Engine available for a while, but support Java was added a short while back. It was interesting to compare the model with the Amazon EC2 (Elastic Cloud Computing) model.
The Google model is you deploy a WAR file holding your application to their service. You don’t get access to the OS. Not all of Java is available either (for security reasons). For example, you cannot create new threads – your application is limited to the one thread executing the HTTP request. There are also hard timeouts on single HTTP requests to be processed.
The Amazon EC2 model is to give you a machine the size you request out of a short list of options (e.g. one CPU, 4 CPUs, …). You pick how much memory. The machines have some local (non-backed up) disk, but you can also connect external disk (sort of like a SAN or NAS). This is where you put your persistent data. There is no guarantee a machine won’t go belly up – in which case you have to redeploy your code. Having the data on the external disk allows you to redeploy to another node (with more CPU or memory if you need it) then connect the external disk to your new node. You then pick the OS image to install (you are given some starting points). Linux is common. You then can install whatever software you like, select which ports to open up, etc. There are some prebuilt images with common sets of applications installed, or you can build your own image. So you get access and control over the OS, but also the responsibility of looking after it.
The Google model is interesting in that small applications (not much access) are free. You don’t pick how many CPUs you need – Google worry about deploying your code onto CPUs and load balancing all the apps across machines behind the scenes. The good news is this means you can play around for free, then start paying only if your project seriously gets off the ground. The Amazon model you start paying from day one, and over a long period its not that cheap. I mean they look after the machine for you which is great, but it does add up when you scale the figures up to say running 24×7 for a year.
Joining the Google Java App Engine mailing list I was immediately flooded with lots of people reporting problems. There were often responses from Google staff, but not always. It had been reported that Groovy and Scala were working – but when I tried a Groovy GSP file it failed (1.6.1 and 1.6.3). Someone else had reported the same problem, so I don’t think it was me. (The same code ran perfectly on my local machine.) So it still feels a bit raw.
So the two approaches are different and both interesting. I liked the Google App Engine ability to play for free first with a public site, then pay according to usage. But things don’t look stable yet, and you get limited control which may be too restrictive when diagnosing problems. I got the feeling they are still ironing out lots of issues. The Amazon approach gives you complete control, but no free lunch and you have to manage more yourself. Considering I can build and play/develop applications on my desktop with complete control, I don’t feel the Google App Engine is a game changer for me. The restrictions feel too restrictive for more complex sites, but I am sure they want to remove as many restrictions as they can over time.