Microservices, Java-on-Java top Oracle’s JVM design goals

Oracle's ambitious plans focus on density, scaling, and stronger language capabilities

Oracle's plans for the Java Virtual Machine include greater language support, as well as accommodations for microservices and a heavier reliance on Java programming itself.

"We want a VM that will continue to be polyglot, that will interoperate with unmanaged languages, implement well-managed languages," said John Rose, Oracle JVM architect, during the company's recent JVM Language Summit conference in Silicon Valley. "Maybe in the next decade or so we'll see C programs or C++ programs running in managed mode on top of the JVM. I wouldn't be surprised." In recent years, the JVM has become a home for a quite a few languages, including Scala, Clojure, JRuby, and Groovy.

Rose also cited a trend toward layered software implementations involving strong abstractions, a simplified data model, and Java-on-Java, in which Java is implemented on top of itself. The Graal Project, leveraging Java for writing JVM runtimes and compilers for other languages, and Project Panama, for interoperability between Java and C/C++, help drive Java-on-Java. Instead of having a lot of C++ code and a bytecode interpreter atop a stack, there would be various factored layers, perhaps low layers of C++, midlayers of low-level Java, specially compiled ahead-of-time Java, and Java components.

Java-on-Java "heals the rift between having to code in C++ and Java at the same time," according to Rose. "It lets you use one high-leverage point, the Java compiler and the Java JiT and the Java type system, to manage more of the important parts of your system."

Density and scaling goals for the JVM include enabling it to work with microservices. "We want those terabyte heaps," Rose said. "We also want to be able to do tiny microservices, maybe running a few of them in the JVM or maybe a million of them in the JVM but independently." Scaling will entail a fast startup, data sharing, and big heaps, making immutability more important. Aside from its JVM plans, Oracle recently cited work to retool Java EE for microservices and cloud deployments.

Honing in on language capabilities, Rose was bullish on value types, to mend a rift between classes and primitives. Value types enable huge changes through the stack and depend on parametric polymorphism, making generalizations across all values. "This is the last big thing that Java needs, in my opinion," unifying primitives and objects but with everything looking like a class, he said. Rose sees value types as comparable to the impact of generics or lambdas in Java.

Rose listed eight specific goals for the JVM for the next 19 years, saying they had been initially expressed in 2015. These include having a uniform model, with objects, arrays, values, types and methods looking similar; memory efficiency, with tuneable data layouts and efficient code; optimization, in which shared code is mechanically customized; and post-threading, with confined, immutable data and granular concurrency.

Oracle wants Java to be broadly useful for running languages like Scala and Clojure while maintaining the compatibility to run even 30-year-old "dusty" JAR (Java Archive) files. The company also is emphasizing performance and interoperability. "Our JVM is more slowly changing than the hardware over which it runs, which means that we are always getting the latest chips and trying to figure out how to do the trick again on the new chips," Rose said.


EmoticonEmoticon