This document discusses the pros and cons of using JRuby, a Ruby implementation that runs on the Java Virtual Machine. Some key advantages of JRuby include access to the vast Java library ecosystem, better performance compared to MRI Ruby due to improvements in the JVM, and the ability to leverage Java deployment infrastructure. However, JRuby also has disadvantages like potential issues with Ruby gems that use C extensions and lack of thread safety in some Ruby libraries. The document concludes that JRuby is worth considering if access to Java libraries, performance, or deployment options are important factors for a project.
33. Gem availability
Gems written in pure Ruby work with JRuby
Gems with C extensions don’t work with JRuby
Typically, these are older, less-maintained gems
33
34. Fixing gems
Sometimes, you can fix the existing gem
Could be as simple as replacing its dependencies
Or could be complex
34
44. More bang for your buck
One server: MRI runs two Ruby processes
One server: JRuby runs two Ruby processes with 4
threads each
Can use JRuby on Heroku
44
45. Concurrency is not free
Bugs in non-thread safe libraries
• Rails
• Airbrake
Libraries developed without a focus on concurrency
45
46. Concurrency is not free
Writing thread-safe code is difficult
Even for Java developers with experience
But concurrency is the new sexy
46
47. Concurrency is worth it
Huge performance improvements
Some features would be much easier with threads
Threads is the future
47