简体   繁体   中英

Activator Play Framework with google app engine

I am wanting to develop a GAE application. However, I have used the play framework before and very much liked its layout. I was wondering whether the latest version (2.3 I think) works with 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. 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).

Have a look at this repo which enables you to package your Play app in a war that you can deploy onto 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. This means (generally):-

  • your Play app will not be truly asynchronous on 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)

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. I have used GAE in the past but I wouldn't deploy a Play app there for the reasons stated above. Heroku is a nice alternative but gets a bit costly if you need to scale out.

I got Playframework to work on Goole App Engine (Flexible, Custom runtimes). It involves writing our own Docker image. The integration isn't seamless (eg default credential doesn't work, so we have to use a JSON credential).

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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