SlideShare a Scribd company logo
What's Different About JRuby?

       Charles Oliver Nutter
            @headius
What's Different About JRuby?

     (and why should you care?)
JRuby

Ruby on the JVM
JRuby

Started in 2001
JRuby

Fast and compatible
JRuby

Contributors all over the world
JRuby

Awesomesauce!
Install JRuby

rvm install jruby ; rvm use jruby
Install JRuby

Download tar/zip from jruby.org
      Unpack archive
       Add to PATH
Install JRuby

Windows installer at jruby.org
Get the Book
What's Different?
The Bad
Memory Footprint
Memory Footprint

  Base memory size is larger
(Footprint over time is smaller)
Memory Footprint

  Objects are larger
Memory Footprint

        Objects are larger
(But instance var table is smaller)
Missing or Disabled Features
Missing or Disabled Features

         No Kernel#fork
Missing or Disabled Features

      No continuations (callcc)
Missing or Disabled Features

      No continuations (callcc)
     (except for specific forms)
Missing or Disabled Features

     ObjectSpace off by default
         (-X+O to enable)
Missing or Disabled Features

    set_trace_func off by default
        (--debug to enable)
C Extensions

     Shipped in JRuby 1.6,
still considered experimental
The Good
Ruby Itself
Ruby Itself

Ruby 1.8.7 and 1.9.2 in the box
28
29
Ruby Itself

    Multi-VM support
(many apps in one process)
31
Ruby Itself

Solid across platforms
Ruby Itself

  Solid across platforms
(Best Ruby on Windows?)
Ruby Itself

  Solid across platforms
(Best Ruby on OpenVMS?)
Ruby Itself

 Solid across platforms
(Best Ruby on zLinux?)
Java Virtual Machine (JVM)
Java Virtual Machine (JVM)

       Java libraries like Swing
   (or Scala, Groovy, Clojure, etc)
38
39
40
41
Java Virtual Machine (JVM)

      Tools like VisualVM
43
44
45
46
47
48
49
Java Virtual Machine (JVM)

     Best garbage collectors
Java Virtual Machine (JVM)

     Optimizing JIT compiler
Java Virtual Machine (JVM)

      Concurrent threading
53
54
55
56
57
58
Java Virtual Machine (JVM)

   New dynamic dispatch support
         (invokedynamic)
60
61
Ruby = Method Calls
   Lots and lots and lots and lots...
def foo
  bar
end

def bar
  baz     foo   bar   baz
end

def baz
  # ...
end
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
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
def foo
                      JRuby on Java 7
  bar
end

def bar
  baz     foo               bar                  baz
end

def baz
  # ...
end
                Straight through dispatch path
def foo
                      JRuby on Java 7
  bar
end

def bar
  baz           foo       bar       baz
end

def baz
  # ...
end
          Optimizations (like inlining) can happen!
Benchmarks!
You know you love them.
A “Better” fib bench
   bench_fib_complex.rb 5 35
“Richards”
bench_richards.rb 1000000
Red/Black Tree
 github.com/headius/redblack
Wait for it...
    Benchmarks are benchmarks.
If you don’t like them, give us yours!
JRuby: What's Different (RORO Melbourne October 2011)
App Development
App Development

Trinidad for command-line server
       gem install trinidad
App Development

Torquebox for "Enterprise"
App Development

Warbler for WAR/JAR files
   gem install warbler
App Development

      Engine Yard AppCloud
engineyard.com/products/appcloud
App Development

Other Java servers using Warbler
What It Means For You
What It Means For You

  Faster Ruby applications
What It Means For You

   Better tool ecosystem
What It Means For You

   Solid concurrent servers
What It Means For You

  A better Ruby experience!
Thank You!

Charles Oliver Nutter
     @headius

More Related Content

PDF
Jruby a Pi and a database
PPT
XRuby_Overview_20070831
PDF
Test::Kantan - Perl and Testing
PDF
Perl6 meets JVM
PPTX
ZN-2015
PPTX
Server::Starter meets Java
PDF
Why JVM will outlive java?
PDF
MacRuby
Jruby a Pi and a database
XRuby_Overview_20070831
Test::Kantan - Perl and Testing
Perl6 meets JVM
ZN-2015
Server::Starter meets Java
Why JVM will outlive java?
MacRuby

What's hot (20)

PDF
JRuby - The Perfect Alternative
PDF
Ruby - a tester's best friend
PPTX
RJB - another choice for Ruby and Java interoperability
KEY
MacRuby: What is it? and why should you care?
PPT
Inside the JVM
PDF
Optcarrot: A Pure-Ruby NES Emulator
PDF
TRICK2013 Results
PDF
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbert
PDF
Asynchronous I/O in Python 3
PPTX
Graal in GraalVM - A New JIT Compiler
PDF
How to develop the Standard Libraries of Ruby?
PDF
20140918 ruby kaigi2014
PDF
JRuby: The Hard Parts
PDF
20140925 rails pacific
PDF
Over 9000: JRuby in 2015
PDF
Java tuning on GNU/Linux for busy dev
PPTX
Dissecting the Hotspot JVM
PDF
Sparklife - Life In The Trenches With Spark
KEY
The Ruby Racer: under the hood
ODP
2009 07 21: Nested Attributes
JRuby - The Perfect Alternative
Ruby - a tester's best friend
RJB - another choice for Ruby and Java interoperability
MacRuby: What is it? and why should you care?
Inside the JVM
Optcarrot: A Pure-Ruby NES Emulator
TRICK2013 Results
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbert
Asynchronous I/O in Python 3
Graal in GraalVM - A New JIT Compiler
How to develop the Standard Libraries of Ruby?
20140918 ruby kaigi2014
JRuby: The Hard Parts
20140925 rails pacific
Over 9000: JRuby in 2015
Java tuning on GNU/Linux for busy dev
Dissecting the Hotspot JVM
Sparklife - Life In The Trenches With Spark
The Ruby Racer: under the hood
2009 07 21: Nested Attributes
Ad

