views:

31

answers:

1

I'm interested in building a Google Web Toolkit (GWT) application that will run on the Google App Engine (GAE). I'd also like to expose a web service that shares the same datastore and can receive posted data from a different web application hosted elsewhere.

Would using Restlet be a good solution, or is there a simpler approach that doesn't require the use of a 3rd party library? Is there some way for the GWT client to accepted json that can then be serialised over GWT-RPC to the GAE datastore? Do I need to write a servlet that can parse and persist jsonp?

I suspect my thinking may be a bit muddled here... any assistance is appreciated!

+3  A: 

As per http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine

Restlet Version(s): 2.0 M5 + Status: COMPATIBLE The team has created an adaptation of Restlet just for App Engine. See http://wiki.restlet.org/developers/172-restlet/251-restlet.html for instructions on tuning a standard installation of Restlet for App Engine.
Here's another blog post from the team about Restlet: http://blog.noelios.com/2009/04/11/restlet-in-the-cloud-with-google-app-engine/

GWT has native support for JSON, You just need a library on the server to parse/create JSON. (GWT JSON Sample)

GAE uses Servlets, so any Servlet would do if you wanted to go that route. There is nothing to say that your client needs to be GWT.

You can use the persistence JDO, JPA or Raw APIs for persistence, They are a little tricky and not that clearly documented (it is complex).
See these articles for a clear explanation and sample code:
http://www.ibm.com/developerworks/java/library/j-gaej1/
http://www.ibm.com/developerworks/java/library/j-gaej2/index.html
http://www.ibm.com/developerworks/java/library/j-gaej3.html

Romain Hippeau
Thanks for the response Romain! Am I right in thinking then that I can map a route to a servlet web service *and* serve my gwt frontend from the same GAE app? Is it worth abandoning GWT-RPC for the benefits provided by Restlet (i.e. a restful API)?
Bayard Randel