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 http://twitter.com/marceloverdijk.


Screenshot from groovytweets.org

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:


@Entity
class Person {
@Id
@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.

Thursday, May 28, 2009

Spring Roo coming alive



Spring Roo was announced just recently at JavaOne, and after the first alpha releases it's now time for M1.

If you are interested in this new "code generating" / productivity framework led by SpringSource you defintely have to read this introduction and example by project lead Ben Alex. Currently there is not much documentation available but this will change in the near future.

Similar to Grails, Roo wil have a plugin architecture using "add-ons". Looks like I've published the first community add-on - integrating SiteMesh - myself according to Ben's blog. Follow the steps below to try out the SiteMesh add-on:


  1. Follow the Roo installation instructions from Ben Alex's getting started blog post

  2. Download spring-roo-addon-sitemesh-1.0.0.M1.jar from http://jira.springframework.org/browse/ROO-41

  3. Copy spring-roo-addon-sitemesh-1.0.0.M1.jar to ROO_HOME\dist

  4. Start Roo and create a project as described in Ben's blog post

  5. After creating the project install SiteMesh to your project. Type 'ins' and press tab. Roo's shell will already display the availability of the install sitemesh command. Finish the command 'install sitemesh'

  6. That's it. The Maven pom file is updated so it contains the SiteMesh dependency. The SiteMesh filter and filter-mapping are added to web.xml. And default sitemesh.xml, decorators.xml and main.jsp files are created within your project.

  7. Open webapp\decorators\main.jsp to change your main layout and continue your project creating persistent classes, controllers, views etc.



It's really easy to create add-ons. If you are interested in creating your own add-ons have a look at the sources of the SiteMesh add-on or see the Roo core add-ons using Fisheye or SVN.

I think Spring Roo will have a bright future as it is led by SpringSource and primary uses best practices and boosts developer productivity. For companies/developers already using the Spring framework, Roo will be an easy and natural next step. This is a real strong point for Roo. Also integration with the SpringSource Tool Suite integration since day one will have huge benefits.

As a long time Grails adept I'm wondering how SpringSource will position both frameworks in the future. At least we have another choice for productivity again.

Monday, April 20, 2009

The prophecy has come true! SpringSource next?



This aftenoon I received an e-mail from an old colleague that the Prophecy has come true (he was calling me Morpheus ;-): Oracle announced it entered into an agreement to acquire Sun.

Cool that just 1 month ago I finally blogged about this! I was thinking about this for years. I guess Mr. Larry Ellison had finally found my personal blog then ;-)

But seriously, what will this merger mean for us Java developers and for IT industry in general? In the past Oracle and Sun were very complementary, but the last years they became competitors also. Think about Sun acquiring MySQL and Oracle acquiring BEA Systems (including it's J2EE BEA WebLogic application server).

I guess Oracle will try to keep Java adopted as much as possible (it's in their own interest), but I don't think this will count for MySQL and GlassFish. I guess we will see a lot of other products being merged in the future, like NetBeans and JDeveloper. Time will tell, but it will definitely have some impact!

I will end with some new prophecies:


  • Within 2 years Grails will be the leading platform for Java web development.

  • Groovy will be the most dominant dynamic language on the JVM (Uhhhh, actually I don't think this is a prophecy but reality already).

  • By 2012 a lot of Java developers are using Groovy without even knowing they are actually using Groovy.

  • Someday Oracle will buy SpringSource.

  • Very soon there will be a nice Groovy module for easily developing small Google App Engine applications.

Wednesday, April 8, 2009

Java support on Google App Engine



Just read the first blog posts (Google App Engine Blog, GR8 Conference, The Aquarium) about the announcement that Java is the next programming language supported on Google App Engine.

This is so funny, as I think just before Google released the announcement I put a question on the Google App Engine discussion group about when we can expect the new language and which language it would be. So my qusetion is answered now.

Since Google App Engine was announced I've always followed it with interest. I'm really excited/interested in the Cloud computing model so I don't have to maintain a deployment server/server park myself. Also the fact that I will just use more resources on the cloud infrastructure when my application needs is just great. I don't have create a cluster or whatever myself.

The reason I put the question on the forum yesterday was that I'm working on a small personal application I like to host on the internet somewhere in the future. Important thing is that the hosting has to be cheap when starting up. I've looked into Mor.ph but it would still cost me $31 a month to host my Java application. This does not sound expensive, buy hey I'm not a business!

In the past I hosted a couple of PHP websites using Drupal and I must say good PHP hosting is cheap and works very good. So I was already thinking of alternative scenario to develop my application in PHP, and not in Grails ;-(
I had already downloaded CakePHP and was experimenting a bit with it. I must say CakePHP is really easy to learn for Grails developers as it uses a lot of the same concepts as Grails and also RoR.

But with the annoucement of Google that Java will be supported I will be putting my PHP alternative in the fridge again. Also a very big plus that SpringSource's Groovy team has worked together with Google to make sure Groovy works well on Google App Engine. Let't hope the same thing counts for Grails one day.