Java SE 9 a perfect fit for a nimble, scalable and serverless future
Last year’s JavaOne conference generated quite a bit of excitement with the discussion of many of the new Java SE 9 features. But this year’s event is already proving to be more groundbreaking. From making every aspect of Oracle’s Java EE open source to introducing Functions as a Service, each speaker in the opening keynote brought a little more excitement to the crowds gathered in San Francisco, California.
An open Java SE 9
The biggest announcements during the keynote were the intention to make the Eclipse Foundation the new steward of Java EE. All the elements of the commercial version of the Oracle JDK will become available in the Open JDK as well, giving developers unprecedented access to features that were previously available only to the enterprise elite. In addition, Oracle committed to stepping up the speed of releases. According to Mark Reinhold, Chief Architect of Java, the new timeline of releasing every six months instead of every few years accomplishes a couple of goals. “It helps us move forward and do so faster.” But speed isn’t the only focus. “Features go in only when they are ready. If a feature misses a current release, that’s OK. Because it’s only six months to the next one. It’s fast enough to deliver innovation at a regular pace, and slow enough to maintain high levels of quality.”
A nimble Java SE 9
According to Mark Cavage, VP of Product Development at Oracle, Java SE and Java SE 9 offer over 100 new features and streamline the JVM with better support for containers that will allow the platform to evolve in new ways. “You can get just enough Java and just enough JVM to right-size the JVM for a cloud world.” Niklas Gustavsson, Principal Architect at Spotify, spoke about how his organization has gradually shifted more and more of its services to Java as the need to scale its cloud-based offering has grown with its user base.
With 140 million Agile users and 3 billion streaming songs per day, the service had to handle 4 million requests to the backend per second. Over time, Spotify shifted more and more of its services from Python to Java. Better stability and scalability were just two benefits. But transparency was just as important. With the JVM, “We could observe what was happening in runtime in two ways: collecting runtime metrics on the platform itself or profiling the service while running in production.” Spotify deliberately used a microservices architecture to make it easier to shift to Java piece by piece as it made sense to do so. This approach allowed them to scale each service separately to meet the needs of a wide range of user behaviors and ensured that any outages were well-contained.
Containers and serverless architecture
Kubernetes was championed by Cavage as the optimal open-source container option for the Java community. Heptio CEO Craig McLuckie spoke in more detail about the ability of containers to simplify operations “Containers are hermetically sealed, highly predictable units of deployment with high portability.” With the use of dynamic orchestration technology, much of the work of operations can be automated. Craig also pointed out that containers, in a sense, may spell the demise of middleware as it currently exists, separating it into two different layers with containers on one side and application level libraries on the other. And flexibility is inherent. As well as containers and the cloud work together, McLuckie pointed out that this pairing is optional since Kubernetes could just as easily be deployed on premises.
On the Agile developer side, going serverless was highlighted by Mark as “a Compute abstraction that takes away all notion of infrastructure from the user/developer.” It could be applied to many different use cases from compute to DB to storage, allowing developers to focus on functions and services that meet business needs.
Functions as a Service
FaaS was showcased in the form of the Oracle FN project headed by VP of Product Development, Chad Arimura. This three-pronged technology starts with the FaaS platform which should allow developers to build, deploy, and scale in a multi-cloud environment—while running FN locally on their laptop. The Function Development Kit (FDK) was the second part of the puzzle, “It allows developers to easily boostrap functions and has a data binding model to bind the input to your functions to common Java objects and types.” The FDK is Lambda compatible and has Docker as its only dependency. The FN Flow system is the final piece, enabling developers to build higher level work flows and orchestrate functions in complex environments. Arimura showed off Oracle’s commitment to open source with a few mouse clicks at the end of his presentation, providing the whole world with access to the project.
More to come…but hard to top this year
The keynote ended with a review of some of the same features discussed in 2016, with Jigsaw and Project Panama receiving substantial attention. The Amber project for right-sizing language ceremony was mentioned and will no doubt be showcased at next year’s JavaOne. Another contender is the Loom project which is still in the discussion phase. While each new conference reveals fresh features, it will be difficult to beat the excitement of having unlimited access to every aspect of Java SE 9.