Why jruby?

I’m using jruby for my rails applications for about 2 years.
Sometimes I have troubles with some gems but nothing important.
I would like to know why you use jruby rather than ruby MRI.
My reasons are: easy install and upgrade, use of jvm threads and easy
deployment.
I don’t use java, if I need to develop a java application I use grails.

Being able to embed/script within/from other Java apps.

I think a reason to use JRuby is to run Ruby on the JVM, and get
threading
and scalability that you don’t get with the standard Ruby runtime (I am
under the impression you don’t get that stuff with MRI, but I might be
wrong).

I do not think that being able to script within/from Java apps is a good
reason to use JRuby. I think if you want a scripting language on the JVM
and
you want to interact with Java libraries, you should use Groovy. I think
mixing ecosystems like that can be a bad idea.

Regards,
Eric MacAdie

On Mon, Mar 14, 2011 at 2:56 PM, Eric MacAdie [email protected]
wrote:

I think a reason to use JRuby is to run Ruby on the JVM, and get threading
and scalability that you don’t get with the standard Ruby runtime (I am
under the impression you don’t get that stuff with MRI, but I might be
wrong).

I do not think that being able to script within/from Java apps is a good
reason to use JRuby. I think if you want a scripting language on the JVM and
you want to interact with Java libraries, you should use Groovy. I think
mixing ecosystems like that can be a bad idea.

Why? What’s the difference between Groovy and JRuby in that regard?

JRuby is the business.

Our app is 99% ruby, aside from a couple of bits of java to improve
performance in some of our hot spots.

  • We get quite a big performance win over MRI (about twice the
    throughput)
  • ‘Proper’ threading is a pretty big win. Less processes = less
    memory usage per app server.
  • We haven’t needed them yet, but there are jillions of tools for
    inspecting running processes to track down resource leaks (Charlie’s
    done some good blog posts on this)
  • I’ve got quite a lot of confidence in the JVM, although that is
    mostly superstition on my part


Nick G.
Developer @ Media Service Provider
+44 207 729 4797