1

Let's say I want to use Google GWT on the client side and Google AppEngine Python on the server side. Furthermore, I want to be able to use RPC calls to the server as well as performing COMET based exchanges.

What are my options in term of existing frameworks?

Wooble
  • 87,717
  • 12
  • 108
  • 131
jldupont
  • 93,734
  • 56
  • 203
  • 318

4 Answers4

2

I found this by googling "gwt python": http://code.google.com/p/python-gwt-rpc/ -- it appears to be unsupported, since App Engine supports Java now.

And this, by googling "gwt comet": http://code.google.com/p/rocket-gwt -- which should work on your client-side to make hanging GETs to the server, which conceivably could be written in Python.

But I have to say, it's going to be a lot easier to do this if you just write the server-side in Java. GWT and Java were made for eachother, they belong together, and unless you've got some strong aversion to writing the server in Java, you should really consider it.

You could hack some solution together to make GWT and Python work together, but it could easily break in upcoming versions of GWT, meaning more work for you in the long run.

Just write the server in Java.

Jason Hall
  • 20,632
  • 4
  • 50
  • 57
  • 1
    I've had a lot of success writing client-side in GWT and server-side in Java, mainly because it saved me a lot of code duplication. For my validation-heavy application, writing the code once and getting automatic client-side and server-side validation was invaluable. Personally, I would go with AppEngine Python if using an existing Python framework (and use json or whatever the framework is using). If starting a project from scratch, I would go with AppEngine Java and use RPC. Can you give us more info as to why you want to use server-side Python and RPC? – Philippe Beaudoin Dec 15 '09 at 05:50
  • The reason I am interested in server-side Python is because I find I am more productive writing Python code rather than Java. – jldupont Dec 15 '09 at 14:01
  • 1
    I'd be willing to bet that any productivity gain in using Python will be overshadowed by the hassle of getting it to work well with GWT. – Jason Hall Dec 15 '09 at 16:18
1

One year later, the new Channel API available in GAE allows this kind of persistent connections to avoid polling both in Java and Python.

"The Channel API creates a persistent connection between your application and Google servers, allowing your application to send messages to JavaScript clients in real time without the use of polling. This is useful for applications that are designed to update the user about new information immediately or where user input is immediately broadcast to other users. Some examples include collaborative applications, multi-player games, and chat rooms. In general, using Channel API is a better choice than polling in situations where updates can't be predicted or scripted, such as when relaying information between human users or from events not generated systematically."

Guido
  • 46,642
  • 28
  • 120
  • 174
0

App Engine doesn't currently support comet, because it doesn't support hanging-GETs (eg, long-running requests). If you want to do comet, you'll have to use an external service, or wait for Comet support in App Engine.

Nick Johnson
  • 100,655
  • 16
  • 128
  • 198
0

You can do it with the help of a tiny extra service (I host one for free):

http://www.brightyellowcow.com/blog/Comet-AJAX-push-using-PHP-or-Google-App-Engine.html

The service's sole job is to provide a wake up to the client application, and it does this using a long polled ajax request. Your App engine application pokes the service via http when there is new data uploaded, which causes the client to wake up and go back to the app engine application for the new data.

Phil
  • 2,239
  • 3
  • 25
  • 26