In action!gotocon.com/dl/jaoo-aarhus-2008/slides/OlaBini_JRubyInAction.pdf · Deployment Traditional approach Pack of Mongrels N mongrels for N concurrent requests Deployed with Capistrano

Post on 30-Mar-2021

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Ola BiniJRuby Core DeveloperThoughtWorks Studios

ola.bini@gmail.comhttp://olabini.com/blog

In action!JRuby

Agendawhat

why

how

rails

other things

real world

the future

q & a

what

What is JRuby

What is JRubyImplementation of the Ruby language

What is JRubyImplementation of the Ruby language

Java 1.5+

What is JRubyImplementation of the Ruby language

Java 1.5+

Open Source

What is JRubyImplementation of the Ruby language

Java 1.5+

Open Source

Compatible with Ruby 1.8.6 p114

What is JRubyImplementation of the Ruby language

Java 1.5+

Open Source

Compatible with Ruby 1.8.6 p114

Current versions 1.1.4 and 1.0.3

Community

Community7.5 core developers

Community7.5 core developers

40-50 contributors

Community7.5 core developers

40-50 contributors

New projects from JRuby:

Community7.5 core developers

40-50 contributors

New projects from JRuby:

JOni

Community7.5 core developers

40-50 contributors

New projects from JRuby:

JOni

RbYAML, JvYAML, JvYAMLb

Community7.5 core developers

40-50 contributors

New projects from JRuby:

JOni

RbYAML, JvYAML, JvYAMLb

JNA-Posix

Community7.5 core developers

40-50 contributors

New projects from JRuby:

JOni

RbYAML, JvYAML, JvYAMLb

JNA-Posix

JOpenSSL

Compatibility

CompatibilityUsing the RubySpecs

CompatibilityUsing the RubySpecs

Applications are king

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

Testing is cool

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

Testing is cool

~ 42,000 expectations/assertions

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

Testing is cool

~ 42,000 expectations/assertions

Prevents regressions

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

Testing is cool

~ 42,000 expectations/assertions

Prevents regressions

Better definition of Ruby

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

Testing is cool

~ 42,000 expectations/assertions

Prevents regressions

Better definition of Ruby

Might also prevent community fragmentation

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

Testing is cool

~ 42,000 expectations/assertions

Prevents regressions

Better definition of Ruby

Might also prevent community fragmentation

Like Sapphire

CompatibilityUsing the RubySpecs

Applications are king

Rails, RubyGems, Rake, RSpec

Testing is cool

~ 42,000 expectations/assertions

Prevents regressions

Better definition of Ruby

Might also prevent community fragmentation

Like Sapphire

Why? why

Why JRuby?

Why JRuby?Threading

Why JRuby?Threading

Unicode

Why JRuby?Threading

Unicode

Performance

Why JRuby?Threading

Unicode

Performance

Memory

Why JRuby?Threading

Unicode

Performance

Memory

C Extensions

Why JRuby?Threading

Unicode

Performance

Memory

C Extensions

Libraries

Why JRuby?Threading

Unicode

Performance

Memory

C Extensions

Libraries

Politics

Why JRuby?Threading

Unicode

Performance

Memory

C Extensions

Libraries

Politics

Legacy systems

Why JRuby on Rails?

Why JRuby on Rails?Same same

Why JRuby on Rails?Same same

Conservative organizations (IS)

Why JRuby on Rails?Same same

Conservative organizations (IS)

Deployment

Why JRuby on Rails?Same same

Conservative organizations (IS)

Deployment

Integration

Why JRuby on Rails?Same same

Conservative organizations (IS)

Deployment

Integration

Monitoring

Why JRuby on Rails?Same same

Conservative organizations (IS)

Deployment

Integration

Monitoring

Ruby + Java == Cost efficiency && plausible fallback

How?how

Getting started

Getting startedInstall Java

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

This includes JRuby, Ruby stdlib, RubyGems and rake

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

This includes JRuby, Ruby stdlib, RubyGems and rake

Unpack

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

This includes JRuby, Ruby stdlib, RubyGems and rake

Unpack

Multiple copies are fine

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

This includes JRuby, Ruby stdlib, RubyGems and rake

Unpack

Multiple copies are fine

Add <jruby-dir>/bin to PATH

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

This includes JRuby, Ruby stdlib, RubyGems and rake

Unpack

Multiple copies are fine

Add <jruby-dir>/bin to PATH

Install gems

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

This includes JRuby, Ruby stdlib, RubyGems and rake

Unpack

Multiple copies are fine

Add <jruby-dir>/bin to PATH

Install gems

gem install rspec

Getting startedInstall Java

Download http://dist.codehaus.org/jruby/jruby-bin-1.1.4.tar.gz

This includes JRuby, Ruby stdlib, RubyGems and rake

Unpack

Multiple copies are fine

Add <jruby-dir>/bin to PATH

Install gems

gem install rspec

jruby -S gem install rspec

Calling Ruby from Java

// One-time load Ruby runtimeScriptEngineManager factory = new ScriptEngineManager();

ScriptEngine engine = factory.getEngineByName("jruby");

// Evaluate JRuby code from string.try { engine.eval("puts('Hello')");} catch (ScriptException exception) { exception.printStackTrace();}

Java Integration

Java IntegrationJava types == Ruby types

Java IntegrationJava types == Ruby types

Call methods, construct instances, pass objects around

Java IntegrationJava types == Ruby types

Call methods, construct instances, pass objects around

camelCase or snake_case both valid

Java IntegrationJava types == Ruby types

Call methods, construct instances, pass objects around

camelCase or snake_case both valid

Interfaces can be implemented

Java IntegrationJava types == Ruby types

Call methods, construct instances, pass objects around

camelCase or snake_case both valid

Interfaces can be implemented

Classes can be inherited from

Java IntegrationJava types == Ruby types

Call methods, construct instances, pass objects around

camelCase or snake_case both valid

Interfaces can be implemented

Classes can be inherited from

Implicit closure conversion

Java IntegrationJava types == Ruby types

Call methods, construct instances, pass objects around

camelCase or snake_case both valid

Interfaces can be implemented

Classes can be inherited from

Implicit closure conversion

Extra added features to Rubyfy Java classes and Interfaces

DemoJava Integration

Differences to MRI

Differences to MRINo continuations

Differences to MRINo continuations

will you miss them?

Differences to MRINo continuations

will you miss them?

No native extensions

Differences to MRINo continuations

will you miss them?

No native extensions

you might miss them

Differences to MRINo continuations

will you miss them?

No native extensions

you might miss them

No crappy GC

Differences to MRINo continuations

will you miss them?

No native extensions

you might miss them

No crappy GC

you won’t miss that

Differences to MRINo continuations

will you miss them?

No native extensions

you might miss them

No crappy GC

you won’t miss that

File and POSIX operations is still not 100%

Rails?

rails

Getting started

[jaoo] (1) ʎ jruby -S gem install rails

[jaoo] (2) ʎ jruby -S gem install activerecord-jdbcmysql-adapter

[jaoo] (3) ʎ jruby -S rails yourapp -d mysql

[jaoo] (4) ʎ cd yourapp

[jaoo] (5) ʎ sed -i -e 's/mysql/jdbcmysql/g' config/database.yml

[jaoo] (6) ʎ jruby script/server

GlassFish

GlassFishModular application server

GlassFishModular application server

Full support for JEE 5

GlassFishModular application server

Full support for JEE 5

Monitoring etc

GlassFishModular application server

Full support for JEE 5

Monitoring etc

Support for several alt JVM languages

GlassFishModular application server

Full support for JEE 5

Monitoring etc

Support for several alt JVM languages

Ruby, PHP, JavaScript

GlassFishModular application server

Full support for JEE 5

Monitoring etc

Support for several alt JVM languages

Ruby, PHP, JavaScript

[jaoo] (7) ʎ jruby -S gem install glassfish

GlassFishModular application server

Full support for JEE 5

Monitoring etc

Support for several alt JVM languages

Ruby, PHP, JavaScript

[jaoo] (7) ʎ jruby -S gem install glassfish

GlassFishModular application server

Full support for JEE 5

Monitoring etc

Support for several alt JVM languages

Ruby, PHP, JavaScript

[jaoo] (7) ʎ jruby -S gem install glassfish

Size of glassfish-0.2.0-universal-java.gem: 2870784 bytes

DemoGlassFish gem

Jetty-Rails

Jetty-RailsNew project by Fabio Kung

Jetty-RailsNew project by Fabio Kung

Works with Warbler configuration

Jetty-RailsNew project by Fabio Kung

Works with Warbler configuration

Similar to the GlassFish gem, but more light weight

Jetty-RailsNew project by Fabio Kung

Works with Warbler configuration

Similar to the GlassFish gem, but more light weight

For development phase of Warbler enabled project

JNDI

JNDIIn production

JNDIIn production

Fall back on regular database configuration

JNDIIn production

Fall back on regular database configuration

Add:

JNDIIn production

Fall back on regular database configuration

Add:jndi: jdbc/yourapp_production

To your database.yml

JNDIIn production

Fall back on regular database configuration

Add:jndi: jdbc/yourapp_production

To your database.yml

Get:

JNDIIn production

Fall back on regular database configuration

Add:jndi: jdbc/yourapp_production

To your database.yml

Get:

Manageability

JNDIIn production

Fall back on regular database configuration

Add:jndi: jdbc/yourapp_production

To your database.yml

Get:

Manageability

Securability

JNDIIn production

Fall back on regular database configuration

Add:jndi: jdbc/yourapp_production

To your database.yml

Get:

Manageability

Securability

Poolability

JNDIIn production

Fall back on regular database configuration

Add:jndi: jdbc/yourapp_production

To your database.yml

Get:

Manageability

Securability

Poolability

Deployment

DeploymentTraditional approach

DeploymentTraditional approach

Pack of Mongrels

DeploymentTraditional approach

Pack of Mongrels

N mongrels for N concurrent requests

DeploymentTraditional approach

Pack of Mongrels

N mongrels for N concurrent requests

Deployed with Capistrano

DeploymentTraditional approach

Pack of Mongrels

N mongrels for N concurrent requests

Deployed with Capistrano

Something in front, like Nginx or Apache HTTPd

DeploymentTraditional approach

Pack of Mongrels

N mongrels for N concurrent requests

Deployed with Capistrano

Something in front, like Nginx or Apache HTTPd

Needs monitoring

DeploymentTraditional approach

Pack of Mongrels

N mongrels for N concurrent requests

Deployed with Capistrano

Something in front, like Nginx or Apache HTTPd

Needs monitoring

Monit

DeploymentTraditional approach

Pack of Mongrels

N mongrels for N concurrent requests

Deployed with Capistrano

Something in front, like Nginx or Apache HTTPd

Needs monitoring

Monit

God

DeploymentTraditional approach

Pack of Mongrels

N mongrels for N concurrent requests

Deployed with Capistrano

Something in front, like Nginx or Apache HTTPd

Needs monitoring

Monit

God

Repeat for each application

Deployment: Mongrel

Deployment: MongrelSame approach “works”

Deployment: MongrelSame approach “works”

For some definition of works

Deployment: MongrelSame approach “works”

For some definition of works

Do you want N JVMs?

Deployment: Warbler

Deployment: WarblerInstalls as a gem

Deployment: WarblerInstalls as a gem

JRuby included

Deployment: WarblerInstalls as a gem

JRuby included

And so is a Rails servlet

Deployment: WarblerInstalls as a gem

JRuby included

And so is a Rails servlet

Automates the War configuration

Deployment: WarblerInstalls as a gem

JRuby included

And so is a Rails servlet

Automates the War configuration

[jaoo] (8) ʎ jruby -S gem install warbler

[jaoo] (9) ʎ jruby -S warble pluginize

Deployment: WarblerInstalls as a gem

JRuby included

And so is a Rails servlet

Automates the War configuration

[jaoo] (8) ʎ jruby -S gem install warbler

[jaoo] (9) ʎ jruby -S warble pluginize

[jaoo] (10) ʎ jruby -S rake war

Deployment: WarblerInstalls as a gem

JRuby included

And so is a Rails servlet

Automates the War configuration

[jaoo] (8) ʎ jruby -S gem install warbler

[jaoo] (9) ʎ jruby -S warble pluginize

[jaoo] (10) ʎ jruby -S rake war

Other things

smörgåsbord

Ribs

RibsNot finished yet

RibsNot finished yet

Uses real Hibernate under the covers

RibsNot finished yet

Uses real Hibernate under the covers

AR like interface (not compatible, just inspired by AR)

RibsNot finished yet

Uses real Hibernate under the covers

AR like interface (not compatible, just inspired by AR)

Can use existing Hibernate mappings and Java domains

RibsNot finished yet

Uses real Hibernate under the covers

AR like interface (not compatible, just inspired by AR)

Can use existing Hibernate mappings and Java domains

Alternative to ActiveRecord

RibsNot finished yet

Uses real Hibernate under the covers

AR like interface (not compatible, just inspired by AR)

Can use existing Hibernate mappings and Java domains

Alternative to ActiveRecord

Version 0.0.2 out now

RibsNot finished yet

Uses real Hibernate under the covers

AR like interface (not compatible, just inspired by AR)

Can use existing Hibernate mappings and Java domains

Alternative to ActiveRecord

Version 0.0.2 out now

RepositoryUnit of WorkIdentity MapActive RecordData Mapper

# define a model (not needed at all when following conventions)class Project Ribs! :table => "PROJECTS" do |r| r.id :primary_key, :column => :PROJECT_ID endend

# createproject = R(Project).create(:name => "JRuby", :complexity => 10)project_id = project.id

# queryall_projects = R(Project).alljruby_project = R(Project).get(project_id)

# updatejruby_project.complexity = 37R(jruby_project).save

# destroyR(jruby_project).destroy!

Merb

MerbJRuby runs Merb

MerbJRuby runs Merb

JRuby-rack is the preferred solution

MerbJRuby runs Merb

JRuby-rack is the preferred solution

Should Just Work (TM)

JDBC

JDBCCan be used directly from JRuby

JDBCCan be used directly from JRuby

There is a DBI driver

JDBCCan be used directly from JRuby

There is a DBI driver

DataMapper driver on the way

JDBCCan be used directly from JRuby

There is a DBI driver

DataMapper driver on the way

And of course, AR-JDBC

JDBCCan be used directly from JRuby

There is a DBI driver

DataMapper driver on the way

And of course, AR-JDBC

JNDI

JDBCCan be used directly from JRuby

There is a DBI driver

DataMapper driver on the way

And of course, AR-JDBC

JNDI

Connection pools

JDBCCan be used directly from JRuby

There is a DBI driver

DataMapper driver on the way

And of course, AR-JDBC

JNDI

Connection pools

Prepared statements

Ever installed RMagick?

Java2D

Java2DJava2D is available everywhere. And works the same.

Java2DJava2D is available everywhere. And works the same.

ImageVoodoo

Java2DJava2D is available everywhere. And works the same.

ImageVoodoo

Compatible with ImageScience

Java2DJava2D is available everywhere. And works the same.

ImageVoodoo

Compatible with ImageScience

Works with attachment_fu and others

JRuby internalsJRuby::ast_for("1+1") #=> Java AST

JRuby::ast_for { 1+1 } #=> Java AST

JRuby::compile("1+1") #=> CompiledScript

CompiledScript.inspect_bytecode

JRuby::runtime

JRuby::reference("str")

... evil stuff

a = "foobar"a.freezeJRuby::reference(a).set_frozen(false)

class Foobar; endsomething = Object.newJRuby::reference(something).set_meta_class(Foobar)

class Foobar; endJRuby::reference(Foobar).get_methods

JtestR

JtestRTest Java code with Ruby

JtestRTest Java code with Ruby

Includes

JtestRTest Java code with Ruby

Includes

RSpec (and story support)

JtestRTest Java code with Ruby

Includes

RSpec (and story support)

Test::Unit

JtestRTest Java code with Ruby

Includes

RSpec (and story support)

Test::Unit

dust

JtestRTest Java code with Ruby

Includes

RSpec (and story support)

Test::Unit

dust

Mocha

JtestRTest Java code with Ruby

Includes

RSpec (and story support)

Test::Unit

dust

Mocha

Expectations

JtestRTest Java code with Ruby

Includes

RSpec (and story support)

Test::Unit

dust

Mocha

Expectations

Ant, JUnit and Maven 2 integration

JtestRTest Java code with Ruby

Includes

RSpec (and story support)

Test::Unit

dust

Mocha

Expectations

Ant, JUnit and Maven 2 integration

0.3.1 is current version

DemoTesting with JtestR

Rubiq

RubiqLisp layer on top of JRuby

RubiqLisp layer on top of JRuby

Transforms to JRuby AST

RubiqLisp layer on top of JRuby

Transforms to JRuby AST

... and lets JRuby execute it

RubiqLisp layer on top of JRuby

Transforms to JRuby AST

... and lets JRuby execute it

Macros

RubiqLisp layer on top of JRuby

Transforms to JRuby AST

... and lets JRuby execute it

Macros

Read macros (used to implement regexp syntax, for example)

RubiqLisp layer on top of JRuby

Transforms to JRuby AST

... and lets JRuby execute it

Macros

Read macros (used to implement regexp syntax, for example)

Pure lexical scoping

RubiqLisp layer on top of JRuby

Transforms to JRuby AST

... and lets JRuby execute it

Macros

Read macros (used to implement regexp syntax, for example)

Pure lexical scoping

Lambdas transparently transforms to blocks or Proc.new

Ruvlets

RuvletsExpose Servlets as Ruby API

RuvletsExpose Servlets as Ruby API

Because we can!

RuvletsExpose Servlets as Ruby API

Because we can!

People keep asking for this....really!

RuvletsExpose Servlets as Ruby API

Because we can!

People keep asking for this....really!

Expose highly tuned web-infrastructure to Ruby

RuvletsExpose Servlets as Ruby API

Because we can!

People keep asking for this....really!

Expose highly tuned web-infrastructure to Ruby

Similar in L&F to Camping

RuvletsExpose Servlets as Ruby API

Because we can!

People keep asking for this....really!

Expose highly tuned web-infrastructure to Ruby

Similar in L&F to Camping

How it works:

RuvletsExpose Servlets as Ruby API

Because we can!

People keep asking for this....really!

Expose highly tuned web-infrastructure to Ruby

Similar in L&F to Camping

How it works:

Evaluates file from load path based on URL

RuvletsExpose Servlets as Ruby API

Because we can!

People keep asking for this....really!

Expose highly tuned web-infrastructure to Ruby

Similar in L&F to Camping

How it works:

Evaluates file from load path based on URL

File returns an object with a 'service' method defined

RuvletsExpose Servlets as Ruby API

Because we can!

People keep asking for this....really!

Expose highly tuned web-infrastructure to Ruby

Similar in L&F to Camping

How it works:

Evaluates file from load path based on URL

File returns an object with a 'service' method defined

Object cached for all future requests

Bare bones Ruvlet

class HelloWorld def service(context, request, response) response.content_type = "text/html" response.writer << <<-EOF <html> <head><title>Hello World!</title></head> <body>Hello World!</body> </html> EOF endend

HelloWorld.new

Swing

SwingSwing API == large and complex

SwingSwing API == large and complex

Ruby magic simplifies most of the tricky bits

SwingSwing API == large and complex

Ruby magic simplifies most of the tricky bits

Java is a very verbose language

SwingSwing API == large and complex

Ruby magic simplifies most of the tricky bits

Java is a very verbose language

Ruby makes Swing fun (more fun at least)

SwingSwing API == large and complex

Ruby magic simplifies most of the tricky bits

Java is a very verbose language

Ruby makes Swing fun (more fun at least)

No consistent cross-platform GUI library for Ruby

SwingSwing API == large and complex

Ruby magic simplifies most of the tricky bits

Java is a very verbose language

Ruby makes Swing fun (more fun at least)

No consistent cross-platform GUI library for Ruby

Swing works everywhere Java does

Swing - the direct approachimport javax.swing.JFrameimport javax.swing.JButton

frame = JFrame.new("Swing is easy now!")frame.set_size 300, 300frame.always_on_top = true

button = JButton.new("Press me!")button.add_action_listener do |evt| evt.source.text = "Don't press me again!" evt.source.enabled = falseend

frame.add(button)frame.show

Swing - Cheri (builder)include Cheri::Swing

frame = swing.frame("Swing builders!") { |form| size 300, 300 box_layout form, :Y_AXIS content_pane { background :WHITE }

button("Event binding is nice") { |btn| on_click { btn.text = "You clicked me!" } }}

frame.visible = true

Swing - Profligacyclass ProfligacyDemo import javax.swing.* include Profligacy

def initialize layout = "[<translate][*input][>result]" @ui = Swing::LEL.new(JFrame, layout) {|cmps, ints| cmps.translate = JButton.new("Translate") cmps.input = JTextField.new cmps.result = JLabel.new

translator = proc {|id, evt| original = @ui.input.text translation = MyTranslator.translate(original) @ui.result.text = translation }

ints.translate = {:action => translator} } endend

