JRuby 9000 has landed and its the biggest yet
The newest version of JRuby, codename 9000, is accompanied by Ruby 2.2 compatibility, a new runtime, native operations for much of IO as well as some versioning changes to boot – the result of a lot of work, time and commits by 104 contributors.
The new version of JRuby, branded JRuby 9000, has officially been released and features Ruby 2.2 compatibility along with a new optimising runtime based on a traditional compiler design. You’ll need at least Java 7 to get going with the new shipment.
JRuby 9000 has also been proclaimed as the single largest release ever, with the team eager to point out that they’re merely beginning to unlock the potential to push the bar higher on JRuby performance.
Improved compatibility and versioning update
Supporting multiple compatibility levels was an idea brewing from way back – JRuby 1.7.x saw the JRuby team experimenting internally with the idea of backing multiple compatibility levels of Ruby from the same runtime. However, the whole thing turned out to be quite messy, with method names needing version numbers and general confusion arising over which method to call when making native extensions.
While the plan to support several versions of Ruby had to be scrapped for the time being, JRuby 9000 supports the current version of Ruby 2.2 – as new versions of Ruby are released, users will see a subsequent version of JRuby that supports the same features.
For their versioning changes, the team explained the concept further over on the blog:
We opted to go with 9000 as a code name and 22.214.171.124 as a version number to separate it from Ruby’s version numbers (1.8, 1.9, 2.0 etc). We frequently ran into confusion about our version numbers versus Ruby’s, and neither “1.8” nor “2.0” would do anything but make that worse.
As far as additional releases go, maintenance releases will be labelled as 9.0.x and Ruby compatibility updates numbered as 9.x.
New runtime and native operations
JRuby 9000’s new runtime, called IR, comes with the speed of JRuby 1.7 but has laid years worth of plans for improving performance. Currently, the team are only executing conservative static optimisations, with profiled optimisations to come over the next few months.
The 9000 development cycle was also identified as the time to improve the POSIX behaviour of JRuby’s Process and IO subsystems, eventuating in the language being the first POSIX-friendly JVM language:
JRuby 9000 now uses native operations for much of IO and almost all of Process. This makes us the first POSIX-friendly JVM language, with full support for spawning processes, inheriting open streams, perfoming nonblocking operations on all types of IO, and generally fitting well into a POSIX environment.
Years of work, over 5500 commits and 468 fixed issues have all contributed to this major release. Further statistics and GitHub issue information can be found here.