GAE using Python for frontend and Java for backend

173 views
Skip to first unread message

Claes Ladefoged

unread,
Jun 20, 2015, 6:22:35 PM6/20/15
to google-a...@googlegroups.com
Hi,

I have a website running python for frontend, which I am very happy with.
I wish to create an android app (using java) accessing the GAE datastore. 

I found a tutorial explaining how to build a android app using app engine backend:

My problem is, when I reach the end and deploy to GAE (defaulted to deploy as frontend, I can't see where to change this), then it overwrites the existing data, meaning my python website. I have tried googling a lot, and haven't found anyone explaining how they can run at the same time.

So can anyone share with me a link to a tutorial explaining how to run a GAE project with python frontend and java backend?

Thank you in advance.

Lorenzo Bugiani

unread,
Jun 21, 2015, 5:25:18 AM6/21/15
to google-a...@googlegroups.com
Well, develop you backend in python, as a part of your website! I haven't read the tutorial, but I think the java backend expose some rest endpoint that the mobile application call, right? Well, Cloud Endpoint are available in python too: https://cloud.google.com/appengine/docs/python/endpoints/

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/2334509f-9cb8-4fa1-ae49-ebe03ba6157a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael (Cloud Platform Support)

unread,
Jun 23, 2015, 2:01:23 PM6/23/15
to google-a...@googlegroups.com, cla...@gmail.com
Hi Claes,

If you just want to run both python and java at the same time on one project (assuming both are on App Engine), I recommend using Versions and Modules for both Java and Python, which would allow you to run effectively two different apps (in this case the frontend and backend) at two different URLs on the same project.

In it's simplest format, the version element is set in either appengine-web.xml or the app.yaml as a string value. That string is how the version is identified in the Developers Console as well as in the URL ( for example if you set version to be <version>javaBackend</version> then the default url for that version will be javaBackend.YourAppID.appspot.com). Once you've deployed that version, you can create a completely different app with a different version and it will deploy to another url, leaving your original versions untouched.

Once you've set that up, you can then use the URLFetch service for Java and Python to communicate between the two by sending HTTP/HTTPS requests to the various version and module's URL and receiving responses.

Cheers!
Reply all
Reply to author
Forward
0 new messages