Multiple languages in the same application

236 views
Skip to first unread message

josh wood

unread,
Feb 4, 2014, 4:01:59 PM2/4/14
to google-a...@googlegroups.com
Is it possible to use two different languages in the same application, e.g. python and php. How would I go about doing this if it is possible? Will it incur costs?

PK

unread,
Feb 4, 2014, 11:17:25 PM2/4/14
to google-a...@googlegroups.com
I have not tried it yet but using modules you should be able to do it. 


On Feb 4, 2014, at 1:01 PM, josh wood <josh...@gmail.com> wrote:

Is it possible to use two different languages in the same application, e.g. python and php. How would I go about doing this if it is possible? Will it incur costs?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Vinny P

unread,
Feb 5, 2014, 3:01:01 AM2/5/14
to google-a...@googlegroups.com
On Tue, Feb 4, 2014 at 3:01 PM, josh wood <josh...@gmail.com> wrote:
Is it possible to use two different languages in the same application, e.g. python and php. How would I go about doing this if it is possible? Will it incur costs?
 

Yes you can.

The way I'd do it is write your separate applications in PHP and Python, then upload them to the same application ID but name them as different versions. By uploading them to the same application ID, they can share common services such as task queues, paid settings, etc.

Note that versions can include letters and numbers, so you could call the application versions something like php1 and python1. If you need to communicate between each version, use task queues, the datastore, cloud SQL, etc. Or you can individually address each version using the appspot URL: http:// php-version . my-application-id . appspot . com (remove the spaces).

As for costs, it depends. Obviously each version - if running simultaneously - needs its own instances. But depending on the traffic profile of your application there may be minor to no increase in costs, especially if your application is already running multiple instances.

 
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Ola Fosheim Grøstad

unread,
Feb 9, 2014, 12:13:10 PM2/9/14
to google-a...@googlegroups.com
On Tuesday, 4 February 2014 22:01:59 UTC+1, josh wood wrote:
Is it possible to use two different languages in the same application, e.g. python and php. How would I go about doing this if it is possible? Will it incur costs?

I have done it using modules. It works fine on the App Engine production server, but I have had problems running them concurrently locally.

You will need at least 1 more instance if they are accessed concurrently.

You can use the dispatcher yaml file to get them both work under the same hostname.

However, you may run into problems if you upload files to the one that isn't set as default. So if you plan on file uploads make sure you do it to the default server (or use the appspot.com URL).

Ola.
Reply all
Reply to author
Forward
0 new messages