Java as a Choice for the Era of Cloud-Native Computing
Omdia analyzes Java as a language compatible with cloud-native computing.
August 31, 2022
Computer programming languages evolve, but the importance of so-called legacy languages upon which many mission-critical applications rely on is recognized, and modernizing these languages is paramount. Java is a case in point. Whoever asked if Java is dead (there were and still are plenty out there who ask this question) has not looked at the longevity of COBOL. For starters, Java was never about the language but the ecosystem surrounding the Java Virtual Machine (JVM), a language platform. But the efforts to make Java performant in cloud-native computing (CNC), including serverless and WebAssembly, reflect the investment many enterprises have made in Java and want to use it in the latest development environments.
Language Requirements for Cloud-Native Computing
To get the most out of CNC, developers build software applications in microservices architecture and use serverless services, such as function as a service. This requires applications to load up in super-fast time. A container can be spun up in milliseconds, an application run, and then the container is terminated. On a public cloud, there are also charges related to how long containers are in use. A function run in serverless mode is charged by memory used and duration, typically rounded to 1 millisecond, so fast-running languages have a clear cost benefit. Programming languages need to load in milliseconds to be CNC-compatible.
MicroProfile to Make Java CNC-Compatible
The first rule of advice is to use the existing programming language that predominates, if possible, causing the least change and having the skills available. For many organizations that have invested in Java, the question is whether Java is CNC-ready. Traditional Java runtimes are unsuited for microservices. Each instance would need to load too many megabytes, whereas other languages such as Node.js and Go are far more streamlined and faster to start up. This motivated the Java community to address the challenge of modernizing Java. Several high-tech companies with a stake in Java, including Fujitsu, IBM (including Red Hat), and Oracle, formed the open source MicroProfile project within the Eclipse Foundation, which, to quote its mission, "is aimed at optimizing Enterprise Java for the microservices architecture."
One of the lessons learned in working with microservices is that when multiple microservices run within the same JVM, a greedy microservice can starve others of resources. The solution is to deploy a single microservice per application server, which led to specialized Java runtimes such as Liberty (IBM), Quarkus (Red Hat), and Spring Boot (VMware). To avoid fragmentation in the Java community, as Java began to be used for microservices, MicroProfile was created to provide a common set of APIs for multiple Java frameworks and runtimes. Since its launch in 2016, the project moved quickly and has released multiple specifications and updates to move at the speed the CNC industry is evolving.
The need to support Kubernetes is essential in today's CNC environments, and runtimes like Liberty, Quarkus, and Spring Boot are designed to be Kubernetes native. These runtimes address the memory consumption, fast startup, and other concerns that enable Java to be a first-class choice for microservices running in Kubernetes environments.
Spotlight on IBM Liberty, a Java Runtime MicroProfile Implementation
Liberty is not something IBM has talked about much, but we believe this will change, and it is worth taking note of what it offers the Java community. Created in 2012, WebSphere Liberty is a modern progression of the WebSphere application server (WAS), and much of it was given over to Open Liberty, an IBM open-source project launched in 2017. Many monolithic enterprise Java applications, typically running in virtual machines, continue to use application servers like WebLogic and WebSphere, and are in a keep stable and maintain mode. Liberty is designed for Java applications being modernized and for fresh CNC projects and is a small, lightweight kernel to which individual capabilities can be added, so keeping the startup load to a minimum with just enough to support an application or microservice. It offers all the benefits of a MicroProfile implementation.
Open Liberty is a production-ready open source Java runtime for CNC and is supported by WebSphere licenses. WebSphere Liberty is a commercial build of Open Liberty and adds several functions for helping modernize monolithic enterprise Java applications.
Omdia has seen IBM's benchmarks with Liberty having the best throughput across its portfolio of Java runtimes, as well as rivals, and lower memory requirements, which will lower running costs. In its near-term roadmap, IBM will launch new features in Open Liberty that will demonstrate an "instant on" feature, with super-fast first response times, making it suitable for serverless where scaling containers down to zero and up to hundreds is typical. Liberty InstantOn uses Linux Checkpoint/Restore in Userspace (CRIU), which takes process snapshots and allows them to be restored instantly in Kubernetes managed containers. This also applies to a full Java monolithic application that can be started in under a third of a second. These forthcoming features in Liberty will be a boost for Java in CNC.
WebAssembly Runs Java
The W3C standard WebAssembly (Wasm) is a growing development approach that allows in-browser code to run at near-native performance and is supported on all major browsers. Languages such as C/C++, C#/.Net, Rust, Python, and Go are currently supported. Efforts are in progress to run Java natively in the browser using WebAssembly. There is an open source project, JWebAssembly, a Java bytecode to WebAssembly compiler.
Browsers are how many end users interact with applications, and allowing browsers to run applications as fast as native opens new opportunities for developers. Wasm is a nascent and growing technology, and when anything runs in the browser, additional security considerations need to be made. Remembering that security issues plagued the era of browser engines like Flash and Silverlight (JavaFX is still active) and were a factor in their demise, it is important for the Wasm community to develop the technology with security in-built from the ground up.
Michael Azoff is Chief Analyst, Cloud and Data Center Practice, at Omdia.
This article originally ran on Omdia, the research arm of Informa.
Read more about:
OmdiaAbout the Author
You May Also Like