开发服务器上的GAE模块 [英] GAE modules on development server

查看:110
本文介绍了开发服务器上的GAE模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google AppEngine中使用了多个模块,并想知道是否可以运行开发服务器(Java版本),以便分配给不同模块的端口始终保持相同?目前他们似乎是随机的。我可以决定这些端口吗?我希望能够以可持续的方式(从发展角度)建立模块之间的沟通。目前,如果我们有两个模块,我们称它们为A和B,并且我们想要使用模块B中的模块A公开的服务,但是没有简单的方法来知道从模块B访问哪个URL。

解决方案

尽管模块服务可能在这种情况下很有用,我相信它会起作用,我以一种不同的方式解决问题。



我修改了我的构建脚本运行在本地主机上的所有模块,但在不同的端口(本质上有几个本地appengine实例运行)。配置信息(IP:PORT)存储在配置文件中,任何模块均可轻松访问。对于部署,我仍然将应用程序打包到 ear 存档中。

I'm using multiple modules with Google AppEngine and was wondering if its possible to run development server (java version) so that ports that are assigned to different modules are always the same? At the moment they seem to be random. Can I decide on those ports? I would like to be able to establish communication with between modules in a sustainable way (from the development perspective). At the moment if we have two modules, let's call them A and B, and we would like to consume services exposed by module A in module B there's no easy way to know which URL to hit from module B.

解决方案

Although the modules service could be useful in this scenario, and I believe it would work, I solve the problem in a bit different way.

I modified my build script to run all the modules on localhost, but on different port (essentially there are a few local appengine instances running). The configuration information (IP:PORT) is stored in a configuration file and is easily accessible to any module. For the deployment I still package the application into an ear archive.

这篇关于开发服务器上的GAE模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