This document provides an overview of JRuby, highlighting both advantages and disadvantages compared to Ruby implementations. Key points include:
- JRuby runs Ruby code on the Java Virtual Machine (JVM), allowing access to Java libraries and tools while retaining Ruby syntax and semantics.
- The memory footprint of JRuby applications is initially larger than CRuby due to object sizes, but memory usage over time can be smaller with JRuby's garbage collection.
- Features like fork, continuations, and some extensions may be missing or disabled in JRuby.
- JRuby provides multiple Ruby versions and allows running multiple Ruby applications in a single JVM process.
- Performance benchmarks show JRuby can be competitive with
45. Ruby = Method Calls
Lots and lots and lots and lots...
46. def foo
bar
end
def bar
baz foo bar baz
end
def baz
# ...
end
47. def foo
JRuby on Java 5/6
bar
end
def bar JRuby JRuby
baz foo call bar call baz
end logic logic
def baz
# ...
end
Kills many JVM optimizations
48. def foo
JRuby on Java 7
bar
X X
end
def bar JRuby JRuby
baz foo call bar call baz
end logic logic
def baz
# ...
end
Dynamic call logic built into JVM
49. def foo
JRuby on Java 7
bar
end
def bar
baz foo bar baz
end
def baz
# ...
end
Straight through dispatch path
50. def foo
JRuby on Java 7
bar
end
def bar
baz foo bar baz
end
def baz
# ...
end
Optimizations (like inlining) can happen!
87. Try JRuby on Engine Yard Cloud Today
500 compute hours for free
Full-featured production ready
environment
Start and stop your
environment as needed
No credit card required and
completely risk free
88. Engine Yard @ JavaOne!
Stop by our exhibition
booth
JRuby team ofïŹce hours
Talks by JRuby team
Talk by Mike Piech and
Jacob Lehrbaum on the
value of PaaS