简体   繁体   English

带有GWT的App Engine模块

[英]App Engine Modules with GWT

I'm looking for advice on how to set up a Google App Engine project that involves multiple modules where one module a GWT project. 我正在寻找有关如何设置涉及多个模块的Google App Engine项目的建议,其中一个模块是GWT项目。 I've read through Google App Engine module documentation ( https://developers.google.com/appengine/docs/java/modules/ ) and found some help on Stackoverflow such as this post GWT GAE app engine modules using appengine-skeleton-archetype . 我已经阅读了Google App Engine模块文档( https://developers.google.com/appengine/docs/java/modules/ ),并在Stackoverflow上找到了一些帮助,例如使用appengine-skeleton-的这篇帖子GWT GAE app引擎模块原型 However, it this involves a lot of pieces so I'd love to get some advice. 然而,这涉及很多部分,所以我很乐意得到一些建议。

Platform considerations: 平台考虑:

Design: 设计:

Conceptually, I'd like a system that does computationally intensive work that can be scheduled by an end user with nice HTML interface. 从概念上讲,我想要一个能够进行计算密集型工作的系统,这个系统可以由具有良好HTML界面的最终用户安排。 I really like GWT and the Google Plugin for Eclipse. 我非常喜欢GWT和Eclipse插件。 I just can't figure out how to make it work with modules which allow for indefinite deadlines (as described at https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class ) 我无法弄清楚如何使它与允许无限期限的模块一起工作(如https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class中所述

Architecture: 建筑:

1] GWT user interface: I'd like to use the Google Plugin for Eclipse to generate a basic GWT project because I'm very familiar with Google Plugin for Eclipse. 1] GWT用户界面:我想使用Google Plugin for Eclipse生成一个基本的GWT项目,因为我非常熟悉Eclipse的Google Plugin。

1.a] I assume it needs to be its own Eclipse project and then added to added to an EAR as described here https://developers.google.com/appengine/docs/java/webtoolsplatform#enterprise_application . 1.a]我认为它需要是自己的Eclipse项目,然后添加到添加到EAR中,如https://developers.google.com/appengine/docs/java/webtoolsplatform#enterprise_application所述

1.b] I assume it needs to be configured with instance scaling Automatic as described here https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class . 1.b]我认为需要配置实例扩展自动,如https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class所述 Do I have to specify Automatic or does it assume Automatic for a GWT module created with the Google Plugin for Eclipse? 我是否必须指定自动,或者它是否为使用Google Plugin for Eclipse创建的GWT模块假设为自动?

2] Basic Scaling Module: I'd like a module that's capable of running for a long time. 2]基本缩放模块:我想要一个能够运行很长时间的模块。 In the past I used scheduled tasks and let my jobs run in 10 min intervals (the maximum allowed processing time for scheduled tasks). 在过去,我使用计划任务,让我的作业以10分钟的间隔运行(计划任务的最大允许处理时间)。 But according to https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class I can have a module with Scaling Type = Basic and that will allow for unlimited processing time. 但根据https://developers.google.com/appengine/docs/java/modules/#Java_Instance_scaling_and_class,我可以使用Scaling Type = Basic的模块,这将允许无限制的处理时间。 Me likey. 我喜欢。

3] Task Queues: I plan to use Task Queues ( https://developers.google.com/appengine/docs/java/taskqueue/ ) to get the GWT user interface module to tell the Basic Scaling Module to begin its work. 3]任务队列:我计划使用任务队列( https://developers.google.com/appengine/docs/java/taskqueue/ )获取GWT用户界面模块,告诉Basic Sc​​aling模块开始工作。 I've never used Task Queues, so I'd appreciate validation that this should work. 我从来没有使用任务队列,所以我很欣赏验证这应该有用。

To summarize my questions: 总结一下我的问题:

A] Is my design concept feasible? A]我的设计理念是否可行?

B] Is the architecture I've outline possible? B]我概述的架构是否可行?

C] How do I actually produce the desired architecture? C]我如何实际产生所需的架构? Should I manually create all the config files described at https://developers.google.com/appengine/docs/java/modules/#Java_Application_hierarchy ? 我应该手动创建https://developers.google.com/appengine/docs/java/modules/#Java_Application_hierarchy中描述的所有配置文件吗? Or is it supposed to be generated by Maven, Web Tools Platform, or Google Plugin for Eclipse? 或者它应该由Maven,Web Tools Platform或Eclipse插件生成?

