Modules with different languages - Is it Possible?

55 views
Skip to first unread message

Alejandro Magnani

unread,
Mar 23, 2016, 4:54:27 PM3/23/16
to Google App Engine
I've a couple of app engine applications that interact to each other - some of them developed in python and others in java. I was wondering if I can merge the solutions in just one app engine with different modules without changing the code base. 

Nickolas Daskalou

unread,
Mar 23, 2016, 5:01:11 PM3/23/16
to Google App Engine

Hi Alejandro,

Yes, this is definitely supported.

Keep in mind though that they will be sharing all the other goodies like Datastore, Memcache etc., so each module will have the potential to clobber the other's data.

Nick

On 24/03/2016 7:54 AM, "Alejandro Magnani" <alejandr...@gmail.com> wrote:
I've a couple of app engine applications that interact to each other - some of them developed in python and others in java. I was wondering if I can merge the solutions in just one app engine with different modules without changing the code base. 

--
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/6ecaedc4-9eef-42f2-b4f9-a5e21647516a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Martelli

unread,
Mar 23, 2016, 5:05:29 PM3/23/16
to google-a...@googlegroups.com
Yes, an app's modules can be in different languages. You do need to pay care to how they share entries in the datastore or memcache (if they do such sharing) -- the byte-stream-level is typically not documented (if any interoperability is in fact possible). For example, if a Python module uses a field of type ndb.PickleProperty, there is, I believe, no way for a Java module to recover the underlying Python object (it would require "unpickling" and I don't think Java has a way to unpickle -- it's a Python-only protocol).

In this respect, it's pretty much as if, in a non-GAE context, different programs wrote and read data files from different programming languages; interoperability can then be murky.

To recover an arbitrary bunch of bytes from Python w/o any interpretation, declare those fields to be of type BlobProperty; from Java, com.google.appengine.api.datastore.Blob (or ShortBlob if < 1500 bytes). However, it's then up to you to explore how best to achieve whatever level of interoperation, if any, is needed.

Alex

On Wed, Mar 23, 2016 at 1:54 PM, Alejandro Magnani <alejandr...@gmail.com> wrote:
I've a couple of app engine applications that interact to each other - some of them developed in python and others in java. I was wondering if I can merge the solutions in just one app engine with different modules without changing the code base. 

--
Reply all
Reply to author
Forward
0 new messages