Monday, July 27, 2009

JRuby's Importance to Ruby, and eRubyCon 2009

I'm going to be speaking about JRuby again this year at eRubyCon, in Columbus OH. I just got back from Rails Underground, which reminded me how much I love the smaller regional Ruby conferences. So I'm totally pumped to go to eRubyCon this year.

The idea of "Enterprise Ruby" has become less repellant since Dave Thomas's infamous keynote at RalsConf 2006. There are a lot of large, lumbering organizations out there that have yet to adopt any of the newer agile language/framework combinations, and Rails has most definitely led the way. I personally believe that in order for Ruby to become more than just a nice language with a great community, it needs to gain adoption in those organizations, and it needs to do it damn quickly. JRuby is by far the best way for that to happen.

There's another aspect to adoption I think has escaped a lot of Rubyists. In 2006 and 2007, Ruby gained a lot of Java developers who were running away from bloated, over-complicated frameworks and the verbosity and inelegance of Java. When I asked at Ruby conferences in 2005, 2006, and 2007 how many people had done Java development in a former life, almost everyone in the room raised their hands. When I've asked the same question in 2008 and 2009, it's down to less than half the room. Where did they go?

The truth is that the Java platform now has reasonably good answers to Ruby in Groovy, Scala, and Clojure, and reasonably good answers to Rails in Grails and Lift. And yet many Rubyists don't realize how important it is for JRuby to continue doing well, many still seeing it as simply "nice to have" while dismissing the entirety of the Java platform as unimportant to Ruby's future. It's an absurd position, but I blame myself for not making this case sooner.

I believe that JRuby is the most crucial technology for Ruby's future right now. Regardless of how fast or how solid the C or C++ based Ruby implementations get, the vast majority of large organizations are *never* going to run them. That's the truth. If we can leverage JRuby to grab 1-2% of the Java market, we'll *double* the size of the Ruby community. If we completely lose the Java platform to alternatives, Rubyists may not have the luxury of remaining Rubyists in the future. It's that big a deal.

So I hope you'll come by eRubyCon and hear what we've been working on in JRuby and what we have planned for the future, especially our work on making JRuby a stronger JVM citizen. I'm certain to expand on the Hibernate-based prototype code I showed at Rails Underground, and hope to have some additional, never-before-seen demonstrations that will shock and amaze you. And if there's time, I'll demonstrate my two research pets, the "Ruby Mutant" twins Duby and Juby.

