Wednesday, June 17, 2009

Tweeting now

I believe I created a Twitter account somewhere last year but never used it. But from now on I will try tweeting on a regular basis. You can follow me on

Screenshot from

Sunday, June 14, 2009

Google App Engine Datastore doubts

I have been looking into Google App Engine since the beginning. I played a little bit with it using Python and Django but never did some serious work. As GAE/J was released back in April I decided to have a serious look by building a real application.

I mean the GAE promise is everything I need: easy to build, easy to maintain, easy to scale and I can run it on Google's infrastructure. And when my application won't be the next Twitter, most likely it will cost me nothing to host it as Google offers enough free quotas for medium and small application. I should also mention that now Grails also runs on GAE (using the App Engine plugin) my life couldn't get easier, but...

The only thing GAE does not offer is a relational datastore. GAE's Datastore, based on BigTable, is a hierarchical, schema-less, non-relational datastore.

One of the nice things relational databases support are the aggregate functions like count, sum, avg etc. If you are using GAE you must "Shift processing from reads to writes" as mentioned in The Softer Side Of Schemas - Mapping Java Persistence Standards To the Google App Engine Datastore presented at Google I/O. In practice this means that when inserting or updating a record you must calculate and store the count, sum, avg, etc. values of the whole table. But what if you have many conditional groupings? Let's take an example:

class Person {
@GeneratedValue(strategy = GenerationType.IDENTITY)
String id;

String name;
//Date birthdate;
Integer age;
String address;
String city;
String postalCode;

Now imagine I want to be able to (1) get the total number of persons and (2) the average age. Everytime I would create, update or delete a person I should calculate both and store them. Not a big deal, but in my opinion already to much hassle.

But then I also want these values per city... So for each city I should store these values. Next I want them also per postalCode or a specific range of the postalCode. You see where I'm going to? Every create, update or delete of a person would result in a lot of caluculation and storing values.

And then worse, my agile product owner comes in and want to add a boolean indicating a person is a male or not. And guess what, number of persons and average age should additionally be calculated also for this male/female indicator, and to make it worse also in combination with city and postalCode...

I truly believe GAE's Datastore is suitable for many applications don't needing features part of most relational databases. But if you need aggregate queries or common SQL functions (both most likely needed when you are trying to get some analytical data) you should really think twice.

I hope one day GAE's current Datastore will support aggregate functions or additionally a relational datastore will be provided. Then I think GAE would be my preferred Cloud platform.

Monday, June 8, 2009

Microsoft finally seeing the light ;-)

Microsoft is finally seeing the light!! Watch the video below to see Ted Neward demonstrate the new JDBC 4 driver for Microsoft SQL Server at the Microsoft booth at JavaOne.

Funny thing is Ted is using Grails and also a MacBook.

Which hosting party to choose?

For some personal project I'm currently looking for a hosting party.
I started very open minded to use whatever technology to build the web application from Grails, Spring Roo, Ruby on Rails to CakePHP or even Drupal.

I don't have that many requirements:

  1. Hosting party should be a respected company

  2. Ability to scale out easily

  3. Offer Subversion service to manage my application sources

  4. And (very important for my own wallet!) it should be affordable

I've looked into Google App Engine but for now I have decided not to go that direction. Main reason is the lack of a relational database.

For now I decided to go for a Grails or Ruby on Rails solution. I never developed a full Ruby on Rails application (except reading/trying some tutorials in the past) but maybe this is the time to give it a try... It's never bad to learn a new language and I think I will pick it up very quickly as it's concepts are very similar to Grails. I still need to think about this and will decide later which of the two I will use.

Based on hosting experiences within the Grails community I already made a shortlist of hosting parties and contacted them already with some question. This is my shortlist so far:

I have some time to make a decision so any comments are appreciated.