views:

447

answers:

6

How portable are applications for the Google App Engine? Are these bound forever on the GAE?

+2  A: 

As a good consultant, I'd say the answer is "depends."

First of all, you can always run a GAE project in the SDK. So to that extent you're not bound. Beyond that, it depends on what other APIs you use. The webapp library is very much like some others, but I don't think it's available as a standalone; however, GAE supports Django as a web framework as well, and that of course is available stand alone.

The code is just Python. But some of the APIs, like the data API, are really meant to interact with the Google cloud; you can't be sure you can move an arbitrary GAE program to another platform without rework.

Charlie Martin
+2  A: 

I don't have much hands-on experience of the GAE, but I was reading this article recently, which touches on your question:
http://waxy.org/2008/04/exclusive_google_app_engine_ported_to_amazons_ec2/

gkrogers
+1  A: 

If you use Django 0.96 you can move your code to a different host after some minor work. You will need to change port your Models from datastore to another database. You will have to stop using the google provided User class and possibly other google specific APIs.

I have ported Django apps to GAE without much trouble.

mcotton
+1  A: 

You can use gae2django to convert AppEngine applications to Django application.

As mentioned in this article http://code.google.com/appengine/articles/pure_django.html

gae2django http://code.google.com/p/django-gae2django/

keikkeik
+1  A: 

If you do not use Google's own WebApp framework, but rely on more standardized tools (I'm not saying Django here), there are only few things to isolate from core application logic and make pluggable/swappable:

  • storage, this seems to be most annoying part, but doable if you do not use GQL too much (datastore API resembles enough other ORMs available for Python to try);
  • authentication, seems to be easy part but requires writing complete backend;
  • in-memory cache, memcache API is somewhat different from Memcached (differences are small so this should be straightforward, as operations of both systems are identical);
  • application startup, you'd have to write your own WSGI launcher (pretty easy with Werkzeug).

In my opinion - worth a try.

zgoda
A: 

I have been developing for the app engine (java) for couple of months now.
Theoretically, if you stick to standards such as JPA or JDO for data access
and don't use advanced features such as Task queues, you shouldn't have much
problem in porting your app to another environment.

Having said that, I often find myself using low-level google apis for datastore access to avoid nightmarish performance issues. The side-effects of this problem can be reduced to an extent if your app design has a modular data access layer.

On another note, if I have an application working smoothly on app-engine, I can't think of any reason to move it anywhere else.

Gaurav