J Ruby Kungfu Rails

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    J Ruby Kungfu Rails - Presentation Transcript

    1. It’s a Bird… It’s a Plane… DigitalSonic No, it’s Superman Oct. 2009
    2. How many Rails developers have Java knowledge?
    3. • The Best of JVM • It’s Just Ruby • Platform Independent
    4. Have a Try • Download the latest JRuby distribution • Unpack • Add the bin path to $PATH or %PATH% • Test it jruby –v jirb jirb_swing
    5. Ruby => JRuby • ruby  jruby • C backend libraries  Java backend libraries • … • gem  jruby –S gem • rake  jruby –S rake • rails  jruby –S rails
    6. Ruby on Rails => JRuby on Rails adapter: mysql mongrel RMagick … adapter: jdbcmysql mongrel-jruby RMagick4J …
    7. Both Rails and Java EE projects are running in the same Java AS?
    8. Warbler • Warbler is a gem that makes a .war file out of a Rails, Merb, or Rack-based application. http://kenai.com/projects/warbler
    9. Rails in Java AS • Tomcat • Jetty (jetty-rails) • Glassfish v2 / v3 (gem) • JBoss (JBoss-Rails) • …
    10. Rails in Java AS (cont.) • Connection Pool • Load-Balance • Larger JVM Memory Size • Server JVM • Latest JDK • Sun JDK / BEA JRockit ?
    11. 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
    12. Showcase: Blog (cont.)
    13. Showcase: Monitor • Tomcat Monitor Tools PSI Probe (Lambda Probe) Hyperic HQ • VM Monitor Tools JConsole VisualVM JRockit Mission Control
    14. Showcase: Monitor (cont.)
    15. Showcase: Monitor (cont.)
    16. 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
    17. Showcase: Simple Tuning (cont.) Time Taken For Tests (s) 200 185.817 180 160 rails 2.2.2 140 activerecord-jdbc-adapter 0.9.2 120 106.742 100 jdbc-mysql 5.0.4 80 64.735 warbler 0.9.14 60 40 18.561 12.367 6.748 20 0 Mongrel Tomcat Tomcat-Optimized ab -n 100 -c 10 (ms) Total n100 c10 Total n1000 c100 2500 2396 2000 1784 1805 Ubuntu 8.10, kernel 2.6.27-14-generic 1500 JDK 1.6.0 Update 10 1202 JRuby 1.3.1 1000 786 641 Apache Tomcat 6.0.20 500 266 Mongrel 1.1.5 241 142 0 Min Avg Max Mongrel Tomcat Tomcat-Optimized
    18. Reference • http://jruby.org • http://rubyonrails.org/ • http://kenai.com/projects/jruby/ • Practical JRuby on Rails Web 2.0 Projects • JRuby Cookbook
    19. Q&A

    + lgn21stlgn21st, 2 months ago

    custom

    347 views, 1 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 347
      • 347 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 23
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags