All things Java
Friday, January 10, 2020
Richard Harris |
We chat with Rich Sharples from RedHat to talk about the history and the future of Java. Rich addresses the virtuous cycle that has been established by legions of developers taking a Java-first approach.
In an age when there is a constant demand for new, especially when it comes to technology, some things continue to stand the test of time. Java, for example, has been around for decades, but it is still the go-to programming language for untold numbers of developers. In fact, the language has never fallen below No. 2 on the Tiobe Index, and as of August 2019, it was No. 1.
That’s pretty amazing when you think about the myriad technology and business changes that have occurred since Java first debuted. But, as with similarly long-lasting technology, ranging from Minecraft to Linux, Java hasn’t maintained its position by standing still. The language--and the ecosystem supporting it--has evolved along with the platforms and use cases developers are currently targeting with it.
Rich Sharples, Red Hat Senior Director of Product Management for Middleware, will address the virtuous cycle that has been established by legions of developers taking a “Java-first” approach, including the specific products and services that are bringing Java’s capabilities in line with newer technologies such as containers and Kubernetes, serverless and functions as a service.
ADM: What is Java? When was it created and what problem does it solve?
Sharples: Java is a general-purpose, object-oriented programming language and computing platform that was first released by Sun Microsystems in 1995. While it was originally designed to work in limited-resource environments, like house-hold appliances and browsers (through Java Applets and WebStart), where it has really excelled is in the development of business-critical server-side applications. The Java Runtime Environment (JRE) includes all of the class-libraries, runtimes, and tools a developer needs to develop applications. I’d say there were four major areas of innovation that made Java more suitable for developing business applications than some of its contemporaries:
- Java was designed for a networked world - from day one Java has had built-in libraries for developing networked applications using open standard protocols like HTTP.
- Java has been open from the start. It was initially developed as an open standard that was supported by many vendors and was fairly early in adopting an open-source development and governance model. This allowed Java to be much bigger than the single vendor that initially created it (Sun Microsystems).
- It popularized the virtual machine model where Java can run anywhere the Java Virtual Machine can run without having to code or even recompile the application for a particular chip architecture or operating system.
- Java was introduced about the same time that multiprocessor systems were gaining traction and it was one of the first languages to make use of those hardware advances without the developer having to do too much work. That allowed Java to scale to support the growth of the web and mobile-enabled applications at a time when the internet was gaining in popularity for enterprise and personal use.
These technical advances and the open model allowed a large multi-vendor ecosystem to quickly emerge in what was a pretty fragmented world back in the mid-1990s. For the first time, you could quickly develop sophisticated, networked applications and not be tied to a single chip architecture, operating system or technology vendor.
ADM: What is the Tiobe Index?
Sharples: The Tiobe Index is a long-running index measuring the popularity of programming languages. It has been running since 2001, and so provides a unique, long-term perspective. The index is based on search-terms so it reflects the general interest and doesn’t claim to be an index of the BEST language for a given application.
ADM: As the no. 1 programming language on the Tiobe index, why does Java have such staying power?
Sharples: It’s important to remember that while the technology industry moves at a rapid pace - the pace at the lower levels (chips, operating systems, languages, network protocols) have adoption cycles that can be measured in decades - it’s simply infeasible for entire industries to shift the technology underpinnings any faster. As an example - even rapidly adopted and evolving technology like Linux containers, which are almost ten years old, and Kubernetes, 5 years old, will likely be teenagers before they have saturated the mass market.
ADM: How has Java evolved to keep up with the demands of the changing technology ecosystem?
Sharples: The open, multi-vendor model has been a major strength - it’s very hard for any single vendor to pioneer a market for a sustained period of time - and taking different perspectives from diverse industries has been a key strength of the evolution of Java. Choosing to Open Source Java in 2006 was also a decision that only worked to strengthen the Java ecosystem, as it allowed Sun Microsystems and later Oracle to share the responsibility of maintaining and evolving Java with many other organizations and individuals.
ADM: What new tools and platforms are being used with Java?
Sharples: Java is still the most popular programming language for businesses developing business-critical applications and that isn’t going to change any time soon. What we at Red Hat have been doing over the last couple of years is using our deep roots in Java and Kubernetes to figure out how we can ensure organizations can continue to use the language they’re most productive with (Java) in the context of a cloud-native environment. What we ended up with is Quarkus. Quarkus, in a nutshell, allows you to optimize your applications and services for limited memory and CPU environment where applications may be redeployed and restarted many times a day (vs. running for months) - so we have to optimize for startup overhead as well. Using something like GrallVM we can also compile the apps and services down to native code - saving even more time and memory.
ADM: What are some of the new use cases for Java?
Sharples: With Quarkus, Java can very easily compete with lighter weight languages like Node.js and Go in FaaS and microservices environments, so developers can still leverage the huge ecosystem of tools, frameworks, and runtimes for Java. It offers cloud-native Java with no compromises.
ADM: How does Java fit in with containers and Kubernetes?
Sharples: Java was designed to run on big multiprocessor machines with lots of memory. You could pretty much guarantee that you owned the machine and you could run multiple applications for each JVM or app server. Those applications were expected to continuously run for months or years and a lot of the neat features in the modern JVM assume that long-running nature. The JVM does some very clever optimizations while it’s running. And a lot of work went into developing application servers that could dynamically reload applications when the change or dynamically update configurations without having to impact other running applications.
That’s just not the world we live in today. Now you get a slice of a virtual machine or container or even just a function for a few hundredths of a second. In a cloud-native world everything is immutable, so if we want to make changes to services we can rebuild the container image using the latest versions of everything - we blow away the old version and let Kubernetes restart the new pods. This completely gets rid of the operational drift problems we had when individual servers and applications were patched and updated on the fly in production.
So a lot of the dynamic capabilities of Java bring a lot of weight and complexity and offer little value in these environments. That weight comes in the form of slow startup and initialization and more memory utilization.
ADM: What about serverless and FaaS technologies?
Sharples: FaaS, and more broadly serverless, have become a central part of the cloud-native programming paradigm. Developers can achieve agility through decoupling and distribution without having to think too much about the underlying infrastructure so they can spend more time thinking about their applications. But this is another area where traditional Java isn’t well suited and other lighter, nimbler languages (like node.js and Go) have become popular alternatives to Java.
ADM: Looking forward, how do you see the landscape evolving?
Sharples: Given the attention and adoption we’re seeing with Quarkus, I think we’ll see Java really come to the forefront for developers building modern cloud-native applications, services, and functions. As well as optimizing for these high-density environments, Quarkus also allows developers to use both imperative programming style - ie. what they are familiar as well as reactive/event-driven - and I think this will ease the transition to reactive/event-driven, which is where we’re all heading to support the next generation architectures.
About Rich Sharples
Rich is the Senior Director of Product Management in the Application Platforms Business Group at Red Hat. He has spent the last twenty years evangelizing, using, and designing Enterprise Middleware. He previously worked for Forte Software and Sun Microsystems and as an independent software developer and consultant building large distributed software systems for the space, transport, and energy sectors.
He also serves on the node.js Foundation Board of Directors. In his spare time he enjoys running, cycling, and anything that gets him outdoors.
Become a subscriber of App Developer Magazine for just $5.99 a month and take advantage of all these perks.
MEMBERS GET ACCESS TO
- - Exclusive content from leaders in the industry
- - Q&A articles from industry leaders
- - Tips and tricks from the most successful developers weekly
- - Monthly issues, including all 90+ back-issues since 2012
- - Event discounts and early-bird signups
- - Gain insight from top achievers in the app store
- - Learn what tools to use, what SDK's to use, and more
Subscribe here