More than one google app engine application (microservice) in a project

4,275 views
Skip to first unread message

opensourcegeek

unread,
Feb 4, 2015, 9:30:50 AM2/4/15
to google-a...@googlegroups.com
Hi all,

I've been thinking about deploying multiple microservices as app engine applications, but so far I cannot find a way to deploy multiple app engine applications to one single project. I'm on a free trial at the minute, so is this functionality to be able to create multiple app engine applications available at all? Or is this option not available to me because I'm on free trial?

I think I can work around one google app engine application per project by creating new projects and running google app engine application there. I'm not sure what other features I lose because of deploying one app engine application per project when they need to communicate to each other.

Any advice on running microservices on Google app engine would be great.


Thanks.

Anthony Shapley

unread,
Feb 4, 2015, 9:37:39 AM2/4/15
to google-a...@googlegroups.com
Hi,

You could look to deploy different application versions - which would run independently of one another inside a single App Engine project. Each version would be available on a different hostname e.g.


and so forth.

Thanks
Ant

Kind Regards,
Anthony Shapley

Follow me on TwitterFacebook or Google+. Visit the website to see our work.


--
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/a78d9a08-7566-4fe4-b9b4-edb387f8c5d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

opensourcegeek

unread,
Feb 4, 2015, 9:45:07 AM2/4/15
to google-a...@googlegroups.com
Hi Anthony,

Thanks - but these are parts of an app engine's application not the whole application itself. I'd like to run say data acquisition service on app engine for one of the streams of data and I'd like to add another stream as another app engine application. And if possible I'd like to deploy all these different applications into one single project. 

Do you know if there's a limit on how many app engine applications can be deployed under one project?

Alex Martelli

unread,
Feb 7, 2015, 11:28:02 AM2/7/15
to google-a...@googlegroups.com


On Wednesday, February 4, 2015 at 6:45:07 AM UTC-8, opensourcegeek wrote:
Hi Anthony,

Thanks - but these are parts of an app engine's application not the whole application itself. I'd like to run say data acquisition service on app engine for one of the streams of data and I'd like to add another stream as another app engine application. And if possible I'd like to deploy all these different applications into one single project. 

Do you know if there's a limit on how many app engine applications can be deployed under one project?

Per https://cloud.google.com/appengine/kb/general#create , and I quote, "Each account can host 25 free applications and an unlimited number of paid applications Google App Engine" -- but that's per-*account*, not per-*project*, where I believe the relationship is 1:1.

What advantages do you think "separate applications" within one project would bring you over both "separate *modules*" (with datastore namespaces if you want to segregate their datastore use) within one application, and separate projects within one account?  (I do see how the older trick of using separate "versions" for what were logically distinct apps was more problematic, but the *modules* feature fixs that -- ditto for namespaces when you don't want the logically-distinct-apps' datastores to mingle, I could see problems before the "namespaces" feature, but not now).

I'm asking because, right now, I don't understand what added-value you'd get by making the project-app relationship 1:many, vs the modules/namespace alternative approach -- what would you become able to do that you can't now, or, what would you become vastly more productive at doing wrt today.  Given that I don't understand, I would not be able to speak in favor of a feature request on the issue should you open one; if you explain in much more detail, then I might be able to gain said understanding!


Thanks,

Alex

opensourcegeek

unread,
Feb 7, 2015, 12:40:11 PM2/7/15
to google-a...@googlegroups.com
Hi Alex,

It was my ignorance, after posting this question, I was on #appengine channel on IRC and the friendly folks there have pointed me to modules/namespaces. I currently have tried 4 different modules within single application and they all work fine. 

