Java and Python Together in Single Google App Engi

2019-06-22 01:04发布

I currently have a Java application running on Google App Engine, but I want to add the features that the Python module's SearchableModel provides (for search features of course). Is it possible to run python code in the same project as Java code, just under a different version? If not, could they be two separate apps (current Java app and a new Python-based search app) running against a single datastore, but I don't think that is possible.

2条回答
姐就是有狂的资本
2楼-- · 2019-06-22 01:49

It is possible to run Python and Java applications on different versions.

From:

Last but not least: remember that you can have different version of your app (using the same datastore) some of which are implemented with the Python runtime, some with the Java runtime, and you can access versions that differ from the "default/active" one with explicit URLs.

查看更多
Deceive 欺骗
3楼-- · 2019-06-22 02:00

Yes, you can write your app in Java and also have a separate version of your app running Python.

However, if the core of your app is already implemented in Java, you might want to look at the SearchableModel Python code, then consider implementing something to accomplish your goal in Java. The gist is that you could simply build your list of search-words and store them in a multivalued property (ie a list).

You should also check out the Building Scalable, Complex Apps on App Engine video. Depending on your use-case, moving the search-word list to an 'Index Relation Entity' might offer further improvements.

查看更多
登录 后发表回答