rails on jruby

18
JRuby & Rails Jumping tracks with minimal pain

Upload: rob-c

Post on 16-May-2015

1.142 views

Category:

Technology


0 download

DESCRIPTION

A presentation I delivered to the Melbourne Ruby User's Group on some of the things Rails developers need to be aware of when getting a Rails application running on top of JRuby.

TRANSCRIPT

Page 1: Rails on JRuby

JRuby & RailsJumping tracks with minimal pain

Page 2: Rails on JRuby

Contents

• JRuby & Rails

• Why?

• Things to Watch

• Databases

• Servers & Deployment

• Beyond Rails with JRuby

Page 3: Rails on JRuby

Why Rails on JRuby?

Page 4: Rails on JRuby

Why?

• Easier deployments

• Potential scalability

Page 5: Rails on JRuby

Warning Signs?

Page 6: Rails on JRuby

Danger!

• Relying upon Native Code

• Gems

• Standard Library

Page 7: Rails on JRuby

Databases

• Pure Ruby Drivers

• Slow(er)

• Most Compatible

Page 8: Rails on JRuby

ActiveRecord-JDBC

• JDBC: Java’s Native Database Protocol

• More Databases Supported

• Faster

• Odd compatibility issues?

Page 9: Rails on JRuby

Database Config Demo

Page 10: Rails on JRuby

Deployment

• Deploying to Mongrels/etc. = JRuby 1.0

• Deploying to Java = Preferred JRuby 1.1+

Page 11: Rails on JRuby

Serving from Java

• Packaging your application

• Getting it to the server

Page 12: Rails on JRuby

Packaging with Warbler

• Packaging your Rails app for Java Servers

• Resultant artefact is a deployable Application

Page 13: Rails on JRuby

Warbler Config Demo

Page 14: Rails on JRuby

Java on Development

• script/server still works

• jetty_rails

• glassfish_rails

Page 15: Rails on JRuby

Moving to Production

• Java 5 (or higher) is the key!

Page 16: Rails on JRuby

Beyond Rails?

• Calling Rails from a Java webapp?

• Use Merb? Camping?

Page 17: Rails on JRuby

Beyond Rails?

• Rack support!

Page 18: Rails on JRuby

Links

• JRuby

• http://www.jruby.org

• http://wiki.jruby.org

• JRuby Inside: http://www.jrubyinside.com

• Nick Sieger: http://blog.nicksieger.com/