D] More specifically, I'm able to set up a basic EAR and WAR as per https://developers.google.com/appengine/docs/java/webtoolsplatform#creating_a_project . D]更具体地说,我可以根据https://developers.google.com/appengine/docs/java/webtoolsplatform#creating_a_project设置基本的EAR和WAR。 And I'm able to create a GWT project using the Google Plugin for Eclipse. 我可以使用Google Plugin for Eclipse创建一个GWT项目。 But how do I add that GWT project to the EAR? 但是如何将该GWT项目添加到EAR? Am I supposed to configure the files myself or is it supposed to be done for me by Maven, Web Tools Platform, or Google Plugin for Eclipse? 我应该自己配置文件还是应该由Maven,Web Tools Platform或Eclipse插件为我完成?

The more detailed answer you can provide, the better, because I don't have comprehensive knowledge of all these technologies. 您提供的答案越详细越好,因为我对所有这些技术都没有全面的了解。 I'm a guy who glues cool new things together to prototype stuff, so I rarely get the time to learn a technology in-depth. 我是一个将很酷的新东西粘在一起制作原型的人,所以我很少有时间深入学习技术。 My strongest knowledge is Google Plugin for Eclipse so ideally I'd like to leverage that as much as possible and do as little as possible with Maven and the Web Tools Platform. 我最强大的知识是Google Plugin for Eclipse,所以我希望尽可能地利用它,并尽可能少地使用Maven和Web Tools Platform。

Thank you so much Stackoverflowers! 非常感谢Stackoverflowers! :-P :-P

Michael 迈克尔

I've received the following answer from Albert at Google Cloud Platform Support: 我在Google云平台支持下收到了Albert的以下答案:

After intensive research and reviewing this with my team, it seems like having this working through Eclipse isn't as easy as we'd want it. 经过深入研究并与我的团队一起回顾这一点,似乎通过Eclipse工作并不像我们想要的那么容易。 Albeit possible to set up a module as a GWT application, it will not be recognized as GWT and the compilation will therefore not be available via the right-click context menu. 虽然可以将模块设置为GWT应用程序,但它不会被识别为GWT,因此通过右键单击上下文菜单无法进行编译。 This is due to the Eclipse Plugin not recognizing modules, and the Enterprise Application Project type of project not allowing to set a module as a GWT application. 这是因为Eclipse插件无法识别模块,而企业应用程序项目类型的项目不允许将模块设置为GWT应用程序。

I would recommend that you open a feature request using the public issue tracker[1] for that functionality to be added in the future. 我建议您使用公共问题跟踪器[1]打开功能请求,以便将来添加该功能。 In the meantime, the easiest workaround would be to do exactly what we have tried, which is to code the application in a GWT app, and then copy/paste the files into the appropriate directories after compilation. 与此同时,最简单的解决方法是完全按照我们的尝试进行操作,即在GWT应用程序中编写应用程序代码,然后在编译后将文件复制/粘贴到相应的目录中。 Another alternative would be to run the command line tool[2] on the GWT directory to compile the project. 另一种方法是在GWT目录上运行命令行工具[2]来编译项目。

I know that these aren't perfect solutions, but they may be helpful to you. 我知道这些不是完美的解决方案,但它们可能对您有所帮助。

As this should answer your question, I'll go ahead and set the case to close in a few days. 由于这应该回答你的问题,我会继续并在几天内结案。 I'd also like to take the opportunity to thank you for all your patience through this matter. 我也想借此机会感谢你对这件事的耐心。 It's been a pleasure working with you. 和你一起工作很愉快。

Sincerely, 此致

Albert Cloud Platform Support Albert Cloud Platform支持

[1] Google Plugin for Eclipse Issue Tracker: https://code.google.com/p/google-plugin-for-eclipse/ [2] GWT Compilation: http://www.gwtproject.org/doc/latest/RefCommandLineTools.html [1]适用于Eclipse的谷歌插件问题跟踪器: https//code.google.com/p/google-plugin-for-eclipse/ [2] GWT编译: http//www.gwtproject.org/doc/latest/ RefCommandLineTools.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM