JRuby Roundup: JRuby on EY AppCloud, JRuby-Lint, JRuby Delegates
There are two camps of customers demanding JRuby:
A key enabler for JRuby support is Trinidad. Trinidad allows you to run rails or rack compatible applications within an embedded Apache Tomcat, and it is the creation of Engine Yard’s David Calavera.
- Applications that desire to incorporate Java libraries
- Developers wanting features that MRI cannot provide – real threads, a selection of modern garbage collectors, in-process caching, and full utilization of available memory, as starters.
The post continues with instructions on setting up JRuby and Trinidad on AppCloud, and explains that JRuby, like Rubinius, is currently available through under the beta program:
As a feature under the beta program, we will endeavor to provide all JRuby users with feedback and support via the ey-beta-talk mailing list. It is our intent to stabilize our JRuby integration as soon as possible and move it into General Availability (and thus fully supported under Engine Yard Support programs).
It's easy to move from MRI to JRuby - but there are some Ruby features that should be avoided on JRuby, either because they can't be fully supported or because there are better alternatives. JRuby team member Nick Sieger has started work on jruby-lint, a static analysis tool that analyzes the source code and points out code that should be changed. Examples of the detected patterns are (from the Readme.md):
- Report usage of ObjectSpace.each_object and ObjectSpace._id2ref which are expensive and disabled by default
- Report usage of Thread.critical, which is discouraged in favor of a plain Mutex.
- Report usage of Kernel#fork (which does not work) and Kernel#exec (which does not replace the current process).
- Report known gems and libraries that use C extensions and try to provide known alternatives.
Jruby-lint fetches the list of JRuby alternatives to C extensions from the JRuby Wiki.
A new list of "JRuby Delegates" is supposed to help the JRuby community grow, in particulary making it easy to get access to local JRuby experts:
The users listed on this wiki page have volunteered to act as local "JRuby Delegates" when the JRuby core team members are unable to travel. They can answer questions about JRuby, meet up for lunch/dinner/hacking, speak at nearby conferences, and generally act as a local JRuby "expert" for some definition of "expert". You should feel comfortable contacting them directly with questions, and know that they'll either help you or put you in contact with someone who can.
Finally, JRuby 1.6.2 was released, bringing some important bug fixes.
Stephanie Davis (nee Stewart) Dec 21, 2014