简体   繁体   English

带有Google App Engine的Activator Play Framework

[英]Activator Play Framework with google app engine

I am wanting to develop a GAE application. 我想开发一个GAE应用程序。 However, I have used the play framework before and very much liked its layout. 但是,我之前使用过play框架,非常喜欢它的布局。 I was wondering whether the latest version (2.3 I think) works with Google App Engine? 我想知道最新版本(我认为是2.3)是否可以与Google App Engine一起使用? I have seen posts about this before. 我以前看过有关此的帖子。 Some say it is not possible; 有人说这是不可能的。 I've seen a github project on porting the code over but no one has ever commented on the success of the project. 我见过一个关于将代码移植过来的github项目,但是没有人对项目的成功发表过评论。 I am concerned about losing efficiency/too much functionality. 我担心效率降低/功能过多。

Can it be done? 能做到吗

If not, any suggestions on frameworks (I know I am not really supposed to ask this second question on stackoverflow). 如果没有的话,关于框架的任何建议(我知道我真的不该问关于stackoverflow的第二个问题)。

Have a look at this repo which enables you to package your Play app in a war that you can deploy onto GAE. 请查看此存储库 ,它使您可以打包将Play应用打包,然后将其部署到GAE。

But you should consider the trade-offs before doing this. 但是在执行此操作之前,您应该考虑取舍。 Play was designed to be stateless/Asynchronous and GAE runs on Java Servlet Spec. Play设计为无状态/异步,并且GAE在Java Servlet Spec上运行。 This means (generally):- 这意味着(通常):-

  • your Play app will not be truly asynchronous on GAE 您的Play应用不会在GAE上真正异步
  • you may reduce performance a bit because you are running in servlet container on GAE (depending on your app though you may not even be able to measure this so I wouldn't worry too much about it) 您可能会降低性能,因为您是在GAE上的servlet容器中运行的(取决于您的应用程序,尽管您可能甚至无法测量它,所以我不必为此担心太多)

I have personally found that deploying my Play apps into Digital Ocean (I use Docker but you don;t have to) work really well for me. 我个人发现将Play应用程序部署到Digital Ocean(我使用Docker,但您不必这样做)对我来说确实很好。 I have used GAE in the past but I wouldn't deploy a Play app there for the reasons stated above. 我过去曾使用GAE,但由于上述原因,我不会在那里部署Play应用。 Heroku is a nice alternative but gets a bit costly if you need to scale out. Heroku是一个不错的选择,但是如果您需要扩展,则成本会更高。

I got Playframework to work on Goole App Engine (Flexible, Custom runtimes). 我让Playframework在Goole App Engine(灵活,自定义运行时)上工作。 It involves writing our own Docker image. 它涉及编写我们自己的Docker映像。 The integration isn't seamless (eg default credential doesn't work, so we have to use a JSON credential). 集成不是无缝的(例如默认凭据无效,因此我们必须使用JSON凭据)。

See: http://tanin.nanakorn.com/blogs/345 参见: http : //tanin.nanakorn.com/blogs/345

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

相关问题 使用Play Framework和Google App Engine的“ VerifyError:期待堆栈图框架” - “VerifyError: Expecting a stackmap frame” using Play Framework and Google App Engine 如何将Play Framework与Google App Engine和本地安装的Java 7结合使用? - How to use the Play Framework with Google App Engine with locally installed Java 7? Google App Engine的报告框架 - Reporting framework for Google App Engine 谷歌应用引擎上的速度框架 - velocity framework on google app engine 使用Activator在Play Framework Test中传递系统属性 - Pass System Properties in Play Framework Test with Activator 运行激活程序运行时找不到Play框架未找到值routeGenerator - Play framework not found value routesGenerator when running activator run Mac OS X Activator新播放框架错误 - Mac OS X Activator New Play Framework Error 运行Play Framework应用程序但未获得X11 DISPLAY变量的Google App Engine Flex设置错误; 在哪里设置此变量? - Google App Engine Flex on running Play Framework app getting No X11 DISPLAY variable was set error ; where do I set this variable? 您将使用哪些Java框架与Google App Engine合作? - What Java framework would you use with Google App Engine? 具有GAE的Ninja框架:访问Google App Engine开发控制台 - Ninja framework with GAE: accessing the google app engine development console
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM