<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d5588906282693401797\x26blogName\x3dnovember+Tech\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://novembertech.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://novembertech.blogspot.com/\x26vt\x3d-3023068358301775902', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

flickr

Interview with Java's inventor James Gosling

Wednesday, October 11, 2006

Today there are thousands and thousands of Java programmers, but there was a time when there was only one, James Gosling. He did the original design of the Java programming language and implemented its original compiler and virtual machine. Today Gosling is vice president and Sun Fellow at Sun Microsystems Inc. where he continues to take an active role in software development, especially regarding NetBeans. In the first of this two-part interview, SearchWebServices talked to Gosling about what he's working on now and his views on the Java process, open source, the Internet, Web services and the issues of complexity versus simplicity.

Let's start from where you are now, what are you currently working on at Sun?
James Gosling:

We've been trying really hard to get things so that people are working together more. We've tended to be groups that are kind of isolated. We've been working on getting the Java SE folks and the NetBeans folks to be working together a lot better. Over the last couple years that's gotten a lot better.

There are some Java programmers who are fans of Ruby on Rails and some of them were arguing Ruby's strength is that it was developed by one person rather than a community. Do you see advantages of a community over a single developer or visa versa?
Gosling: Well, a single developer doesn't scale very well. Java was actually developed by a single developer, originally. It was just me working alone, like the first four years of Java's life. And then popularity happened and the demands got that crazy. It also didn't help that at about that time I developed really severe carpal tunnel syndrome and I spent three or four years being almost completely unable to type. But there's been this real spread of use of it and an in-pouring of talent. The number of really smart people who have put a lot of energy into Java is just enormous. It's just amazing the spread of things that you can do with it.

So, do you feel more comfortable with the Java community process than when you were sort of the sole Java programmer in the world?
Gosling: It's sort of a bit of this and that. There's no way that I could have done all of this alone. There's just too much really cool stuff in the Java world. It's certainly the case that when one person works on it alone you can make sweeping changes and deeply impactful decisions in 10 minutes. But when you've got a lot of users, you don't get to do a lot of that anyway. You have to be extremely careful. I mean, you can screw them all over making huge changes, but once you have a user base you have to be really respectful of them and that makes life difficult. Plus, I'm certainly not the smartest person in the world and there are a lot of domains where I am not a world expert. There are one or two areas where I actually kind of know what I'm doing, but I think there is tremendous value in being able to tap other people and to get other people involved. For me, that's a lot about what's really cool about the open source movement. It's not the licenses or the source code, it's the social experience.

Do you sense any danger with so many inputs and so many decision makers, that you design a horse, but the committee comes up with a camel?
Gosling: Well, the fear isn't so much that they come up with a camel instead of a horse, but that they come up with something like Frankenstein's monster that's stitched together out of a wide variety things that have nothing to do with each other. And that is a constant fear. One of the interesting things about technology these days is that it really needs to expand a huge spread of domains. So we put a lot of energy into organizing the domains to keep them from sort of polluting each other, so that things are reasonably well packaged. This is one of the areas where the object-oriented technology really shines. The fact that there are packages and classes and such that allow us to organize things so that the bits that have to do with Web services are independent from the bits that have to do with say, driving cash registers. These things end up needing to talk with each other because everything everybody is building is so integrated. It's quite a balancing act.

Speaking of open source, how do you feel about the way Sun's going about open-sourcing all of Java?
Gosling: Well, I'm really happy with it. I'm happy we're finally getting around to it. It's been a long argument and there are still a big pile of big issues to get around. But we're committed to making this happen as soon as we can.

Did you start working on Java in what we would call a pre-Web world, when it would still mostly be networks inside of a building?
Gosling: Yes and no. Certainly, Java got started before the Web existed. But everything that we did was around Internet technology. Everything in Java is deeply, deeply affected by networking technologies and the Internet. You made the comment about networks being inside buildings. At the time we were building Java that had been solved for decades. The Internet spanned the planet 30 years ago. Of course, 30 years ago it was called the ARPANET. But the transition was mostly one of protocol. All of the stuff that went into Java was about networking. What people tend to refer to as the Web has sort of emerged when Tim Berners-Lee came up with the HTTP protocol and the HTML file format and the first Web-browsers happened. That got started shortly after Java got started and so the Web technologies were happening as Java was getting finalized, as we got towards the first releases of Java. So, all the Web stuff was already there.

Did you originally envision what Web services has now become in the application development world?
Gosling: I wouldn't say that I envisioned it in the sense that I woke up one day and had this vision of Web services everywhere. It's more that I assumed it. Because the structure of the network as a collection of services that all work together was this big architectural concept 20-30 years ago. And that's really all the Internet ever really was, is a collection of services that talk to each other. Which protocol they use, whether they use XML over HTTP or CORBA or God knows what doesn't matter. That's kind of how you spell the words, the context has been a piece of bedrock philosophy for a very, very long time.

