A Chat with James Gosling

James Gosling appeared for another popular Q&A session. Topics ranged from Linux and the Java Community Process (JCP) to features and real-time.

Linux and Other Ports

A large portion of the discussion centered on Linux. The Linux work was originally being performed by the Blackdown team. Since most of the porting efforts involved QA and release engineering, Sun has taken on the job since they are more able to provide these skills. Although a release candidate for JDK 1.2.2 has been released, it was commented that this release is more like a beta. While James mentioned that the changes are being folded into the 1.3 version, there was concern of how much of these beta-quality changes would actually make it since the 1.3 schedule is fixed.

Besides porting the VM to Linux, there was talk of other ports. In regards to a 64-bit Java VM, there is a team gearing up for Sparc/Solaris. They are considering the 64-bit Merced but are hoping that Intel takes the lead. Also, while Sun will not be porting the VM to the Alpha, Sun would be happy to help Compaq with it.

One notorious port is Apple. James thinks that the PowerPC is way better than the Intel architecture and thus Sun volunteered to do the port. But then the "funny company," with isolationists at the top, wanted to do the port. And then not. They have changed their minds about that 5 or 6 times now on the 1.3 port.

ISVs are happy with the 1.1, 1.2 and 1.3 VMs since the VM is becoming rather painless to port. For example, IBM is doing an AS400 port and is having a good experience. IBM's Linux 1.1 port has a good reputation although James feel they skipped the hard stuff. HP and DEC have also done really good jobs. However, applets in browsers remains a nightmare.

Basically, Sun is treating the Java Community Process (JCP) as "Tom Sawyerism" and is hoping to pawn a lot of the porting and extension work off on to others.

Real time

When James was asked what he was excited about, he said that he has been involved recently in the real-time work. Real-time mostly means that the code is "deterministic." In other words, you can "stop that robot arm before it hits the brick wall." Currently, software applications, such as the F16, use very twisted means to determine how long a particular operation takes. Timing analysis would provide a better alternative.

One attendee wanted more priority levels. The reason that Java only provides 10 levels is to be portable. As usual, NT is the worst offender at only 5 levels compared to 28 levels required for "real" real-time systems. James referenced a scheduling theorem that says 26.something priority levels is optimal for a real-time system. Some systems have thousands!

Another issue with Java in the real-time world is garbage collection. The garbage collector introduces pauses which you can not have in a real-time system. So, Sun is working on coding restrictions so Java code can run while the garbage collector is running.

James later mentioned that there would not be any language extensions for real-time Java. Rather, the spec is tweaked in ways such as specifying a minimum of 28 priority levels. The real-time spec is currently in public review. See www.rtj.org for more details.

Embedded Systems

Since embedded systems, such as PDAs and Point of Sale (POS) terminals, are not Sun's thing, they are getting help from other folks on the microkernels.

Japan, and embarrassingly not the U.S., is leading in the cell phone arena since they have the infrastructure for it. NTT has set a standard for Iphones so that they can download Java into phones to make them do stuff. The most popular downloads are games, and of course, virtual pets. Nokia, Ericsson and Alcatel in Europe are also leading the U.S.. Nokia is introducing a no-button, half-VGA, touch- panel phone with a clear flip top that James thought was pretty neat.

Java on the Client

Applets got people excited about Java. Indeed, even Microsoft was working it well until an email came down from above with the words, "interoperability is bad."

When Java was built into the browsers, it was a nightmare since there was not a consistent client interface. However, the VM is no longer built into the browser but is delivered as a plug-in instead. The more recent plug-ins for 1.2 and 1.3 integrate nicely. The only disadvantage is that you have to download and install the beast.

In the olden days, one would put try/catch blocks around calls that may not have existed in different versions. This was "pretty high in the disgusting scale." The 1.2 plug-ins put in basic tools to make things more uniform while 1.3 provides class loaders to make it even smoother.

The Netscape 5.0, or Mozilla, browser will support Sun VMs. Because earlier versions of Netscape were such great monstrous hacks, Mozilla is a complete rewrite from the ground up with a much better architecture. Unfortunately, Mozilla is languishing.

