SAN FRANCISCO—James Gosling, the father of Java, has been working on some innovative technologies to address unique needs, such as real-time application servers and refactoring of large systems.
And Gosling is expected to demonstrate the real-time application server he has been working on at the JavaOne conference here on May 19.
Gosling, a Sun Microsystems vice president and fellow, in an interview on May 16 here, told eWEEK that Sun has had a real-time JVM (Java Virtual Machine) “thats been out there for awhile and its a virtual machine that was designed for pretty high-end real-time uses—the kind of thing you could control an F-16 with. Its got timing numbers in the five to 10 microsecond range.”
So he said he did a few tweaks on the Sun application server to run it on top of the real-time VM. “And we ended up with numbers that are really cool,” he said.
The system features a real-time garbage collector with intense scheduling, priority management and priority inversion control—all the little components it takes to make real-time systems really real-time, he said.
System requests can take milliseconds, microseconds, “but there are occasionally requests that take as long as a second—between garbage collector pauses, paging pauses, queuing pauses, threading pauses….,” Gosling said.
In one benchmark, the system ran a maximum roundtrip time of 15 milliseconds, Gosling said.
However, there is no free lunch, he said.
“The real-time app server, and actually all the real-time systems, have sort of a tradeoff between deterministic timing and throughput,” Gosling noted.
“So in order to get deterministic timing, you have to give up some throughput. But when you want deterministic timing, you just dont load the system very heavily.”
Gosling said Suns target for the technology is anybody who has application servers who need really fast, deterministic timing.
Yet, Gosling admits that the real-time application server, “for almost everybody is really kind of silly. Because most people dont need stuff that is this tightly constrained.
“But the Wall Street folks, who are just anal about every last millisecond—because every last millisecond in terms of getting trades in is a really big deal—theyll happily give up a certain percentage of throughput to get tighter timing guarantees.”
Sun has a prototype of the real-time application server running “and weve got a little bit of an early access program going on,” Gosling said with a smile.
“Its taking two quite solid and proven technologies and putting them together in a somewhat unconventional way—the real-time VM and the app server,” he said.
Meanwhile, one of the projects Gosling worked on a few years ago, a refactoring engine known as Jackpot, has made a resurgence.
Refactoring is the process of restructuring an existing body of code, altering its internal structure without changing its external behavior, Gosling said.
“We have, after much rebuilding of internal infrastructure, early access versions of that [Jackpot] and it allows you to do customizable refactoring,” he said.
The tool enables developers to write their own refactorings “very easily,” he said. It even features its own specialized scripting language for refactoring. “and thats looking pretty wonderful,” he gushed.
The Jackpot tool is targeted at developers primarily in larger enterprises that have vast amounts of code in big, complex applications.
“A lot of enterprises have coding standards and one of the things you can do with this refactoring engine is establish a number of patterns that detect coding standard violations,” Gosling said. “And then you just run that continuously against all your code.”
Gosling said the tool works at a very large scale, which makes it particularly useful “for some of the quite enormous applications out there—like three million lines of code or more.”
And once a system gets that big, even simple things in a code base become difficult to change, Gosling said.
“The world gets very fragile, because you try to change this one little API and it has this ripple effect all over the world” of your code.
Indeed, Gosling asks, “How do you search and replace something in over a million lines of code?” The Jackpot engine will do that, he said.
The tool will help developers transform code fragments in large bodies of code, he said.
The biggest system Sun that tested the Jackpot refactoring engine on was eight and a half million lines of code, which included the all of NetBeans, all of the Java Development Kit and all of Suns tools, Gosling said.
“It was basically all the software that Sun owns jammed together as one big system,” he said. “But you can actually find systems bigger than that. And systems of that complexity are pretty tough to change.”