See you there!


  1. "When I asked at Ruby conferences in 2005, 2006, and 2007 how many people had done Java development in a former life, almost everyone in the room raised their hands. When I've asked the same question in 2008 and 2009, it's down to less than half the room. Where did they go?"

    Um... it's not less Java people, it's more other people. Hypothesis: If you'd asked the same question about PHP, you'd get a mirror-image change in results.

  2. Tim: I think you're wrong. The percentage matters a lot. Ruby's community is not growing so fast that a drastic disappearance of former Java developers means only that there's a lot more people that have never used Java. I'm convinced it means that a large number of those Java devs are going *back*, and because of alternatives to Ruby/Rails on the JVM we're not getting as many new folks.

    Even if you don't accept this analysis, you and other Rubyists need to at least consider the possibility and what it might mean for Ruby's future. I could certainly be wrong...but if I'm not, it could have devastating effects.

  3. Charles:

    Interesting post, and thanks again for all your work on JRuby.

    If I understand you correctly, you are saying that the Java devs that Ruby had started to attract in recent years have since switched 'back' to other JVM languages?

    A) How can we convince ourselves that this is actually what happened, rather than one of the other possibilities, such as the one Tim suggested?

    B) Assuming A turns out to be true, how can we determine why they switched back?

    C) What can a Rubyist that has no direct interest in Java do to help? Specifically, I mean someone that reads this post and wants to take action. I, for one, have never understood why Java devs do ANYTHING, much less how they choose languages.

  4. After spending some time hacking Java library wrapper with JRuby, I am totally sold. JRuby makes complex libraries easily reusable from Ruby: it would take huge amount of time to port something like Weka or Mallet to C or C++ and make it available to Ruby as extension on all OSes.

    Wrapping Weka in a DSL results in an impressive framework for machine learning with RSpec/Cucumber for testing, and you get it all after one week of evening hacking (!!). And oh, you can use Hadoop core at the same time to distribute data processing.

    With possibilities like these, CRuby makes little sense if any, and becomes less and less viable even economically. And, after all, it is still Ruby, it just runs in the different environment.

    And thanks for all your hard work and "peacemaking", Charles.

  5. Michael: Yeah, I'm excited to hear about your work and others' work to put a Ruby face on all those Java libraries. I think Hibernate is a perfect example of what could be accomplished. It's well-known to be the most feature-complete and extensive ORM package for pretty much any language. It's also very complicated and has an enormous API. It's a perfect candidate for "Rubification", and indeed Grails' "GORM" wrapper around Hibernate and JPA is probably the #1 reason people choose Grails over alternatives. Think about how ActiveRecord drew so many people to Rails. Now imaginehow far we could get if we had ActiveRecord with Hibernate's featureset. It boggles the mind.

    Thanks for all your work!

  6. hi

    thank you for your great work on jruby, i am a java dev, was looking to lighten my java bloat with languages like ruby/jruby, i really like ruby, before trying ruby i played with groovy/grails, but found out web related tasks, ruby has still the edge, then came across scala, i really like scala,so scala stole my time from ruby, but still i believe that if you are doing web related stuff, ruby is very productive, except for the "CONSTANT CHANGES" to the library, gems break all the time..., i really feel if people maintain a "gem repository" for jruby focus little bit on the window world, things would be far better, i still am hanging on to jruby, i really want it to stablize ...,all my old gems/effor has become invalid with new releases,things keep on changing,so the effort put is all gone in few weeks/months, again i have start it all over, pls maintain gem repository for that release...

    iagree that scala,etc have made a
    dent..., looks like ruby community is blinded

    thank you once again for all the hard work by the jruby team

  7. JRuby is very good and Rubyists should give it a try more often. JRuby buys you a lot of stability and those simple Ruby libraries and scripts of yours start getting uptimes spanning several months quite easily.

    So it's time for phase two of the famous triple E. Embrace was first. Now it's Extend showtime. ;-)

    I get what the "bitter pill" was all about now. It has to do with making more use of Java from JRuby. Though I would question trying to entice people to be early adopters of even newer technologies before JRuby gets even more stable. With every new version of JRuby, users have learned to expect major improvements and fixes. So while it could be said to be fairly stable, there might be ways to making it work more seamlessly and so on when it comes to making it beat CRuby more thoroughly.

    For a contrarian point of view, some people could expect to see JRuby appealing for more stability and conformance with CRuby before trying to fight on new fronts. For example, come December, and Ruby 1.9.2, how will JRuby cope with it?

    Nonetheless, adding some Javaisms to JRuby cannot hurt it too much either and might even be a plus when comparing it to other language implementations. Although this too should be more of a long term war than just a short term battle.

  8. Mr. Interweb: those charts only included point-of-sale sales, which according to Oreilly's next post, only accounted for 32% of their sales (and they say the Prags as well). As a result, I consider their results statistically useless. I'd be interested in the prags year-to-year change on Ruby books.

  9. i have to add couple more point, gwt, google app engine are very awesome/potential tools/technologies,
    one stuff about gwt is, it is incredibly verbose(becos of java)
    i was looking if scala could generate the java source files, but that is not the case, if jruby or it mutants(duby,juby) can generate GWT java classes, it will be really fantastic,
    i think, this (google)is one more thing distracting people from ruby/jruby. so if jruby can provide
    tools on this stuff, it will gain

    - Nokogiri seems to be an awesome library, but i cant make it run on windows with jruby1.3, if iam doing pet project,
    most of the home machines are windows and not macs/ubuntus(serious hackers stuff)

    - i mostly care about good ruby libararies always being integrated and upto date with jruby( ex nokogiri).

    - i agree waiting for rails 3/ ruby 1.9 and lots of gems breaking
    made me spend time on gwt/gaej/scala

    - i agree that enterprise jruby with java libraries will also contribute to a good success ( GRAILS guy was really smart in this case atleast).

    -All said and done, i still am counting to JRuby to deliver...
    by focussing one any/all the directions listed above


  10. Groovy and Grails has hit the tipping point.

    I think your post is dead on.

  11. Hi Charles!

    This post got me thinking. I'm 100% with you on the importance of JRuby to the Ruby community. And also its importance to the so-called "enterprise" world. It's our best bet.

    But still, I'd like to know the motivation of java developers around the world on the JVM languages debate, so I've set up a quick poll here:

    I'd appreciate if you guys code visit and share the link. I'll publish the results on twitter at the end of the week. My twitter is: @leonardo_borges


  12. Charles,

    Great post and I like the others really appreciate your efforts in JRuby. (I still remember fondly the announcement on ruby-forum when you were acquired by Sun)

    One thing that is important to consider is that many of the new languages are taking SMP head on and have built in constructs for dealing with concurrency such as Scala and Clozure. Scala in addition to being OO also incorporates many functional constructs, this in itself is very attractive to developers..

    Another is that Scala borrowed heavily from Ruby and can even be considered an evolution of Ruby in some regards. Almost everything in Ruby is in Scala and in some respects I would argue that it even has a purer OO implementation due to it treating functions as first class objects.

    Just like Ruby was a great conglomeration of Perl, Smalltalk, etc.. Scala can be viewed in much the same way..

    Maybe if you can't beat them, you should join them. :)

  13. @Sean

    Brilliantly put, I too really enjoy the meta programming goodness of Ruby but then again, it has lead to the Monkey Patching madness that we sometimes deal with (especially if dealing with ActionPack within Rails)

    The more I think of it however, the more I agree with you. Thank you for reminding me!

  14. Jruby is damn good. I said this because of Jruby support in windows. I am working on windows environment and Jruby working like charm in windows. I even ran a Jruby on Rails application(redmine) in windows with tomcat, this is hard to do with cruby which can't easily run a rails on windows.

  15. Excellent post. I would go as far as to say that if JRuby or something similar does not offer the seamless extension of the Java platform as Groovy/Grails does then Ruby/Ruby on Rails faces an uphill climb in Corporate America.
    Additionally, it must offer qualitatively superior solutions in Java/J2EE world than Groovy/Grails does today.

  16. Before my comment, a little bit of context: I'm working for a big Telco operator (you get the picture : “big”). In this company, you have to follow the IT rules to do something (software installation, language to use, etc…).
    For mainstream development, we merely use Java with Eclipse IDE tools (for the big picture) and we all have in our PCs (Windows desktop/laptop), the Java VM installed. For a long time, it was JRE 1.4, but now 1.5. And quite soon after 1.5, we had 1.6 installed.
    As we go "Web 2.0" (well, you know…), we use Flex/Flash Builder for Website UI design.

    So in big companies, you have to follow the rules (whatever you think of the rules – good or bad- : language choice, version control, development methods, etc...).
    If you want to use something different, you have to pass along many committees with a lengthy process to get an approval witch ends in large part with quite a No.
    If I want to use “c-Ruby/MRI” on my laptop, I should have “Admin rights” to install it or I need approval from the IT department.
    Remark: well, I have Admin rights so I can do much more than the average employee (and I dot it because it’s tolerated. But it can be removed any time and without notice).

    Why is it this way? Well because in big companies, IT departments are accountable for the consistency of all legacy applications. And every migration to new version of any software (basic example: Windows XP to a new version ;-) ) should be as smooth as possible for the Enterprise application ecosystem.
    So IT Departments don’t try every new “something” every month (and there’s a lot of new “something” in the market).
    And this is why you still find large COBOL, FORTRAN, Ada codebases in some industries.
    And their point of view makes sense.

    So in most cases, from an Enterprise point of view, creating a new “branch” of “coding environment/ecosystem” will simply fail (or might fail).

    But this is where the idea of having some or many Ruby VM implementations is interesting.
    With JRuby, having ruby code transformed on a Jar or a java codebase and then deploy it on a JavaEE server can bring the possibility for Ruby to enter more easily in the Enterprise game.

    So this is why Jruby, IronRuby are good for the Ruby ecosystem.


    (*) : By the way, I liked your comments on the Lightning talks at Rails Underground London July. I agree with you :
    Conferences should not be just about Rails. Ruby can do much more.
    When I go to Rails conferences, I always think “can I do desktop applications or something else with Ruby ?”.
    But, to be honest, due to its success, Rails is a good marketing flag for Ruby.

  17. Charles,

    Thanks for all your efforts for [J]Ruby and the community. I agree with ilan b that Scala is gaining mojo w.r.t. Java developers, but one aspect that has not been mentioned is that two of the four JavaPosse members (Carl Quinn and Dick Wall) seem to be enthusiastic Scala supporters, and their podcast has much influence on the development community. While Tor Norby's work on the IDE plug-in for Netbeans really helped Ruby developers, there seems to be a strong influence towards Scala and other JVM languages. Charles is right- It's the enterprise, stupid!

  18. I agree that being closer to Java is good for adoption in companies.

    The main reason I've stayed away from jruby in the past is it has been so slow. Since that appears to not be as much of a problem I might end up participating more :)