We switched to the java8 runtime recently, and for the most part didn't experience any major issues (yet). Performance did definitely improve for us, compared to java7. On standard environment, we use a bunch of Google cloud services, including Datastore, Vision API, Storage, Compute Engine, Memcache, Pubsub, UserService, SearchService and BigQuery. All of them seem to work without issues after upgrading to java8.
Currently, we try to make use if some of the new grpc feature java8 is advertised with. Unfortunately, things seem to be considerably more unstable there. Based on the example here [1], we tried to get Spanner to work on java8, using the ideomatic Java client libraries from google-cloud-java. The example itself executes without problems, but any slight variation in code structure will throw off the grpc initialization code and break the example. We tracked the problem down to GrpcUtils.TIMER_SERVICE and GrpcUtils.SHARED_CHANNEL_EXECUTOR. In the official example, classloading side effects seem to determine the type of ThreadFactory that backs these final static fields. If the effective ThreadFactory turns out to be a ThreadManager.currentRequestThreadFactory(), because the initialization happened in a context where MoreExecutors.isAppEngine() returns true, everything falls apart and we are left with a NullPointerException in ApiProxyImpl:1267 later on, when the Spanner session pool tries to create a session [2]. If we - somewhat brutally - force GrpcUtils.TIMER_SERVICE and GrpcUtils.SHARED_CHANNEL_EXECUTOR to use a Executors.defaultThreadFactory() like this [3], we get a working grpc Spanner setup on Appengine Standard! So java8 looks promising, but from this experience we think it still needs some work. - c [1] https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/appengine-java8/spanner [2] https://gist.github.com/cmaan/6aed2228516a9ae3c98a883ea9d6d815 [3] https://gist.github.com/cmaan/7752e3c4fd0b1ba90a745cb6db232206 On Thursday, July 6, 2017 at 9:45:38 PM UTC+2, Patrick Jackson wrote: > > Super excited to see Java 8 support. The removal of the white-list is > also huge! Curious about other's experiences with it so far. Any > instability, things to note or consider. > I know this is beta and no SLA until GA and all that, just would be > interested to hear from any devs that have been using it for real apps and > traffic. > > -Patrick Jackson > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/0eb74221-3098-41e3-b53b-d74e85680236%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
