Friday, June 26, 2009

Fun with the Google App Engine

I've been playing with the Google App Engine SDK in recent weeks, starting to build an app that will scratch a personal itch of mine (more of which at a later date, when I'm closer to deploy). Anyway, I'm keen to share my early experiences.

So what's the Google App Engine? It's basically a platform that allows you to build web applications that can be hosted on Google's (enormous, secure, resilient) infrastructure. For free. Well, you get a pretty large quota of resources for free, and you can turn on billing to pay for any more your app may need. There is database support in the shape of Bigtable, support for secure http, and even the ability to run scheduled jobs (cron jobs). However, there are some restrictions: you can't open a socket, and threading is disabled for example. At the moment the supported languages are Python and Java. I chose Python (version 2.5 is implemented in the App Engine).

With Python comes Django (you can develop App Engine apps without it, but I like Django). Lots of people seem quite upset that its only Django 0.96, although the most recent SDK (version 1.2.3) supports version 1.0 albeit that you have to explicitly state this in your code. The default remains at 0.96. It doesn't bother me, so I use Django 0.96 - it'll be interesting when the default changes from 0.96 to 1.0 to see how this is managed by Google (I'm trusting that my app won't just break one day). There are also some bits of Django we lose; for instance models are replaced by Google's database module and as a result the Django Admin application doesn't work, and session management is broken.

So how to manage session data? We can go back to cookies or we can use the Memcache, Google's distributed in-memory data cache. I like the Memcache.

Any other draw backs so far? The database doesn't support full text search, and the SQL implementation doesn't have a LIKE operator, so I've had to do a workaround in order to implement an AJAX autocomplete form field. And there's no transaction support... or is there? You can actually perform multiple database updates as a single unit of work, but to do it you have to sacrifice some of the distibuted nature of your data. Data can be grouped on a single database node by specifying a parent entity (the root for the group) when saving another entity. Transactions can be performed within this group. It's a bit like the old principles of CODASYL database 'sets', which I learned from my grandfather. I guess you have to think about design to get it right, Google recommends not to implement more than one 'customer' worth of data in a single group.

All in all I think that the Google App Engine could be a great way for developers to get an idea off the ground without incurring huge costs in the early stages of a project. I'll let you know how things develop from my own early stages.

Sunday, June 21, 2009

Branding the Ego

My experiences of the web, and of social networking in particular, combined with my natural inclination towards privacy have led me, in the past, to hide behind a corporate identity. In certain cases this is a good thing, since many people I deal with in business are more comfortable with a corporate identity and having employed a couple of people this year on short term contracts, it has made sense to describe what "we" can do. However, it is clear that a lot of what I do is me, indeed a friend of mine recently pointed out the obvious fact that I have no exit from the company as the company is, in effect, me. So I swallowed my dislike of being the focus of attention, and in an attempt to reach those who prefer more personal contact, I created my personal online brand.

How, you may ask? Well, I grabbed an online ID from Facebook to match my Blogger ID, my Twitter ID, and my chosen LinkedIn public profile URL. Then I chose a serious-looking photo of myself (note to self: look happier!), cropped it artistically (so I thought) to add an air of gravitas, and posted it to all my profiles. I then made sure I cross-link my profiles, using this blog as the centre of it all. I've used Twitterfeed to publish my blog updates to Twitter, and I've added the Blog Link application to my LinkedIn profile in order to publish my blog there. I've also had some mini cards printed, containing only my Twitter ID and my Gmail address, complete with pictures of me - actually, I might have gone over the top there.

Now I'm (stern looking) dlavery62 across the board, more or less. You can catch me on LinkedIn here , Facebook here, and Twitter here. I'm easier to find, with a consistent presentation, and now I await the wrath of the internet gremlins.

P.S. My corporate identity is still alive and well at

P.P.S. I really must change that photo!

Friday, June 12, 2009

Hello, World

So, first post. Not strictly the first, more like a comeback I would say.

A busy week all round, lots of online kerfuffle over an article in the Daily Telegraph about the grimness of the tech sector up north ( Justified indignation all round. I could go back hundreds of years and detail the many innovations that came out of the North East of England, and are still coming today, but it isn't really worth it. And we managed to keep the Scots at bay while we were on so that the rest of England could get all soft and fluffy. There are always people who want to have a go at the North for one reason or another, much like there will always be people who will vote for the BNP, its largely a case of ignoring the noise and getting on with what we do best - which will always result in proving these people wrong.