JRuby 2010: Year In Review
Hello friends! With 2010 wrapping up, we figured it might be interesting to publish a “year in review” post that summarizes key events, milestones, and people from this past year. It’s been a spectacular year for JRuby, with adoption rapidly increasing, folks accepting JRuby as both a top-notch Ruby implementation and a top-notch JVM language, and JRuby itself improving by leaps and bounds. Let’s dive in and see what happened to JRuby in 2010!
The People
JRuby has always been a project centered around bringing Ruby to more and more people. To that end, we’ve traveled the world, written blog posts, added contributors, accepted patches, and always tried to support users online. Here’s a few key folks that made a huge difference to JRubyists in 2010 ###Hiro Asari Hiro had been a contributor to JRuby throughout 2009, and had become a regular fixture on the mailing lists and IRC channel, helping users through day-to-day issues running JRuby-based apps. In early 2010, Engine Yard needed to hire a JRuby support expert, and Hiro was the man for the job. He came on full time, we added him as a committer, and late in the year he even started presenting JRuby on the conference circuit. ###Hiroshi Nakamura “Nahi” is a longtime “Ruby core” (the C Ruby/MRI core) team member, specializing in crypto (OpenSSL), IO, and various other system-level features. If you poke around Ruby’s standard library, chances are you’ll see Nahi pop up several times. In mid-2010, Nahi started helping us with jruby-openssl, JRuby’s support for the “openssl” library. He took Ola Bini’s epic port of OpenSSL features and brought it much closer to 100% compatibility with C Ruby’s version–a stunning feat, considering how low-level the “openssl” library actually is. Since then, he’s helped us with some of our trickiest subsystems, and become a great JRuby advocate. ###David Calavera David was also a heavy contributor in 2009, and he continued his contributions in 2010. He has worked hard on improving JRuby’s support for Ruby 1.9 features, fixed dozens of user-reported bugs, and helped support users on email and IRC. He also assembled the amazing Trinidad gem, a JRuby-based wrapper around embedded Tomcat that’s rapidly become a server of choice for JRubyists everywhere. ###Joe O’Brien Joe is one of the founders of EdgeCase, a Ruby/Rails (and more) consultancy based in Ohio. Joe has been a great advocate for JRuby, having dealt with the “enterprise” and knowing how difficult it can be to get them to adopt new technology. In 2010, Joe helped us host the first standalone JRubyConf, turning over his own eRubyCon to JRuby presenters and users from around the world. We’re thrilled to have had such an opportunity to spread the JRuby word…and thrilled with the amazing event Joe set up for us. ###Engine Yard Of course we have to thank Engine Yard for continuing to support us and the JRuby community. Engine Yard has provided a welcoming home, marketing help, travel and technical resources, and moral support to the core JRuby folks who work here: me, Tom Enebo, Nick Sieger, and Hiro Asari. We’ve been proud to launch JRuby support and professional services offerings, JRuby is in production for xCloud, and you can now trial JRuby on AppCloud through the beta program. It’s been great to work at Engine Yard, and even greater to help contribute to the bottom line! ###Users and Contributors Like You Of course JRuby would be nothing without users and contributors just like you. This past year, we’ve had dozens of new JRuby-based sites reported, Ruby gem authors have started to test and explicitly support JRuby, and David Heinemeier Hansson (creator of Rails) noted that Rails 3.0 was “designed to work with” JRuby, in addition to C Ruby. Twitter shows hundreds of JRuby tweets every day, the JRuby mailing lists fielded nearly 14000 messages, and we met thousands more users and potential users at dozens of conferences around the world. We thank our users, contributors, and Ruby library and application authors for making 2010 the best JRuby year yet!
JRuby Itself
Of course we’ve also done a tremendous amount of work on JRuby proper. In 2010, we logged over 2300 commits (on master), resolved 567 bug reports (with another 868 filed…work continues!), published eight JRuby releases (1.4.1, 1.5.0-1.5.6), and improved JRuby’s “RubySpec” pass rates to over 99% in 1.8 mode and over 90% in 1.9 mode. This work will culminate with a JRuby 1.6 release early in 2011…our biggest and most important release yet. Here’s a few of the top areas JRuby has improved in 2010. ###Ruby 1.9 Support With the release of Ruby 1.9.2 this year, we’ve made supporting all its features in JRuby a top priority. We had some support in place already, thanks to contributors like Marcin Mielzynski, Ola Bini, David Calavera, and Hiro Asari, but had put much of that work on hold until Ruby’s core team put out a final 1.9.2 release. Since that release this summer, we’ve made hundreds of commits and fixed hundreds of issues, helping bring JRuby to better than 90% pass rates on RubySpec and over 95% passing running Rails’ ActiveSupport tests in 1.9 mode. JRuby will be officially 1.9-compatible in the coming months. ###Windows Support We believe JRuby is the best path to getting “Ruby everywhere”, and to that end we made another big push in 2010 to improve JRuby’s support for running on Windows. Of course the core VM is already solid; the various JVMs do an excellent job here. But Ruby’s feature set includes a number of system-level features that can be tricky to support uniformly across platforms. Even with those features in place, Rubyists frequently encounter native libraries that don’t work or can’t be built on Windows…and often have had trouble getting up-to-date builds of Ruby itself. We continued to help the community port key extensions to Java (or Ruby + Java integration) to make it easier for Windows users to get started, and JRuby is now frequently considered the easiest path to Ruby on Windows. Expect to see us continue this work in 2011. ###Green Rails 3 Tests We’ve “run Rails” longer than any other alternative Ruby implementation (since 2006!), but during all that time we were never 100% green on Rails’ own tests. Contributors like Hiro, David, Nick Sieger, and Tom Enebo changed all that in 2010, fixing remaining JRuby issues (and bad Rails tests) so that JRuby now runs green on all Rails 3 tests. Even more impressive is the fact that of all the Ruby implementations, JRuby is the only one that maintains a nightly continuous integration build against Rails. We’re dedicated to ensuring JRuby users have an excellent experience running Rails. ###C Extension Support As part of the 2010 Ruby Summer of Code, Tim Felgentreff built out prototype work by Wayne Meissner to add support for Ruby C extensions to JRuby. It was an outstanding effort, well above and beyond expectations (I swore we’d never be able to do it…Tim and Wayne proved me wrong), resulting in many common extensions “just working” on JRuby. We still recommend using Java equivalents or Java ports, since that’s the best path to portable, stable, concurrency-friendly extensions…but this new work will at least provide a short-term migration path. We’ll include C extension support in a JRuby release as soon as possible. ###Performance Behind the scenes, we’ve also continued to move JRuby forward as an implementation. Subbu Sastry and Tom have continued work on a new IR (intermediate representation) and optimizing compiler for Ruby code that has a preliminary interpreter now and will hopefully have drastic impacts on JRuby performance during 2011. I worked on improving JRuby’s potential for dynamic optimization, first by experimenting with using interpreter profiling to eliminate dynamic calls, and later by eliminating much of the per-call overhead for most Ruby methods. Preliminary tests show it’s possible for us to approach Java performance when “dynopts” are enabled, and we’ve come to realize JRuby’s far from being fully-optimized (even while being one of the best already). Look for a lot more of this work in early 2011.
Peripherals
While the core JRuby folks continued to improve JRuby, dozens of other folks improved JRuby-related libraries, platforms, and servers. Here’s a few of our favorites. ###win32ole One of the oldest bugs in JRuby’s tracker documented our lack of support for the “win32ole” library. win32ole provides a clean Ruby API wrapping OLE components on Windows, allowing you to call into Office or IE or most other key Windows-based apps and libraries without writing any native code. As part of an Engine Yard Professional Services contract for Audentes Technology, we finally managed to cleanup, rework, and tightly wrap the Jacob (Java-COM Bridge) library, providing full win32ole support for JRubyists. Tom Enebo put in a Herculean effort over several weeks, ultimately producing the most solid, concurrency-friendly Ruby win32ole library available. ###ActiveRecord JDBC Along with fixing JRuby issues for Rails 3.0, we needed JRuby’s version of Rails’ database adapters to be 100% solid as well. Nick Sieger, always the primary force behind “ActiveRecord-JDBC”, made good on that goal in 2010, bringing AR-JDBC to 1.0 and 100% green across a half-dozen databases. He continued that work, making it solid on several pure-Java databases like Derby (JavaDB), Hypersonic SQL, and the H2 database. Nick’s efforts have helped make JRuby the easiest way to build Rails apps across a wide range of platforms, and we have the users to prove it &mdash running some of the oddest combinations of database and host platform the Ruby world has ever seen. ###Deployment Options Several contributors have also made it even easier to run JRuby server apps this year. Nick Sieger brought his “warbler” and “jruby-rack” libraries to 1.0. Warbler makes it possible to bundle up any Rack-friendly app (including Rails) as a “plain old” WAR (Web ARchive) file, allowing them to be deployed on any Java web container. Nick also added a built-in server called WinStone to Warbler, allowing you to execute a WAR file directly with no target server. He went even farther, making it possible to “warble” any arbitrary Ruby application into an executable JAR file…amazing! No other deployment option has the potential to bring Ruby to as many enterprises as Warbler, and reaching 1.0 was a great milestone. On the other side of the coin, jruby-rack provides a rack-compatible interface to the Java “servlet” API, serving as the backbone of all servlet-hosted Ruby apps. For command-line users, Trindad made its debut. David Calavera wrapped “embedded” Tomcat with an excellent command-line tool, utilizing jruby-rack, allowing JRubyists to have a fast, concurrency-friendly server in a 7MB gem. Hiro Asari helped us “adopt” the GlassFish gem, which serves a similar purpose by wrapping the fast HTTP server “Grizzly” at the core of Oracle’s GlassFish server. These gems are the easiest path to production Rails, bar none. And if you’re a JBoss fan, Bob McWhirter and his team at RedHat have built perhaps the best JRuby support in any mainstream Java application server: TorqueBox. TorqueBox uses jruby-rack to deploy JRuby apps, but goes far beyond that, providing Ruby APIs and plugins for the EE subsystem, scheduled jobs, web services, and a whole lot more. It’s the most complete “Ruby for JavaEE” option available, and we recommend it to all JBoss or EE users looking to explore Ruby (or anyone who wants the excellent services it provides out of the box). Finally, John Woodell and Ryan Brown (two of JRuby’s friends inside Google) continued to improve support for JRuby on Google AppEngine for Java. GAE/J offers users a unique environment for small services, and has proven to be an excellent host for JRuby-based apps. John and Ryan continue to support the JRuby-on-GAE community, and JRubyists are happy to have GAE as another deployment option. ###Tooling and Management JRuby has always been able to leverage standard JVM/JDK tools and management interfaces, but many of these are foreign (and perhaps a bit scary) to day-to-day Rubyists. To support these users better, we’ve done a lot of work in 2010 to make monitoring and managing JRuby apps easier. We’ve added a built-in instrumenting profiler (–profile) that only considers Ruby code, and “call graph” profiling is nearly ready as well. We worked with the maintainers of the ruby-debug gem to finally release the JRuby-backed as an official gem, meaning ruby-debug now installs cleanly. We’ve contributed patches to RubyGems to improve startup, and modified our own copy (with lots of help from “mkristian”) to support installing and depending on Maven libraries as Ruby gems, improving how JRuby users incorporate all those amazing Java libraries into their apps. And we shipped two-way integration between Rake and Ant this year, making it trivial (and beautiful) to replace Ant build scripts with Rakefiles or seamlessly combine the two worlds. ###Pure-Java Nokogiri During 2009, the Nokogiri XML library became the de-facto standard for anyone doing serious XML processing. It was clean, fast, and wrapped the widely-used libxml library. JRubyists were able to play too, but because of the libxml dependency they had to accept an FFI (foreign function interface) version that did not perform as well as the “raw” C extension. We hosted a Google Summer of Code student, Sergio Arbeo, who made a valiant initial effort at producing a pure-Java Nokogiri by wrapping key Java libraries like Xerces. Unfortunately, the summer ended, and there remained a lot of work. During 2010, our own Yoko Harada, creator of JRuby’s embedding, JSR-223, and BSF implementations, took on much of the task of finishing “nokogiri-java”. As a result, we now have a nearly-perfect version of Nokogiri that works on all platforms, with or without libxml, and with no native bindings. It’s not only the most portable version of Nokogiri…it’s also a lot faster than the FFI version.
Community
Where would we be without the users, events, and projects our community members have put together? Nowhere, that’s where! We’re proud point out a few key community-related wins from 2010. ###JRubyConf 2010 Thanks to Joe O’Brien and Engine Yard, we ran the first ever standalone JRubyConf! In early October, over 150 people from around the world descended on Columbus, Ohio, to hear about JRuby, JRuby on Rails, JRuby on Android, JRuby-related projects, and a whole lot more (not all of it JRuby-specific, either.) After the great sucesses of JRubyConf 2009 (the day after RubyConf 2009) and JRubyConf 2010, we’re sure to set up a JRubyConf 2011. We’ve also been kicking around the idea of a JRubyConf EU. Will we see you at a JRubyConf this year? ###Blog Posts JRuby community members have written hundreds of blog posts this year…many more than we can list in this review. We’ll try to assemble an aggregated post soon, but I strongly recommend you do a bit of searching and see what you can find. JRuby is being used in some surprisingly novel ways! ###Conferences and User Groups We are in an interesting position with JRuby, needing to cover (ideally) both Ruby and Java-related events. As a result, we’ve done a lot of traveling to bring JRuby “to the people”. These days, there’s a JRuby presentation at just about every Ruby and Java conference around the globe, and most Ruby or Java user groups have had at least one JRuby talk. Many of them are run by core JRuby folks, but many more are done by actual JRuby users helping to spread the word. JRuby’s community is doing more and more to help us cover events around the globe, and we hope in 2011 to see that trend continue. 2010 also saw the birth of the first JRuby-specific user group, JRuby Users JP. They’ve hosted a half-dozen meetings already, and we got to meet the organizer and several members at RubyKaigi 2010. Have you done a presentation on JRuby yet? Why not? ###RubyConf 2010 “JRuby Track” My first JRuby presentation (and first public speaking gig) was at RubyConf 2005. At the time, JRuby couldn’t even run IRB, and other presenters actually made jokes about JRuby. Fast-forward to 2010, where JRuby had a half-dozen dedicated sessions at RubyConf and played a part in many more. We’re grateful to the RubyConf organizers and humbled by the Ruby community’s acceptance of JRuby. It really makes us feel welcome to know our efforts are helping people be better Rubyists. ###LinkedIn’s “Signal” LinkedIn has always been a hotbed of polyglot development, and were one of the earlier users of JRuby for user-facing applications (LinkedIn Polls ran–and may still run–atop JRuby). This year, they launched the ambitious Signal, a social-site aggregator for your LinkedIn profile. It uses JRuby for the front-end with other JVM languages like Scala providing the backend services. The project went so well, they’ve been green-lighted to do several more in the same mold. ###RedCar If you’re a Mac user, chances are your GUI text editor of choice is TextMate. It’s so good, in fact, that Dan Lucraft made his own version called RedCar, and wrote it in Ruby so he could easily hack on it and add or tweak the features he never got from TextMate. Late in 2009, Dan made the decision to move RedCar to JRuby from a C Ruby + GTK backend, to make cross-platform support easier. And during 2010, RedCar has added many incremental releases (up to the current 0.9.2) and tons of new features, users, and contributors. I even switched from TextMate to RedCar as my GUI text editor of choice. We’re very proud to show off RedCar during JRuby presentations, and we’re thrilled to see a packaged desktop app based on JRuby becoming popular. ###Ruboto 2010 also saw an explosion in another area: the popularity of the Android platform. Android is a very rich Java-like system, and where Java goes (J)Ruby can follow! Building off my experiments in 2009 to bring JRuby to Android, community members like Jan Berkel and Scott Moyer made massive improvements to my “Ruboto IRB” app, finally releasing Ruboto to the Android marketplace in 2010. Ruby Summer of Code student Daniel Jackoway started the “Ruboto Core” project, an app generator and set of utility APIs for building standalone JRuby apps for Android. And users like Jay McGavren have been promoting and experimenting with Ruboto, showing the world how beautiful and powerful mobile Ruby really can be. ###”Using JRuby” Completed After two years of work by five authors, four of them from JRuby core (me, Nick, Tom, and Ola) and the fifth our outstanding lead author Ian Dees, we finally completed “Using JRuby”, the definitive guide for JRuby users. As of this writing, the book has gone to typesetting and should ship in January 2011, thanks to the patience and encouragement of the folks at Pragmatic Programmers. Along with having a dedicated conference, a published book has always indicated to me that a project has really arrived. Finally, JRuby has its book! ###The Bossie JRuby also arrived in a different way during 2010 by winning an InfoWorld “Bossie” award for “Best Open Source Application Development Software.” Now we can say “JRuby, the award-winning Ruby implementation”!
Your Turn
Now it’s time for you to join the JRuby community! Get out to your local Java, Ruby, OO, or other tech group and do a talk or host a hackfest. Present at a nearby conference. Try out JRuby for your own applications and let us know what we can improve. Write a blog post or record a screencast. Tell your friends and neighbors how awesome JRuby is. Scan recent JRuby bug reports, failing RubySpecs, or mailing list items to see if you can contribute. Jump on the JRuby wiki and contribute improvements, new articles, or translations of existing ones. Help us keep bringing Ruby to the world, and we’ll keep doing everything we can to make JRuby great! And finally…why not tell us your JRuby 2010 story in the comments or in a blog post? We’d love to hear from you!
Share your thoughts with @engineyard on Twitter