Similar to JRuby: What's Different (RORO Melbourne October 2011) (20)

KEY
Euruko 2012 - JRuby
KEY
Практики применения JRuby
PDF
JRuby Jam Session
PPT
Practical JRuby
PDF
Bitter Java, Sweeten with JRuby
ODP
First Day With J Ruby
KEY
Why JRuby? - RubyConf 2012
PDF
JRoR Deploying Rails on JRuby
PDF
JRuby in the enterprise
KEY
Mirah Talk for Boulder Ruby Group
PDF
JRuby - Enterprise 2.0
PDF
JRuby @ Boulder Ruby
PDF
Developing cross platform desktop application with Ruby
PDF
The Enterprise Strikes Back
KEY
Jruby synergy-of-ruby-and-java
PDF
JRuby Basics
PDF
JRuby on Rails - RoR's Simplicity Meets Java's Class (a case in point)
KEY
Aloha RubyConf 2012 - JRuby
PDF
The Future of JRuby - Baruco 2013
PDF
JRuby 9000 - Taipei Ruby User's Group 2015
Euruko 2012 - JRuby
Практики применения JRuby
JRuby Jam Session
Practical JRuby
Bitter Java, Sweeten with JRuby
First Day With J Ruby
Why JRuby? - RubyConf 2012
JRoR Deploying Rails on JRuby
JRuby in the enterprise
Mirah Talk for Boulder Ruby Group
JRuby - Enterprise 2.0
JRuby @ Boulder Ruby
Developing cross platform desktop application with Ruby
The Enterprise Strikes Back
Jruby synergy-of-ruby-and-java
JRuby Basics
JRuby on Rails - RoR's Simplicity Meets Java's Class (a case in point)
Aloha RubyConf 2012 - JRuby
The Future of JRuby - Baruco 2013
JRuby 9000 - Taipei Ruby User's Group 2015
Ad

More from Charles Nutter (20)

PDF
The Year of JRuby - RubyC 2018
PDF
Down the Rabbit Hole: An Adventure in JVM Wonderland
PDF
Ruby Performance - The Last Mile - RubyConf India 2016
PDF
JRuby 9000 - Optimizing Above the JVM
PDF
JRuby and Invokedynamic - Japan JUG 2015
PDF
Fast as C: How to Write Really Terrible Java
PDF
Open Source Software Needs You!
PDF
InvokeBinder: Fluent Programming for Method Handles
PDF
Doing Open Source the Right Way
PDF
Bringing Concurrency to Ruby - RubyConf India 2014
PDF
Beyond JVM - YOW! Sydney 2013
PDF
Beyond JVM - YOW! Brisbane 2013
PDF
Beyond JVM - YOW Melbourne 2013
PDF
Down the Rabbit Hole
PDF
High Performance Ruby - E4E Conference 2013
PDF
Invokedynamic in 45 Minutes
PDF
Invokedynamic: Tales from the Trenches
KEY
JavaOne 2012 - JVM JIT for Dummies
KEY
High Performance Ruby - Golden Gate RubyConf 2012
KEY
InvokeDynamic - You Ain't Seen Nothin Yet
The Year of JRuby - RubyC 2018
Down the Rabbit Hole: An Adventure in JVM Wonderland
Ruby Performance - The Last Mile - RubyConf India 2016
JRuby 9000 - Optimizing Above the JVM
JRuby and Invokedynamic - Japan JUG 2015
Fast as C: How to Write Really Terrible Java
Open Source Software Needs You!
InvokeBinder: Fluent Programming for Method Handles
Doing Open Source the Right Way
Bringing Concurrency to Ruby - RubyConf India 2014
Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Brisbane 2013
Beyond JVM - YOW Melbourne 2013
Down the Rabbit Hole
High Performance Ruby - E4E Conference 2013
Invokedynamic in 45 Minutes
Invokedynamic: Tales from the Trenches
JavaOne 2012 - JVM JIT for Dummies
High Performance Ruby - Golden Gate RubyConf 2012
InvokeDynamic - You Ain't Seen Nothin Yet

Recently uploaded (20)

PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
A Presentation on Artificial Intelligence
PPTX
Chapter 5: Probability Theory and Statistics
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
A Presentation on Touch Screen Technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
August Patch Tuesday
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Assigned Numbers - 2025 - Bluetooth® Document
DP Operators-handbook-extract for the Mautical Institute
A Presentation on Artificial Intelligence
Chapter 5: Probability Theory and Statistics
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
Heart disease approach using modified random forest and particle swarm optimi...
Zenith AI: Advanced Artificial Intelligence
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
TLE Review Electricity (Electricity).pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
OMC Textile Division Presentation 2021.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Group 1 Presentation -Planning and Decision Making .pptx
A Presentation on Touch Screen Technology
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
August Patch Tuesday

JRuby: What's Different (RORO Melbourne October 2011)

Editor's Notes