Java8 on standard: need to migrate off Endpoints v1?

151 views
Skip to first unread message

Charles Capps

unread,
Sep 21, 2017, 9:07:13 AM9/21/17
to Google App Engine
Hi, I have a very important question pertaining to our use of Java8 on GAE Standard. In the Release Notes for the Appengine SDK [1], it says:
  • Cloud Endpoints must be migrated from v1 to v2.
in the release on June 28, 2017. We would like to use Java8, but we need to stay on Endpoints v1 for a few months until we have the time to do the migration (we are actually migrating to a different HTTP Framework, but that is irrelevant to this discussion.) 

Will anything break if we use Endpoints v1 with Java8 for the time being?

Stefano Ciccarelli

unread,
Sep 21, 2017, 9:30:17 AM9/21/17
to Google App Engine
Endpoints V1 simply don't work on Java8, you get some exception on boot for missing classes.


--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@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/87594945-eef0-47a3-be51-112bad038c46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Stefano Ciccarelli 
GAE Application Division 
/ Director 
stefano.c...@mmbsoftware.it 

M.M.B. s.r.l. 
via Granarolo, 177/7 - 48018 Faenza (RA) - Italy 
tel. +39.0546.637711 - fax +39.0546.46077 
www.mmbsoftware.it - in...@mmbsoftware.it

Le informazioni contenute in questa comunicazione sono riservate e destinate esclusivamente alla/e persona/e o all'ente sopra indicati. E' vietato ai soggetti diversi dai destinatari qualsiasi uso, copia, diffusione di quanto in esso contenuto sia ai sensi dell'art. 616 c.p., sia ai sensi del DL n. 196/03. Se questa comunicazione Vi e' pervenuta per errore, Vi preghiamo di rispondere a questa e-mail e successivamente cancellarla dal Vostro sistema.

Yannick (Cloud Platform Support)

unread,
Sep 21, 2017, 10:46:23 AM9/21/17
to Google App Engine
Hello Charles, the Endpoints API v1 is indeed deprecated and thus, like Stefano points out, doesn't have support for new features such as Java 8 on App Engine standard.

Is the migration procedure prohibitively difficult to use in your situation?


On Thursday, September 21, 2017 at 9:30:17 AM UTC-4, Stefano Ciccarelli wrote:
Endpoints V1 simply don't work on Java8, you get some exception on boot for missing classes.


Il giorno gio 21 set 2017 alle ore 15:06 Charles Capps <cha...@premise.com> ha scritto:
Hi, I have a very important question pertaining to our use of Java8 on GAE Standard. In the Release Notes for the Appengine SDK [1], it says:
  • Cloud Endpoints must be migrated from v1 to v2.
in the release on June 28, 2017. We would like to use Java8, but we need to stay on Endpoints v1 for a few months until we have the time to do the migration (we are actually migrating to a different HTTP Framework, but that is irrelevant to this discussion.) 

Will anything break if we use Endpoints v1 with Java8 for the time being?

--
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.
--

Stefano Ciccarelli 
GAE Application Division 
/ Director 


M.M.B. s.r.l. 
via Granarolo, 177/7 - 48018 Faenza (RA) - Italy 
tel. +39.0546.637711 - fax +39.0546.46077 

Charles Capps

unread,
Sep 21, 2017, 2:36:27 PM9/21/17
to Google App Engine
Thanks for clarifying, Yannick. Our migration is somewhat difficult, mainly because we are moving to a different REST framework entirely (Jersey) because we found the performance of Endpoints v2 to be slow in multiple experiments, and we simply don't need the layer that Endpoints v2 provides on top of a REST framework. We have to do a 2-phased migration since Jersey can't host paths at /_ah/api/* and switch over all consumers of our API to the new Jersey paths before turning off Endpoints v1.

TL; DR it's OK we're planning on migrating anyway, but this means we can't use Java8 until after we migrate off Endpoints v1. Thanks again for clarifying.


On Thursday, September 21, 2017 at 7:46:23 AM UTC-7, Yannick (Cloud Platform Support) wrote:
Hello Charles, the Endpoints API v1 is indeed deprecated and thus, like Stefano points out, doesn't have support for new features such as Java 8 on App Engine standard.

Is the migration procedure prohibitively difficult to use in your situation?

On Thursday, September 21, 2017 at 9:30:17 AM UTC-4, Stefano Ciccarelli wrote:
Endpoints V1 simply don't work on Java8, you get some exception on boot for missing classes.


Il giorno gio 21 set 2017 alle ore 15:06 Charles Capps <cha...@premise.com> ha scritto:
Hi, I have a very important question pertaining to our use of Java8 on GAE Standard. In the Release Notes for the Appengine SDK [1], it says:
  • Cloud Endpoints must be migrated from v1 to v2.
in the release on June 28, 2017. We would like to use Java8, but we need to stay on Endpoints v1 for a few months until we have the time to do the migration (we are actually migrating to a different HTTP Framework, but that is irrelevant to this discussion.) 

Will anything break if we use Endpoints v1 with Java8 for the time being?

--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
--

Stefano Ciccarelli 
GAE Application Division 
/ Director 


M.M.B. s.r.l. 
via Granarolo, 177/7 - 48018 Faenza (RA) - Italy 
tel. +39.0546.637711 - fax +39.0546.46077 

Nico Verwer

unread,
Sep 22, 2017, 2:52:47 AM9/22/17
to Google App Engine
Is there a guide on how to use Jersey on App Engine?
I am still on Cloud Endpoints v1, and I am reluctant to migrate to v2 because it might be deprecated before I finish the migration. Jersey is probably more stable and future-proof. And, as you indicate, it is faster than GCE v2.

Charles Capps

unread,
Sep 22, 2017, 11:32:01 AM9/22/17
to Google App Engine
Hi Nico,

It's a straightforward process if you use the Jersey Servlet container, since GAE works well with any servlet-based technology. In the services we have already migrated to Jersey, we only need these 2 maven dependencies from Jersey (currently using version 2.25.1):

<dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet-core</artifactId>
      <version>${jersey.version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jackson</artifactId>
      <version>${jersey.version}</version>
    </dependency>

Then, in your web.xml, you can define a servlet like:
<servlet>
    <servlet-name>MyServiceApplication</servlet-name>
    <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
    <init-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>com.mycompany.jersey.MyServiceApplication</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

where the MyServiceApplication class extends the JAX-RS Application base class, for which you can find documentation at https://jersey.github.io/documentation/latest/index.html
 
Good luck migrating!

Frank Natividad

unread,
Sep 26, 2017, 4:44:33 PM9/26/17
to Google App Engine
Hi Charles,

I'm curious about the different experiments performed with Endpoints Frameworks v2. Could you tell us more about that? 

Thanks!

Charles Capps

unread,
Sep 26, 2017, 5:18:55 PM9/26/17
to Google App Engine
We did A/B testing where we deployed:
* Version A of simple service - implemented with Jersey and swagger annotations
* Version B of simple service - identical code, but with Endpoints v2 servlet filters, and Endpoints v2 deployed along with the service using the generated swagger.json.

We ran Gatling tests that did thousands of requests from a GCE virtual machine (to rule out any slowness in our local internet connection.) 

Version A -- which was identical except we didn't deploy Endpoints v2 -- was consistently ~100ms faster. 

We reproduced this in multiple tests, including a test that deployed one of our real world services with or without Endpoints v2.

There seems to be some significant lag introduced by Endpoints v2. We also just don't need whatever console page is added by adding the Endpoints v2 servlet filters and so on.

Charles Capps

unread,
Sep 26, 2017, 5:22:08 PM9/26/17
to google-a...@googlegroups.com
Typo, it was slower, not faster.

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/Ab-1Pa8GJE0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages