JRuby in 2017 and beyond: Challenges, Bugs, Hopes and Dreams
Continuing our series for the London Ruby Unconference 2017, in this post Ivo Anjo (LinkedIn) talks a bit about his second topic for the event!
His first topic was published here: What impact will optimization runtimes such as TruffleRuby have on how we write Ruby code?
Jairo: Hi Ivo, tells us a bit about yourself!
I’m a software ninja with a passion for performance and concurrency. I want to have my cake and eat it too: I’ve been using Ruby for three years and fell in love with its awesome community, expressiveness and how productive I can be when using it, but I also want the concurrency, tooling and performance I’m used to from other languages.
I’ve picked up Ruby when I started working at Talkdesk in 2014, after several years working on the Java ecosystem. I had barely used Ruby before, quickly fell in love with its community, but I missed some of the libraries and tools I was used to from Java: great tooling for debugging, and high-quality concurrency tools.
This has led me to discover and contribute to both JRuby and concurrent-ruby (among others), allowing me to have my cake and eat it too (in parallel) (really fast) (without GIL).
At Talkdesk, I’ve worked on the first production system that used JRuby — — with great success. Many other internal micro-services soon followed, and I’ve also worked on performance analysis of these systems, including upstream performance improvements to our dependencies and JRuby itself.
I’ve recently jumped ship to Amazon, where I’m working as part of the Profiler team in making tools to help Amazon’s services reach kick-ass performance.
London Ruby Unconference
Welcome to the London Ruby Unconference 2017! Unconference Theme The love for Ruby and all things related to Ruby…
Jairo: How would you introduce your topic in an interesting fashion to a person that has (at least) a basic Ruby programming level?
For a programming language such as Ruby to actually do anything on a computer, a tool needs to exist that makes it run on that computer.
If you’ve installed and used the Ruby command, you have used such a tool, which the community usually calls MRI, for Matz’s (Ruby’s creator) Ruby Interpreter.
This session is about another Ruby engine, which has also been around for quite a long time: JRuby. JRuby makes the Ruby language work on top of the Java Virtual Machine, yielding a number of advantages:
- Better performance in many cases, and access to real parallelism.
- Access to both Ruby’s and Java’s library ecosystem. You can pick and match, and use the best tools and libraries for the job.
- Improved tooling. Many big companies such as Sun/Oracle, Red Hat, IBM and a very strong community have created exceptional tooling for the Java platform, and you can take advantage of it.
- Portability. JRuby runs everywhere that Java does. Linux, macOS, Windows, Android, and even mystical enterprise hardware.
- Introduce Ruby to an existing Java or JVM application.
But if it’s that good, what’s the catch? Why isn’t everyone using it already?
I would like to share some of my experience using JRuby for several production applications at Talkdesk, and also to start a discussion on this matter.
Jairo: What could be a nice practical application of the things someone would learn in your session?
Working with JRuby and its tools
Jairo: Will you be doing any hands-on demo in your session?
Yes, I plan to show a quick start with JRuby and some Java tools (such as VisualVM) you can use with it.
Jairo: Do people attending your session need any specific requirements or prepare something prior to attending the session?
~ It’s easier to follow along if you also have JRuby installed.
To install JRuby, I recommend installing the Java 8 Development Kit (available at http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and then either use a tool such as rvm to install it (`rvm install jruby-22.214.171.124`) or just follow the instructions at http://jruby.org/getting-started.
Jairo: Awesome! Thanks Ivo!
We have other people offering to run workshops and topics and there’s still plenty of room if you wish to contribute to the Unconference. Get your ticket and optionally let us know if you would be interested in being one of the session leaders at the event.
We hope to see you there!