Discussion, code samples and video demos of new technologies; including Web 2.0 startups, Google AppEngine, Ruby on Rails, PHP, Visual Studio Team System, Team Foundation Server and .NET.

Tuesday, April 8, 2008

Google AppEngine - it's their world, we're just lucky they aren't charging rent (yet)...

Hey guys,

Google joined cloud storage/application deployment players like Amazon, Heroku, Zoho, Rollbase, Force.com (Salesforce.com) and others with the announcement of their AppEngine last night.

AppEngine is pretty damn cool :)

It is basically a platform/hosting environment for you to build applications on. As a platform, it provides:

- storage (using their BigTable database)
- web templates (a bunch are supported, the main one appears to be DJango)
- user management (using Google accounts)
- email (using Google Mail)

The promise of AppEngine is that it will scale to meet the demands of your application - both in terms of processing web requests and data storage. The belief here is that AppEngine uses some or all of the massive data centers that Google has to do this. For now, however, AppEngine accounts are limited to 500MB and what they estimate to be the ability to serve about 5 million page views per month.

So what does an AppEngine application look like? For now, it is Python. I'm not very familiar with Python. In terms of dynamic languages, I've really gotten to like Ruby and PHP. But, I know some big name sites like Pownce use Python, so I'm sure it is quite good. I believe that Google has plans to support a wider number of languages in the future.

Google has an excellent getting started tutorial that is worth doing (http://code.google.com/appengine/docs/gettingstarted/). I'll point out a few things from that tutorial that illustrate what I think is really cool about AppEngine.

The first thing is user management; not surprisingly, they give you access to Google accounts. So you automatically have user creation, password reminders, etc etc.

The following line of Python




Will generate a URL that you can use to direct a potential user to sign in with their Google Account:

That is nothing spectacular per say. Passport has been doing that for years (though I don't think you can sign up as a Passport customer anymore), and ASP.NET authentication gives you that as a drag and drop control.

But, it gets better.

The storage behind AppEngine is Google's fabled BigTable. As an aside, I don't know if it is really 'fabled', but I read a description of Google's file system described that way :)

BigTable is said to be a super-fast, super-scalable database that is built on top of the super-distributed file system that Google uses (GFS).

This files system, database (big table) and parallel processing framework (map reduce) are the 'fabled' infrastructure that Google apparently uses as its IT backbone.

Google has been kind enough to publish academic papers that detail how these systems were built. Based on these papers, the Apache Open Source Foundation has implemented their versions of them. They are Hadoop (i.e. MapReduce), Hadoop File System (i.e. GFS) and HBase (i.e. BigTable).

Combine these with a few bazillion cheap computers, and you can be your own Google infrastructure - Hoogle I suppose :) All that's left to do is collect the billions in revenue :)

Anways, back to AppEngine. So the storage. Really simple looking and really cool.

The following Python class declaration establishes your database schema and provides your access class.






Once you have that, you can run your queries. Basic ones like 'get me all of them' are part of the object model.




That one line gets me all the greetings, ordered by date. That's pretty clean and easy.

This approach is kind of like the Model View Controller approach that Ruby on Rails made so popular; but it might be even easier. With a Ruby on Rails model, you define your table and a model class. As long as you follow some really reasonable naming conventions, Ruby on Rails can work with your model. With Google's approach, you just define your class with members that become columns in BigTable and the magic happens for you. Both are clean and easy to use - all the magic of LINQ with none of the weirdo syntax (no offence LINQ!)

The AppEngine SDK comes with a development web server that you can use to do your local development and debugging. When you're ready, you can upload your application into AppEngine.

With AppEngine, you work through a web interface to create an application. Basically you are creating a unique identifier and a URL. You can use your own domain for the URL, or a default one that Google provides.

Be warned, the uploading takes a long time - about 3 minutes for my really simple application.

The AppEngine 'dashboard' seems like it would be really useful. It tracks basic usage statistics.

Obviously my hello world application has not exactly lit the world on fire like iLike or something :)










My first impression of AppEngine is really positive. Quite a compelling platform to say the least. There are a few things I'm hoping Google will add in the future.
  • As mentioned earlier, more languages! Python is actually pretty cool, but it is not everyone's cup of tea. I would love to see PHP and Ruby in the near future
  • Add more to the API. So far we have web templates, users, mail and storage. I would love to see:
    • a commerce solution with Google Checkout
    • ways of sending IM's with Google Talk
    • an enhancement to the Mail API to enable processing incoming email
    • maybe some programmatic ways of dealing with Google documents
  • When you upload an application to AppEngine, you automatically get assigned a version. I would love to see Google integrate this with some basic version control so you can revert/diff between versions.
All things said, AppEngine is really something you have to look at if you're thinking about building an application for the web.

What I'm wondering now is how some of the more developer-centric web hosting companies are going to be affected? I'm a big fan of www.dreamhost.com. For something like $10/month, you get basic hosting along with Subversion, Jabber, MySQL, Joomla and more. While they can't obviously scale to inifinity like AppEngine, they do provide a lot of good infrastructure for you right off the bat.

Anyways, time to go play with AppEngine some more...

Thanks!

Eric.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home