When Google App Engine was announced a few days ago I jumped at the chance to add some dynamic functionality to this site, specifically — support for comments. I had intended to do this in python anyway, but never got round to choosing a framework and setting this up on my web server, which as mentioned previously, serves static files. I was also a bit worried about the security and maintenance costs of handling logic initiated by, and dealing with, user input.

So I created an Google app engine app which the browser interacts with as depicted above. In summary you can comment on http://www.pixelbeat.org/whatever by going to http://comments.pixelbeat.org/whatever. Note to link the comments.pixelbeat.org subdomain into the google app engine, I created a free google apps account for pixelbeat.org, and added the app engine ID as a new service. I also added a CNAME in my DNS provider linking comments.pixelbeat.org to ghs.google.com, which links this name into the google cloud.

You can browse the source to see how simple this was to implement and deploy. It actually took me longer to assemble a thomas the tank engine train set I got for the kids this weekend than do that, so I'm impressed. For a first release, app engine is very usable and the docs are well put together. There are a few oversights at present but they will be fixed soon I'm sure. For example today I noticed that requests were being served much faster, as you can see in the screenshot of the appengine dashboard below. Maybe someone removed a sleep(1.5); :)

I also I noticed some delays while the app is instantiated from the depths of the cloud, but it's cached for a while at least. Another useful feature provided is a full CRUD web interface to the data entities, which will be especially useful for me, allowing me to easily delete SPAM comments should they arise.

Go on, post a comment. You know you want to :)

© Apr 15 2008