This post originated from an RSS feed registered with Ruby Buzz
by Obie Fernandez.
Original Post: Tim Bray on Sun, Java, Ruby (on Rails) and JRuby
Feed Title: Obie On Rails (Has It Been 9 Years Already?)
Feed URL: http://jroller.com/obie/feed/entries/rss
Feed Description: Obie Fernandez talks about life as a technologist, mostly as ramblings about software development and consulting. Nowadays it's pretty much all about Ruby and Ruby on Rails.
Earlier this year I had the pleasure of interviewing the legendary Tim Bray, currently Director of Web Technologies at Sun Microsystems. He's a fan of Ruby, and we spoke about many subjects ranging from Rails and Atom, to Web Services and extracted frameworks. Over at InfoQ.com we're about to publish the entire video interview and in order to build some anticipation, I will post some of the juicy bits of the interview here on my blog, starting with our conversation about Sun and JRuby, a timely topic...
Q: When did you start noticing Rails and what?s the perception at Sun nowadays about the Rails phenomenon?
A: Sun is a big company and I think that to a certain extent Rails probably is seen as falling into the LAMP basket (LAMP stands for Linux, Apache, MySQL, Perl or something like Python). I think that perception of the world is actually not entirely accurate. It?s the whole notion that you have web applications that are quickly and easily constructed based on the use of dynamic languages and good database mapping frameworks and things like that. When it comes to that whole ecosystem, my opinion is that we are vendors of computer systems and a lot of people are writing very cool code based on those kind of technologies, so we ought to be falling over ourselves to sell computers and to run them on, even though it?s not Java.
Q: Right, but don?t you also have a responsibility to defend the Java platform?
A: Absolutely. I think we have more than that. We have the responsibility to try and expand the Java platform. Right now if you took all the developers in the world and put them into baskets based on what their primary working environment is, I think the Java basket is probably the biggest. There are a lot of applications where Java is really an appropriate tool and there?s also the case where a lot of people make their living not doing greenfield aps, but expanding, extending and enhancing the existing application inventory which is largely in Java and on the JVM. So we totally can?t take our eye off the Java ball, but that doesn?t mean that Ruby and PHP are things that are going to go away; they are going to grow and that?s great and I think we should be friends with all of them.
Q: JRuby is obviously a lot of work and in a way, you?re supporting them now?
A: Right. I love Jruby. I love Jython, I love Caucho, the guys that got PHP running on the JVM, for a bunch of reasons. The first one is all those millions of developers living on the Java platform. Right now if they are on the Java platform that means they have to program pretty well on the Java language. That?s silly. The Java platform has three parts: the language, the JVM and the APIs. And of those, the language is the one that?s easily replaceable. So, I think that just because you?re on the Java platform, you shouldn?t be restricted in your choice of languages; so I want to empower the Java developers in the world with access to things like Rails, PHP and so on and so forth. One good way to do that is through projects like JRuby which is actually making pretty satisfactory progress.
But there?s another good reason to support Jruby, which is this: if you look more Moore?s law, it?s no longer making the cpus faster, it?s making them wider. We?re shipping our Niagara chips, and IBM and AMD and Intel are all heading in the same direction, where instead of one or two, or four core running insanely hot at 4 gigahertz, you?re going to have things that have 48 cores running plausibly cool at one gigahertz and having immensely more throughput. But to get the mileage out of that you?re going to have to warm up to concurrency, you?re going to have to warm up to highly-threaded execution. Right now I?d say that?s a weak spot, not just in Ruby, but pretty much across the entire spectrum of dynamic languages, and it?s totally a strong spot for Java. So it might be the case that you might be able to take some existing applications in things like Ruby and by running it on JVM get a lot more performance based on... We?re not there yet and it?s a little speculative, but it certainly a very promising direction.
Q: What does it mean when you say ?running Ruby on the JVM?, how would that look like a year from now?
A: You can do it right now. You take JRuby you start IRB on the JVM. And the thing is you have the whole universe of Java APIs so you can type in Swing commands and have a window pop-up on your screen and things just work. It really ought to be quite a bit like Ruby as it is now. The problem is that some substantial proportion of the Ruby libraries are in C not in Ruby and obviously there are issues in getting them running on the JVM but to that extent, the whole pure Ruby universe should run pretty smoothly once we get the infrastructure in place.
Q: The Java community is interested to have all these communities running on the JVM, but how can we do that? How can we make it their strategic advantage to be running on JVM no matter what language they are working on? What are we offering them?
A: It depends: who are you offering to? For the existing Java community it?s obvious what you are offering: you?re offering them Ruby, that?s not hard to understand. So for the existing Ruby community what would you offer them? There are two things that are obvious: one is this potentially better threading; the second one is all those APIs. The universe of Java APIs is big, is even bigger than CPAN, if you look at it closely. And a lot of them are good. I?ve done a lot of web programming and I?ve used the web APIs in Python, and I?ve used a lot of APIs in Perl, I?ve used the Web APIs in Java, and the Web APIs in Java are just a lot better. I would like to program in Ruby but with the Java APIs in certain circumstances.
Q: So at the higher-level application contracts, you?ve seen enough of Rails to understand that there are Ruby-specific idioms and programming practices that are an essential part of what makes Rails programming so special. How does that translate onto other platforms once you have Rails and JRuby or JRuby on Rails?
A: I don?t think that there?s anything about being on the Java platform that would get in the way of the Rails worldview, that I can see anyhow. And I totally agree that along with bringing Rails onto the platform it?s also the case that the Python people and the Java people and the .NET people are trying furiously to learn the cultural and worldly lessons from Rails and get that goodness into their own environment. But having said that I don?t really see a difference.
Q: Once again into Rails programming, it?s a clean break; it represents a very ?out-there? kind of move. Do you think that Java programmers can make that [move] smoothly once they are able to use these idioms, these programming practices on their own platform?
A: Yes, in fact if you look at the history of the community of Ruby developers, a whole lot of them are Java escapees, so we?ve got proof that people can pick up the culture and so on. But I?m not arguing that Ruby should migrate to Java, that Ruby development should necessarily be done with JVM. I think that?s interesting an option that?s going to be useful in certain slots, but I?m not saying that?s universally the future.