Usenix Report: Web Services Pushing JVMs into a New Age

The emerging use of Web services could drive some significant changes in the way Java Virtual Machines (JVMs) work, says Robert Berry, a distinguished engineer from IBM’s Hursley Park Java Technology Center.

Berry delivered the keynote address at this month’s Usenix Java Virtual Machine Symposium in San Francisco. He promptly set a futuristic tone by predicting the end of the age where JVMs can focus strictly on performance enhancements. The growing importance of Web services, Berry said, will call for JVMs to get smarter and more manageable.

Smarter, Better Managed JVMs?
Software developers increasingly need to get information from JVMs to J2EE systems so they can execute code efficiently, Berry told OET at the show. This kind of granular, node-to-node communications would be extremely useful for certain types of web services — especially event-based transactions that involve many nodes and/or applications; or in cases where load balancing and log/database rollbacks (and precise exceptions handling) are required.

“For example, from an app server point of view, they [developers] are delivering some high-level, high-volume transaction server capability, and they don’t want to suffer a garbage collection in the middle of some transaction, because a garbage collection — no matter how well tuned it might be — basically serves as a pause of some kind in the flow of that transaction,” he said.

In a sense, these applications are looking for control of their own destiny, Berry added. He said he believes that after years of working on ways to improve JVMs — such as through parallelism in garbage collection — the next generation of JVMs could improve enough to communicate with applications and provide a certain level of guarantee that J2EE transactions will complete in a certain amount of time — or at least not be paused for some unknown amount of time.

“You need to be able to control, regulate, all kinds of resource consumption,” Berry said.

But, JVM Work Must Be Better Coordinated
Though current JVMs provide some management information — the system.gc call has provided information about garbage collection “since day one,” says Berry — “the delivery of information about the JVM and the surfacing of controls to manipulate the JVM has been fairly ad hoc,” he said.

Some day, Berry would even like to see JVMs answer questions like, “How fragmented is the garbage heap?” [space in RAM that is used, but no longer required] in a meaningful way. He said even though current JVMs can compute the answer to that question, there are pieces missing. “What we’re lacking is a meaningful set of heuristics to tell Web services applications what to do with this information,” Berry said.

Berry noted that in the absense of an industry-wide effort, IBM is starting to do “some work” in this area; but he couldn’t provide specifics. However, he said he expects these kind of JVM management features would likely start to appear as value-added components of J2EE application server platforms (such as IBM Websphere), but that they will eventually make their way through the JSR process and become a part of standard J2SE.

How far can the managed JVM model take us? Well, how about adopting a RAID-like model to the JVM, where virtual machine resources achieve greater reliability through redundancy? This was one possibility that Berry suggested during his Usenix talk.

This is an interesting example of the kind of improvements a more manageable JVM could enable, but is it something that IBM is working on right now? No, Berry told OET after his talk. “That was sort of a wild idea I had,” he said. “When you put these presentations together, your mind just sort of starts going.”

Other Usenix Papers on Expanding JVMs