One annoying thing I found was the default module is currently serving the root page(https://myappid.appspot.com/), and I want the default module to be just a router and forward "https://myappid.appspot.com/" to my UI module. This is probably possible already but I haven't tried it yet. Other than that I'm quite happy with modules/namespaces idea and it quite nicely adheres to creating microservices as well.

Thanks.

Alex Martelli

unread,
Feb 7, 2015, 1:58:44 PM2/7/15
to google-a...@googlegroups.com
On Sat, Feb 7, 2015 at 9:40 AM, opensourcegeek <3.pr...@gmail.com> wrote:
Hi Alex,

It was my ignorance, after posting this question, I was on #appengine channel on IRC and the friendly folks there have pointed me to modules/namespaces. I currently have tried 4 different modules within single application and they all work fine. 

Yay, great to hear about this!
 

One annoying thing I found was the default module is currently serving the root page(https://myappid.appspot.com/), and I want the default module to be just a router and forward "https://myappid.appspot.com/" to my UI module. This is probably possible already but I haven't tried it yet. Other than that I'm quite happy with modules/namespaces idea and it quite nicely adheres to creating microservices as well.

This might be a better Q for Stackoverflow, unless your problem just goes away when you try appropriately tweaking your dispatch.yaml, of course (or the META-INF and its xml contents in the Java EAR, plus the dispatch.xml in the WEB-INF of the default module, if you code in Java, I believe, though I'm not very familiar with that aspect of GAE). 

Thanks,

Alex


Thanks.
  

On Wednesday, February 4, 2015 at 2:30:50 PM UTC, opensourcegeek wrote:
Hi all,

I've been thinking about deploying multiple microservices as app engine applications, but so far I cannot find a way to deploy multiple app engine applications to one single project. I'm on a free trial at the minute, so is this functionality to be able to create multiple app engine applications available at all? Or is this option not available to me because I'm on free trial?

I think I can work around one google app engine application per project by creating new projects and running google app engine application there. I'm not sure what other features I lose because of deploying one app engine application per project when they need to communicate to each other.

Any advice on running microservices on Google app engine would be great.


Thanks.

--
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.

Anirudh Kasturi

unread,
Oct 14, 2016, 9:23:41 AM10/14/16
to Google App Engine
Hi ,
I've got a small problem here. I've tried to run different modules and all work fine when they are from same language i.e. I've tried to have one module written in python and the other in php. This also works fine. But currently unable to understand how to deploy locally a python module and a java module using dispatch.yaml as python and php were both using dev_appserver.py whereas java needs an mvn or a dev_appserver.sh to run. Could you please let me know if you have come across this issue ?

Thanks,
Anirudh

Nicholas (Google Cloud Support)

unread,
Oct 14, 2016, 10:58:25 AM10/14/16
to Google App Engine
Hi Anirudh,

Thanks for sharing your questions here!  As your question is about running modules of different runtimes in the development environment, I would suggest that you post to a new thread for things like this in the future.  Nevertheless, I'll respond in this one.

As far as I'm aware, it's not really possible to run Java and non-Java modules/services in a single development environment at the same time.  You would need to run both dev_appserver.sh for the Java modules and dev_appserver.py for the non-Java modules.  You will also probably want to specify --admin_port and --port for dev_appserver.py to ensure it doesn't attempt to use ports already bound to dev_appserver.sh.

As for inter-module communication, I don't think you'll be able to use the ModulesService package to send messages between modules locally though they should work when deployed to production.  From memory, the local development version of the modules service does not scan for ports bound to dev_appserver-related instances but rather uses whatever ports are selected when a particular dev_appserver instance is loaded.  It thus, would not be aware of modules running on different instances of dev_appserver.

By specifying the ports to be used however, you could store the ports in an environment variable and have your development code issue requests to those ports.  The downside is that said code would not be useful in production as it would not take advantage of internal module-to-module communication.

I hope the above answers your questions.  If you have any additional questions or specific examples, they are certainly welcome!

Karolína Netolická

unread,
Oct 14, 2016, 7:26:19 PM10/14/16
to Google App Engine
I thought I'd also point to the following article which talks about App Engine and Microservices:


I think this thread has already gotten into more depth than the article goes into, but perhaps it will still be useful.

Regards,
Karolina (Product Manager on App Engine)
Reply all
Reply to author
Forward
0 new messages