!!! Google App Engine

[{TableOfContents }]


!! Resources

* [Overview|http://code.google.com/appengine/docs/java/overview.html]
* [Admin Console|http://code.google.com/appengine/docs/theadminconsole.html]
* [Dashboard computerhok01|http://appengine.google.com/dashboard?&app_id=computerhok01]
* [Will it play in GAE ?|http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?pli=1]

! JDO Resources

|[Java API|http://db.apache.org/jdo/api23/apidocs/index.html] |[Comparing JDO/JPA|http://db.apache.org/jdo/jdo_v_jpa.html]

!! Intro

Before you sing-up ([agreements here|google-app-engine-agreements.txt]), they require you have a mobile number:

''To create applications with Google App Engine, you need a verification code. .... \\The verification code will be sent to it via SMS. Note you will only need to verify your account once.''


!! Install / Test

* Install the Eclipse plugin
* ''sudo apt-get install libstdc++5''

!! First Deployment

I registered my first app with the __ID computerhok01__, so you can access it at [http://computerhok01.appspot.com]

{{{
Compiling module nl.computerhok.gae.test1.GAEtest1
   Compiling 5 permutations
      Permutation compile succeeded
   Linking into war
      Link succeeded
   Compilation succeeded -- 26.989s
Creating staging directory
Scanning for jsp files.
Compiling jsp files.
Compiling java files.
Scanning files on local disk.
Initiating update.
Cloning 30 static files.
Cloning 65 application files.
Uploading 31 files.
Uploaded 7 files.
Uploaded 14 files.
Uploaded 21 files.
Uploaded 28 files.
Deploying new version.
Will check again in 1 seconds
Will check again in 2 seconds
Closing update: new version is ready to start serving.
Uploading index definitions.
Deployment completed successfully
}}}

!! Application life cycle management

A very nice feature of GAE is the way they manage deployed applications.\\
If you deploy an application, you can assign a version number (in Eclipse), if you deploy a new version, both the old and the new applications are available.\\
You can manage these application versions on the GAE console (see [Administration Versions|http://appengine.google.com/deployment?app_id=computerhok01]).

So you can simultaneously access both applications, for example with the following urls :
* 1 [http://1.latest.computerhok01.appspot.com/]
* 2 [http://2.latest.computerhok01.appspot.com/] 

!! Quota 

Here's a screenshot of the Qouta details page:

[GAEQuota.png]

!! Things noticed / experiences

! HttpSessions

HttpSessions should be enabled in appengine-web.xml, The implementation uses the App Engine datastore and memcache to store session data.

! java.net.InetAddress

Oops, not supported, you even get a compile error in your workbench, so you don't get to know the hostname of the host your request was handled on.


! (no) log4j

If you start using log4j in your webapp (and you added a log4j.jar to war/WEB-INF/lib and to your project's build path), JDO enhance ant task fails with a NoClassDefFoundError. Few hits on Google on that, finally removed log4j all together and switched to Java util logging.