Recommended configuration for a java based App Engine standard application?

139 views
Skip to first unread message

Þórir Gunnarsson

unread,
Apr 4, 2017, 5:16:40 AM4/4/17
to Google App Engine
Lately I have been getting some mixed signals about what should be the configuration for a java based App Engine standard backend using endpoints. What I'm looking for is guidelines from Google or the group what would be best practices. The recommended configuration should be production ready and support local development and debugging.

As I see it there are several options (please add if I'm missing some options)
  - Environment
    - Maven
    - Eclipse
    - Maven project in Eclipse
    - Maven project in IntelliJ

  - Build plugin (assuming Maven is the way to go)
     - com.google.cloud.tools -> appengine-maven-plugin
     - com.google.appengine -> appengine-maven-plugin
     - com.google.appengine -> gcloud-maven-plugin

  - Endpoints
     - Endpoints v1
     - Endpoints v2

Some reference material:

Jeff Schnitzer

unread,
Apr 4, 2017, 9:24:52 AM4/4/17
to Google App Engine
Your path of least resistance is to use Maven (as opposed to Gradle or Ant/Ivy). If you’re working in Java, you definitely want an IDE - Eclipse and IntelliJ both have their following. I think most people will be happier with IntelliJ but you have to pay for it.

There are two viable maven plugins right now:

com.google.appengine:appengine-maven-plugin is the older and more mature plugin
com.google.cloud.tools:appengine-maven-plugin is the newer and not yet perfect plugin

I would say we are on the cusp of the newer plugin being ready for default use. It currently has trouble deploying the queue/cron configs, but it looks like it’s getting fixed fast. I actually have both enabled in my project right now.

You also have the choice of “older vs newer” plugin for Eclipse/IntelliJ. I would go with the newer one.

Someone else will have to give you endpoints advice.

Jeff

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/cd6225e2-e09b-454d-8ca3-c83faa4f377d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Þórir Gunnarsson

unread,
Apr 4, 2017, 9:49:30 AM4/4/17
to Google App Engine, je...@infohazard.org
I am currently using Maven and IntelliJ which in itself is fine. Most of my issues are with the Maven plugins and recently endpoints versions.
The com.google.cloud.tools plugin is not entirely there it seems, but in a lot of documentation from Google it is the go-to plugin.

I tried to switch to the com.google.cloud.tools plugin the other day but ran into an issue with the local dev server (https://issuetracker.google.com/u/1/issues/36589995) which prompted this thread here.

ÞG
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.

Jeff Schnitzer

unread,
Apr 4, 2017, 12:42:25 PM4/4/17
to Þórir Gunnarsson, Google App Engine
You’re not crazy, I have also seen that problem. Use the com.google.appengine maven plugin for the dev server for now. 

I think this is the most relevant (albeit cryptic) issue that tracks that particular problem: https://github.com/GoogleCloudPlatform/app-maven-plugin/issues/158

The com.google.tools plugin is the future, but the future isn’t quite here yet :-(

Jeff

Þórir Gunnarsson

unread,
Apr 6, 2017, 4:57:37 AM4/6/17
to Google App Engine, thorirgu...@goodlifeme.com, je...@infohazard.org
Does anyone have any insights into endpoints v1 vs. endpoints v2? Any real life success stories perhaps?

We recently switched to endpoints v2 but without the endpoints management functionality, I'm hesitant to go all in if this isn't being used in production systems by at least a few people, or if it is not production ready in general.

ÞG

Adam (Cloud Platform Support)

unread,
Apr 7, 2017, 4:50:49 PM4/7/17
to Google App Engine, thorirgu...@goodlifeme.com, je...@infohazard.org
You can still use Endpoints v2 tooling with the 'com.google.appengine' plugin as it is handled by endpoints-framework-tools and gcloud service-management. The only difference should be the version of the dev server you launch for local development. What specific issues with endpoints management did you encounter when switching back to the 'com.google.appengine' plugin?

Þórir Gunnarsson

unread,
Apr 7, 2017, 5:23:14 PM4/7/17
to Google App Engine, thorirgu...@goodlifeme.com, je...@infohazard.org
I didn't encounter any specific issues with the endpoints management functionality as such, didn't go that far, the documentation is just all referencing the com.google.cloud.com tools and I wanted to get some feedback on where these things are at before going into implementation. 
From what I could glimpse from the documentation (https://cloud.google.com/endpoints/docs/frameworks/java/generate-client-libraries-android) of the configuration it seemed that I need to be more explicit about what java classes implement endpoints, at least when generating the client library. At the moment I have 35 different classes with around 300 different @ApiMethods so listing them all up and maintaining the list is something I need to do in a sustainable way. You could probably argue that I'm just lazy wanting reassurance before moving into new tech and writing scripts to support it :-)

Which development server should I use if I enable the endpoints management functionality? Does the one in com.google.appengine work?

ÞG

Adam (Cloud Platform Support)

unread,
Apr 10, 2017, 1:13:57 PM4/10/17
to Google App Engine, thorirgu...@goodlifeme.com, je...@infohazard.org
The 'com.google.appengine' development server works without issues with endpoints management in all of the v2 projects I've tested it with. The only changes I've needed are the following:

1) In the pom.xml for the project, change 'com.google.cloud.tools' to 'com.google.appengine' and change the <version> to the appropriate App Engine SDK version (eg. 1.9.51) in the 'appengine-maven-plugin' <plugin> section.

2) Replace the new maven goals on the command line with the old ones (eg. 'mvn appengine:devserver' instead of 'mvn appengine:run').

The Endpoints tooling and managment is handled by the separate JARs 'com.google.endpoints.endpoints:framework' and 'com.google.endpoints:endpoints-management-control-appengine-all' which don't have a dependency on the specific devserver you're using.

The Java parts of the two devservers in fact are virtually identical, it's the Python layer that is different (and the primary source of the issues in the Cloud SDK devserver).

Þórir Gunnarsson

unread,
Apr 11, 2017, 4:45:14 AM4/11/17
to Google App Engine, thorirgu...@goodlifeme.com, je...@infohazard.org
Excellent news, thanks for looking into this. I will add enabling the endpoints v2 tooling to my todo list, the feature set and management aspects sound like something I could benefit from.

ÞG
Reply all
Reply to author
Forward
0 new messages