It's Ruby...It's Java...No, it's JRuby
Upcoming SlideShare
Loading in...5
×
 

It's Ruby...It's Java...No, it's JRuby

on

  • 2,107 views

This is the slide of the JRuby topic in Kungfu Rails 2009, Shanghai, China.

This is the slide of the JRuby topic in Kungfu Rails 2009, Shanghai, China.
It's about how to deploy rails app to Java application servers.

Statistics

Views

Total Views
2,107
Views on SlideShare
2,107
Embed Views
0

Actions

Likes
0
Downloads
14
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

It's Ruby...It's Java...No, it's JRuby It's Ruby...It's Java...No, it's JRuby Presentation Transcript

  • DigitalSonic Oct. 2009 It’s a Bird… It’s a Plane… No, it’s Superman
  • How many Rails developers have Java knowledge?
    • The Best of JVM
    • It’s Just Ruby
    • Platform Independent
  • Have a Try
    • Download the latest JRuby distribution
    • Unpack
    • Add the bin path to $PATH or %PATH%
    • Test it
      • jruby –v
      • jirb
      • jirb_swing
  • Ruby => JRuby
    • ruby  jruby
    • C backend libraries  Java backend libraries
    • gem  jruby –S gem
    • rake  jruby –S rake
    • rails  jruby –S rails
  • Ruby on Rails => JRuby on Rails adapter: mysql mongrel RMagick … adapter: jdbcmysql mongrel -jruby RMagick 4J …
  • Both Rails and Java EE projects are running in the same Java AS?
  • Warbler
    • Warbler is a gem that makes a .war file out of a Rails, Merb, or Rack-based application.
    http://kenai.com/projects/warbler
  • Rails in Java AS
    • Tomcat
    • Jetty (jetty-rails)
    • Glassfish v2 / v3 (gem)
    • JBoss (JBoss-Rails)
  • Rails in Java AS (cont.)
    • Larger JVM Memory Size
    • Server JVM
    • Latest JDK
    • Sun JDK / BEA JRockit ?
    • Connection Pool
    • Load-Balance
  • Showcase: Blog
    • Getting Started with Rails
      • http://guides.rubyonrails.org/getting_started.html
    • Step by Step
      • jruby -S rails blog
      • Modify database settings
      • jruby -S warble config
      • Modify config/warble.rb
      • jruby -S warble war
      • Deploy into Tomcat
  • Showcase: Blog (cont.)
  • Showcase: Monitor
    • Tomcat Monitor Tools
      • PSI Probe (Lambda Probe)
      • Hyperic HQ
    • VM Monitor Tools
      • JConsole
      • VisualVM
      • JRockit Mission Control
  • Showcase: Monitor (cont.)
  • Showcase: Monitor (cont.)
  • Showcase: Simple Tuning
    • VM
      • -Xmx768m -Xms768m -Xmn256m -XX:MaxPermSize=128m -XX:PermSize=128m
    • Tomcat Connector
      • maxThreads="1024" minSpareThreads="32" maxSpareThreads="128" enableLookups="false"
    • JNDI Connection Pool
    • For my laptop only, not for production environment
    • Some parameters are set without measurement
  • Showcase: Simple Tuning (cont.) Ubuntu 8.10, kernel 2.6.27-14-generic JDK 1.6.0 Update 10 JRuby 1.3.1 Apache Tomcat 6.0.20 Mongrel 1.1.5 rails 2.2.2 activerecord-jdbc-adapter 0.9.2 jdbc-mysql 5.0.4 warbler 0.9.14
  • Reference
    • http://jruby.org
    • http://rubyonrails.org/
    • http://kenai.com/projects/jruby/
    • Practical JRuby on Rails Web 2.0 Projects
    • JRuby Cookbook
  • Q & A
  •