Last night Google announced Java support on Google App Engine.
After a bit of toying around, here are my findings.
The Eclipse plugin is pretty slick. Deploying and build is simple.
The dev server that you spin up locally looks to be jetty under the hood.
Objects intended for storage are JDO annotated and after compiling, you run the .class files through the DataNucleus Enhancer which adds additional metadata so Google can map it to BigTable. The Eclipse plugin automatically performs this step for you after compiling. The examples provide a bunch of ant macros to help facilitate building/deploying.
One issue that I had was that the project was building with Java 1.6 and I would get an error after compiling:
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
Even though they say they support Java 1.5 and 1.6, I guess this doesn’t work on the Java 1.6 for the Mac. Switching the build to 1.5 allows the DataNucleus Enhancer to run successfully.
Even though they are using JPA, some features have not yet been implemented or supported ( see http://code.google.com/appengine/docs/java/datastore/usingjpa.html#Unsupported_Features_of_JPA)
Overall, I like what I see so far and think this would be great for quick prototypes of web apps/services.
Going through the tutorial, my awesome Guestbook application has been created and deployed.
Hy Theodore
Thanks for the short and informative feedback about the new possibilities with “Google App Engine”. Since they use the “DataNucleus Access Platform” to store JDO-annotated objects I’m wondering, if it would be possible to store the objects in an RDBMS. Of course “DataNucleus Access Platform” itself supports several of those databases (e.g. MySQL, PostgreSQL,…) but I’m curious, if “Google App Engine” includes those extensions.
Would it possible to adapt the “jdoconfig.xml” configuration file in order to use my own database so that I still “own” my data? It would be so much easier to backup the data and one would have full control over the data. I guess, the config-file should include something like this:
I got this example from here: http://www.datanucleus.org/products/accessplatform_1_1/jdo/pmf.html
Thanks and looking forward to hear from you,
Alain
Sounds like you want to connect to your own database while still using Google App Engine to handle requests and processing. I don’t know the answer to the question. According to the JRE whitelist, the relevant classes necessary to connect to DataSource are available. However, the docs also allude to the fact that Google App Engine apps are only allowed to connect to other resources over HTTP and HTTPS which I read to mean I can’t connect to another data source. CouchDB is a document database with a REST API which sounds like you could possibly use.
Google has incentive to keep all of your data on their servers by claiming power in the cloud and bind/support your development through GAE.
Given all of this, there’s nothing stopping you from writing your own export/backup mechanism. You could created a crond job that iterates over all of the objects in your datastore and generate a big SQL file that you could use to import to MySQL. It would development require some work but might be worthwhile if you are concerned that you may want to move off of GAE in the future.
That said, give it a shot! And let me know what you find out 🙂
Hi,
if you go to Youtube and find the “Google Campfire One” videos you can see a couple from IBM who did exactly that, taking the Google AppEngine demo application and simply changed the “ConnectionURL” to be for DB2 and then put the datanucleus-rdbms jar in the CLASSPATH and it was then deployed on Websphere running DB2. Have fun 😉
Hi Andy
Cool, that’s exactly what I mean. I just wrote this comment because at the moment, I do not have the possibility to test it myself. I have seen this part of the Campfire video but didn’t realize, that those configuration changes are exactly the one’s I was looking for (actually, I thought this couple was the worst part of the presentation! Shame on me 🙁
Anyways, I was investigating this topic a bit further and think, that it would be much better to do it with the “Secure Data Connector”. In one part of the Campfire, a guy from Oracle connects to its database and loads data. The advantage is, that the data is sent encrypted trough the internet. The moderator mentions shortly, that they will provide over 50 connectors. Let’s see what databases they gonna support. Cheers