There's all this complexity in the languages used for SOA and Web services applications, will it ever be possible to simplify it or will it continue to grow in complexity?
Gosling: Complexity is a really hard topic. Because… there's this game if you go to the Santa Cruz beach boardwalk called Whack-a-Mole. Whack a mole, like the animal. And the way Whack-a-Mole works is there's a board and there's this three-by-three grid and a little mole sticks its head up and you're standing there and you've got a baseball bat and you're supposed to whack the mole before he goes back down into his hole. Then he'll pop up somewhere else and you've got to whack him down. A lot of engineering and in particular the engineering around complexity is like Whack-a-Mole. You can make things like programming languages incredibly simple but then what tends to happen is complexity emerges somewhere else because people are trying to get around the stuff that's missing in the language or in APIs or whatever.

A lot of the complexity that we have is sort of driven by a sort of inevitable consequence of the activities that people are trying to support. If you think about just a cell phone or a Web page, what does it take to pick up a phone, place a call from standing on top of the Great Wall of China where the other person you're talking to is on a bus going from Monterey to Salinas? And managing that while the bus is in flight. Oh, and by the way, the piece of the Great Wall you're on is a long way from Beijing. I actually did that. I was talking to my daughter going to a track meet and I was on a business trip and if you think about all of the stuff that has to go on to do that, a lot of that complexity is pretty much inescapable.

Lots of folks come up with solutions to make life simpler but really all that they've done is move the complexity somewhere else. What's really, really hard is not making any particular technology simpler or making a particular API simpler, but standing back from complete systems and making the whole system simpler. And you don't get away with making one piece simpler and then realizing that this caused emerging complexity in other places. Yeah, we can live a whole lot simpler by going back and being an agrarian society. I don't think anybody wants that.

Do you think it's the job of architects to look at the entire system and see what if any simplifications can be done?
Gosling: That is certainly what architects ought to be doing. It's a really difficult thing because you find people who are in companies and their title says they're an architect. But they are often so divorced from the actual detail that they make architectural decisions that make absolutely no sense. Because when you dig down a few layers to see how that decision would have to be realized it's just totally out of step with technology. It's a really hard challenge in architecture to have both deep knowledge to make credible architectural decisions and broad knowledge to be able to span all the different technological areas. And trying to do large system architecture is unbelievably difficult.

Do you think architects need to be knowledgeable at the bits and bytes level and the overall business processes level?
Gosling: Yeah, and you try really hard to construct systems so that you don't have to know the low level details. But the saying goes, that's where the devil is.

What does the Father of Java think of the emerging interest in rival languages such as Ruby? A lover of diversity, James Gosling says he's played around with Ruby enough to understand the attraction, but his heart belongs to Java and what Sun Microsystems Inc. is pulling together under the NetBeans tent. He understands why Ajax coders are frustrated with JavaScript, but he says the answer will be found in NetBeans. In Part One of the SearchWebServices interview with Gosling, he discussed the history and philosophy of Java. In the second part he fields questions on Ruby, JRuby, Ajax and SOA, and tells why he believes the answer for most developers is Java and the NetBeans IDE.

How do you view Ruby and other emerging languages in relation to Java, is this a natural evolution, or is there a danger people will be all over the board with boutique programming languages?


James Gosling: I've always been a big fan of diversity and diversity certainly has its dark sides and it's like it's really confusing. The thing that Java tries to do and is actually remarkably successful at is spanning a lot of different domains, so you can do app server work, you can do cell phone work, you can do scientific programming, you can write software, do interplanetary navigation, all kinds of stuff in Java, whereas a lot of these other languages get a lot of their strength from being fairly domain specific. And at some level I don't really care about the programming language. What I really care about is the underlying semantics and the ability for things to interconnect.

The Java Virtual Machine is reasonably general purpose. Over the years there have been literally hundreds of languages built on top of it, most of which nobody has really cared enough about. So, when you take a language and you host it on the Java Virtual Machine, you get really interesting portability, if you do it right you can get very interesting performance and most of all what you get is the ability to interoperate and interact across languages – having stuff written in JRuby directly calling stuff written in Python or Jython or Groovy. There's even a compiler for Visual Basic to target the Java Virtual Machine. The traditional way of implementing programming languages is one where they're all individual islands that don't really interoperate at any level that's more fine grained than network protocols. You can't call similar APIs without breaking it into a server and calling across address faces, something that's fairly expensive. The Virtual Machine is what lets them be one big reasonably happy family.

Have you had any chance yourself to look at Ruby?
Gosling: I guess I'd call myself moderately familiar. I haven't used it a lot. I have somewhat. As a language it's fine. The interesting bit is the Rails framework. The Rails framework, if what you want to do fits with what the Rails framework wants to do, it's actually pretty slick. But people use all the methodology of the Rails framework in Java all the time. In fact there are various ways you can use Rails on the Java platform. There's Groovy, which is kind of this hybrid between Java and Ruby, that's hosted on the Java VM and they have Grails – Groovy on Rails, which is basically all the concepts from the Rails framework wrapped around Groovy. And then there's the JRuby guys who have something that lets you run Ruby programs on top of the Java VM and that's starting to get pretty interesting. All the "on Rails" stuff works perfectly well in that environment and it gives you the ability to access all of the Java APIs.

