Google brews up a fresh pot of Java for its serverless Cloud Functions service
Still on Java 8? You'll need to upgrade to 11 to use it
Updated Google Cloud Platform has added Java 11 support to its serverless Cloud Functions service.
Cloud Functions, like AWS Lambda and Microsoft Azure Functions, lets you deploy code that runs in response to events or requests, and is priced on the basis of resources consumed when it runs. Languages (or more accurately runtimes) supported are Node.js, Python, Go, and now Java.
The jump from Java 8 to Java 9 was big, so this is a significant change, though some still prefer the older version for compatibility. It is curious that GCP is apparently not offering a choice. We have asked Google about this.
Google is offering not just the Java runtime but also a Functions Framework which has an API for coding functions that respond to HTTP requests or run in the background awaiting events from other services, such as file updates in Google Cloud Storage. There is also an adapter for Pivotal's Spring Boot, and another integration for the Microservices framework Micronaut.
Another key feature is that you can deploy the Functions Framework in other environments, including Cloud Run (for running containers), Google Kubernetes Engine, or any cloud or on-premises environment that runs Java. You can also code in other languages that run on the JVM (Java Virtual Machine), including Groovy, Kotlin and Scala.
Google developer advocate Guillaume Laforge noted that Java is "a language often used in enterprises" – perhaps an understatement, though many of those enterprise applications are still on Java 8. There is still no .NET support. ®
Updated to add at 1700 UTC on May 27
Google Cloud developer advocate Guillaume Laforge told The Reg: "We decided to go with Java 11 instead, as it's the latest LTS version of Java (Long Term Support)."