Moving from Mor.ph to Google AppEngine
Moving from Mor.ph AppSpace to Google AppEngine isn’t as easy as I hoped.
Installing AppEngine plug in
Initially moving the Application by installing the app-engine plug in is straight forward. Except that the command-line written in the plug in page for executing the initial setup is wrong. Ive corrected it now.
Windows users need to run the update command with the following command-line:
%APPENGINE_HOME%/bin/appcfg.cmd update ./target/war
Also unless the app-engine code executes correctly it will not clean up the staging directory. This causes problems if your using plug ins such as the ui-performance plug in. That is written to execute on a “clean” staging directory. If you it’s not cleaned up the plug in will try to compress the gziped version the files as well.
GORM
The problem however is that the GORM functions are not available, since the AppEngine is using a different data storage not supported by Hibernate.
There is a solution to this, install the GORM-JPA plug in. This gives you most GORM functions, but using Google AppEngines data storage.
Issues
From here I’ve run into several issues along the way. The framework for deploying to Google AppEngine crashes when running on Windows machines; if you have allot of libraries and classes in your project. Google AppEngine fails to save my entities, JSON conversion is acting up as it tries to serialize class meta data for some reason, which is were I’m currently stuck.
Light at the end of the Tunnel
Now I’d also like to mention that these issues are being ironed out. There are people looking at most of them, it’s just that Grails on Google AppEngine is relatively young so to speak. Even Java on Google AppEngine is quite new, if not Google AppEngine in it self.
Also I’d also like to mention the dashboard on Google AppEngine. It’s great!
The Dashboard on Google AppEngine gives the overview logs I got from Mor.ph, but they are presented better. They also give me some summaries on where most errors occur (which URLs crash) and which URLs are consuming the most CPU. This helps me to optimize specific URLs.
Since my application uses a REST service consumed through AJAX I can optimize parts of the application on the back end, and monitor the usage of parts of the web service.