When developers are asked why they chose Java over other languages like Ruby, they often say scalability. Do you still see that as Java's major strength?
Gosling: I certainly think of scalability as a major strength and as long as you say a major strength, yeah. One of the problems here is that the space of developers is so large that what they care about varies tremendously. Many people don't care about scalability, let's say, as much as they care about reliability and there's a whole lot of stuff in the Java world that's about building reliable systems.

So would you rank Java reliability as equal to scalability?
Gosling: Yeah, and a very close second or maybe a factor zero, is security. All of the Java APIs have security woven through them, pretty much everywhere. That turns out to be a really, really big deal for a lot of people. Some people don't care at all and for some people it's absolutely life and death.

When you were originally creating Java, did you in any way envision what's happened with it or have you had a lot of surprises?
Gosling: In a strange way, a bunch of this kind of stuff, the scale and security issues, were actually thought about back then. But that was more living in a fantasy world kind of thing, kind of a science fiction kind of exercise. I never actually believed that any of it would ever actually happen.

Moving from the past to the present, you're still focused on Java tools at Sun, what's happening there?
Gosling: We've been having just a tremendously good time with NetBeans over the last couple of years. One of the things that we've been really pushing on with NetBeans is to have a lot of specialized knowledge in multiple domains. So, we put a lot of energy into things like tools for enterprise programming and being able to support SOA to be able to support all of the Web services, so it's really easy to build a Web service, so it's really easy to tie Web services together in SOA architecture, to be able to debug and deploy app servers very transparently.

And at the other end of the scale to be able to do advance development on things like cell phones and to tie them together and to be able to set a break point in a cell phone and set a break point in the app service that it's talking to. And do this sort of interesting end-to-end development. That's something we've focused on pretty heavily. Then you tie in some of the higher level stuff that's around things like graphical user interfaces through app servers. We've got all of these facilities that integrate lots of different frameworks from the Ajax support to embedded applets to all the JSF struts framework, so we work hard on making all these components actually play together, so that people can use very advanced, sophisticated Ajax components without really being aware that that's what they're doing.

There's been a lot of interest in Ajax, as you probably know, but one criticism involved the difficulty in using JavaScript as part of it. Do you see that getting simpler?
Gosling: Ajax is a really funny thing. You can actually do, using Java applets, pretty much everything you can do in Ajax and you get much better portability. Ajax is a technology that at its heart has been around for quite a few years and mostly took off when they came up with a clever name, but it really suffers from the fact that there are so many flavors of JavaScript. And it's kind of been… it's the example that keeps convincing us that we have to be really, really careful about interoperability in the Java platform. Because when you start to get out of line, the way JavaScript did, it just causes an interoperability nightmare for developers. So, one of the things we try to do is make it so that people who are using JavaScript components don't actually have to worry about JavaScript at all. They just see the components as kind of a black box that they can drag and drop onto their applications and they don't have to worry about the can of worms that's inside.

That's what you're accomplishing with NetBeans now?
Gosling: Yeah.

What's the latest status on NetBeans? Are most of these things available to developers who want to do Ajax now?
Gosling: Go to Netbeans.org, pretty much all of this is in NetBeans 5.5, and there'll be a whole new revolution of this in NetBeans 6. The early access bits are out there already. And all the stuff that's in [Sun Java Studio] Creator although the bits and pieces of Creator are really being reorganized and integrated into the core of NetBeans.

How are Java Studio Creator and NetBeans fitting into this picture?
Gosling: We're on the track of taking what were really independent products, we had these three products, there was NetBeans and there was Java Studio Enterprise, which was all the really high-end developer tools and then there was Creator which was also an enterprise development tool but focused on the sort of rapid development of Web applications. Enterprise and Creator were built on top of NetBeans, but now we're getting rid of the fantasy that they're independent products. Well, we're still doing a certain amount of packaging them that way, but we're putting a lot more emphasis into integrating all of the different styles of development so that developers can work on projects in a lot of different styles depending on the different aspects.

Is there a special focus on SOA and Web services in NetBeans development?
Gosling: There are certainly a lot of tools in the new NetBeans that are particularly about SOA and Web services. It's everything from support for all the protocols to being able to do UML modeling for large architectures.

It sounds like NetBeans is at the heart of everything, is it?
Gosling: What we're doing is we're orienting everything around NetBeans. So, all of our tools for doing software development in C and C++, and Fortran are all essentially parts of NetBeans. Netbeans itself really is a sort of core framework into which you can plug in different kinds of modules to do everything from manage deployment for different kinds of app servers to managing semantic grabs for different kinds of languages. So, we're able to support multiple languages. NetBeans is not a pure Java environment. It's a way that you can develop in lots of different languages.

Sun just hired the developers of JRuby, will JRuby eventually fit into the overall Netbeans?
Gosling: It will eventually. Exactly when, I don't know.

Labels:

Bookmark this post to del.icio.us Digg this post! Bookmark this post to Yahoo! My Web Bookmark this post to Furl