Grails and Google App Engine: Birthing Pains

grails_logoWhenever you can get a free, publicly available place to deploy your applications, your first instinct is to grab it with both hands. Google App Engine is one of those places. Each developer can deploy up to 10 different apps in development mode.

I've been working on a grails app recently that uses the grails App Engine Plugin. Along with the GORM-JPA Plugin, which gives you someĀ  of the usual grails GORM goodness, you can write some reasonably interesting grails apps.

There are still a few flies in the ointment. Some of them are grails issues, and are due to the immature state of the plugins. Those are forgivable and will clearly be addressed given time. Some of them, however, are App Engine Java SDK issues. Those are really more problematic given the 1.2.6 version number on the SDK. f I had to boil it down to it's essentials, then I would say that the SDK doesn't barf in consistent ways. Up until 1.2.5, the SDK in development mode wouldn't even complain if you were doing privileged operations. With 1.2.6 you at least got some complaints. For example, with 1.2.6 you now see the following exception on grails startup:

[java] Unable to use direct char[] access of java.lang.String. Disabling this method.
[java] java.lang.IllegalAccessException: Private fields can not be set on JRE classes.

That's because Groovy is trying to modify the String class. But still, there are any number of things that behave differently in the actual App Engine container than the local environment. One solution is to frequently deploy the app the the App Engine container. That's a pretty expensive step, however, and can't be a part of your development and test cycle. Also, even if something does blow up in the App Engine environment, you don't always get a log message. I've been trying to track down a "404 NOT FOUND" problem for a couple of weeks now that doesn't happen at all in the local SDK environment and leaves no log file traces in the App Engine environment.

I have my fingers crossed that version 1.2.7 of the SDK will solve all of those problems.

Related posts:

  1. Grails: Delegating to GORM Persistence in Java
  2. Grails and JSONP: How Easy is That?
  3. Making Vaadin, PureMVC and Grails Work Together
  4. Getting CloudTools to Work with Grails 1.1.1
  5. A Rails Story, Or An Engine That Really Could

Comments: 2 so far

  1. Thanks for this information. I had been considering tooling my application for GAE (of course, there shouldn’t be a need to tool something for a specific production platform, but we all know that’s pie-in-the-sky). Your post gives me pause, so I think I’ll stick with my current hosting provider for now. Maybe by the time Google has a paid option for GAE, they’ll have worked out these issues.

    Comment by David Castro, Sunday, November 8, 2009 @ 12:45 pm

  2. I am digging in and starting to develop an app in groovy for Google App Engine. I am still torn between Grails and gaelyk and am trying to decide which to commit to. Thank you for posting your experiences, I’m looking forward to an update with anymore pitfalls/solutions that you have encountered along the way (so I don’t have to do them as well).

    @David Castro GAE currently has a pay option for when you exceed the daily free quotas.

    Comment by Royce Fullerton, Tuesday, November 17, 2009 @ 10:07 am

Leave a comment

Powered by WP Hashcash

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com