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!