James was questioned whether Microsoft was going to own client-side Java, but he did not think so. You can bundle the VM with software and hardware and it integrates well into IE. The only problem is when predatory contracts, for which Microsoft is famous, prevent the bundling of Java with Windows. Much more worrisome to James was if Microsoft came to own HTML and HTTP using their famous embrace and extend policy, it would force you to buy their servers. However, James did add that where Microsoft does follow the spec, they do really great job thanks to their QA.

The VM

Why is the VM so large? "There is a lot of stuff in there" (laughter). The VM itself is pretty small. The bulk of the giant is in the libraries. There is work on creating dynamically-loaded pieces, but these "outside things" are harder to deal with from a management point of view. "Life is easier when you have one, big, welded-together lump."

Sun is definitely not providing multiple VMs on the desktop since consistency wins over flexibility. However, there are folks doing toasters and auto controls which do not interact and do not have the same requirements, so it is OK for their VMs to differ.

Hotspot is getting faster and better with each release. Memory allocation is in good shape in 1.3. Hotspot is also getting reasonably close to real-time--one reason is a tunable pause time in the GC.

In comparing compiled versus dynamic code, it was noted that static compilers get stuff wrong. They do a bad job since classes get loaded dynamically. Performance-wise, modern JITs and Hotspot are getting nice numbers so that the amount you gain from a static compiler is minimal, or you may even lose. In the long run, dynamic compilers will smoke over the static compilers since they *know* what the program is doing rather than just *guessing*.

Futures

There were two main questions: What would you take out? What would you put in? To the first, James evoked laughter with the single word: Classes. He would like to replace classes with delegation since doing delegation right would make inheritance go away. But it's like Whack-A-Mole (more laughter) since when you hit one mole, er, problem, another pops up. What they already had to take out was pre- and post-assertions.

To the latter question, one attendee wanted to know when the JDK would stabilize to which James responded, "You're either alive or you're dead." An apt quote. There will always be new stuff. However, he felt that they were getting better at backwards compatibility. Performance (smaller and faster VMs), reliability, and portability (run on lots of platforms) largely dominate over features these days.

Specifically, there has been only one change request in the Java language that has gotten any visibility: type polymorphism. This is a similar to the horrible templates of C++. More often, they have gotten requests for new libraries to do things like celestial navigation. Sun set up the JCP to provide for these things.

Operator overloading was discussed briefly. James stressed that operator overloading is easy to misuse which is why it was not included in Java. There is a finite number of operators with an infinite number of operations which allows one to write really tiny programs that nobody can understand. Like TICO. And line noise. However, James acknowledged that folks doing numerical analysis have a legitimate need to do operator overloading.

Bits and Bytes

On the programming front, James declared that large classes with lots of static methods is bad since it is procedural programming--indeed, overuse of statics has been a big problem. Sin and cos are examples where a static method makes sense.

JPL is working on a next generation platform for "everything that leaves the atmosphere" and it appears that Java can be used for it. It is hoped that Java will provide a more robust environment to avoid repeating the mistakes of the recent failed Mars missions.

It was said that a lack of tools was killing Java on the client, but the fundamental problem is that tools are not making money. However, Sun bought Sunbeans based in Prague to provide some tools.

It was noted that AOL 5 shipped with the 1.2.2 VM, but unfortunately must ship with IE if AOL wants to get themselves on Microsoft distributions.

Scott McNealy's dream of a universal desktop may never come to pass because there is not any economic drive. James set the room laughing again by suggesting that one should walk up to a VC and say, "Hi, I'm going to build a word processor. Fund me." Meanwhile, a wacky 16-year old writes Star Office which was good at internationalization. Since the company had an uncertain future and Sun wanted an office suite running on the Sun, Sun bought them.

Nonetheless, Sun's internal apps are now mostly Java. Some of them exist in browsers, some as apps, and some in servers.

There was concern about how long Sun can spend $100M a year on Java and get nothing back. James conceded that they get some revenues--one needs software to run on hardware. It is also good for PR and stock prices. Sun mitigates the costs by getting others to do ports.

In closing, it was observed that the initial push for Java was in the Web browser, and then in the server. Where is Java going next? James responded that Java in the browser made for a great demo. Now, Java is in all sorts of places, but Java in the enterprise is where the money is. So, the question is not where you can write Java, but where you can make a buck?


by-nc-nd Best Viewed With YOUR Browser Valid HTML 4.01! Valid CSS! Powered by Debian GNU/Linux
Free DNS