Swing - MonkeyBars (tools)

Swing - MonkeyBars (tools)GUI editor friendly (e.g. NetBeans “Matisse”)

Swing - MonkeyBars (tools)GUI editor friendly (e.g. NetBeans “Matisse”)

Simple Ruby MVC based API

Swing - MonkeyBars (tools)GUI editor friendly (e.g. NetBeans “Matisse”)

Simple Ruby MVC based API

Combines best of both worlds

real world

Is anyone using it?

Is anyone using it?Mingle (ThoughtWorks)

Is anyone using it?Mingle (ThoughtWorks)

Mix (Oracle)

Is anyone using it?Mingle (ThoughtWorks)

Mix (Oracle)

MediaCast (Sun)

Is anyone using it?Mingle (ThoughtWorks)

Mix (Oracle)

MediaCast (Sun)

Kenai (Sun)

Is anyone using it?Mingle (ThoughtWorks)

Mix (Oracle)

MediaCast (Sun)

Kenai (Sun)

Sonar (Open Source, Hortis)

Monitoring

Performance

PerformanceHard question of course

PerformanceHard question of course

Most benchmarks and apps are 2-3x faster than MRI

PerformanceHard question of course

Most benchmarks and apps are 2-3x faster than MRI

Rails is on par

PerformanceHard question of course

Most benchmarks and apps are 2-3x faster than MRI

Rails is on par

We are working on this

0!

15!

30!

45!

60!

75!

5! 10! 15! 20! 25! 30! 35! 40! 45! 50! 55! 60! 65! 70! 75! 80! 85! 90! 95! 100!

avg

rep

ly r

ate!

request rate!

Request Scaling (1 process or runtime)!

webrick (mri)! mongrel (mri)! glassfish (jruby)!

0!

50!

100!

150!

200!

250!1

5!

30!

45!

60!

75!

90!

10

5!

12

0!

13

5!

15

0!

16

5!

18

0!

19

5!

21

0!

22

5!

24

0!

25

5!

27

0!

28

5!

30

0!

Avg

rep

ly r

ate!

Request rate!

JRuby/Glassfish!

1 runtime (interpolated above 90)! 3 runtimes!

the future

YARV and Rubinius

YARV and RubiniusYARV

YARV and RubiniusYARV

2.0 Compatibility

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

Simple compiler

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

Simple compiler

Might give interpreted performance improvement

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

Simple compiler

Might give interpreted performance improvement

Rubinius

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

Simple compiler

Might give interpreted performance improvement

Rubinius

Simple machine

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

Simple compiler

Might give interpreted performance improvement

Rubinius

Simple machine

Quite outdated at the moment

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

Simple compiler

Might give interpreted performance improvement

Rubinius

Simple machine

Quite outdated at the moment

Will be redone after Rubinius C++ engine finished

YARV and RubiniusYARV

2.0 Compatibility

Simple machine

Simple compiler

Might give interpreted performance improvement

Rubinius

Simple machine

Quite outdated at the moment

Will be redone after Rubinius C++ engine finished

Why do it? Why not?

JSR292 and the DaVinci machine

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

Anonymous classes

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

Anonymous classes

Faster reflection, escape analysis

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

Anonymous classes

Faster reflection, escape analysis

Interface injection

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

Anonymous classes

Faster reflection, escape analysis

Interface injection

Continuations

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

Anonymous classes

Faster reflection, escape analysis

Interface injection

Continuations

Value objects (Lisp fixnums)

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

Anonymous classes

Faster reflection, escape analysis

Interface injection

Continuations

Value objects (Lisp fixnums)

Tuple types

JSR292 and the DaVinci machineDynamic invocation: non-java call sites

Method handles

Anonymous classes

Faster reflection, escape analysis

Interface injection

Continuations

Value objects (Lisp fixnums)

Tuple types

Tail calls

JRuby future

JRuby futureInterpreter

JRuby futureInterpreter

Java Integration

JRuby futureInterpreter

Java Integration

Ahead-of-time compilation

JRuby futureInterpreter

Java Integration

Ahead-of-time compilation

More library integration

Q&AAQ and

top related