SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
It’s a Bird…
It’s a Plane…
                    DigitalSonic
No, it’s Superman     Oct. 2009
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
                  RMagick4J
                  …
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.)
                      • Connection Pool
                      • Load-Balance



             •   Larger JVM Memory Size
             •   Server JVM
             •   Latest JDK
             •   Sun JDK / BEA JRockit ?
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.)
                      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
Reference
• http://jruby.org
• http://rubyonrails.org/
• http://kenai.com/projects/jruby/

• Practical JRuby on Rails Web 2.0 Projects
• JRuby Cookbook
Q&A
J Ruby   Kungfu Rails

Mais conteúdo relacionado

Mais procurados

History and Versions of Java Programming.pdf
History and Versions of Java Programming.pdfHistory and Versions of Java Programming.pdf
History and Versions of Java Programming.pdfJavaTpoint.Com
 
Glass Fish V3 University Amers May2009
Glass Fish V3  University Amers May2009Glass Fish V3  University Amers May2009
Glass Fish V3 University Amers May2009Eugene Bogaart
 
톰캣 #04-환경설정
톰캣 #04-환경설정톰캣 #04-환경설정
톰캣 #04-환경설정GyuSeok Lee
 
TorqueBox - When Java meets Ruby
TorqueBox - When Java meets RubyTorqueBox - When Java meets Ruby
TorqueBox - When Java meets RubyBruno Oliveira
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterFromDual GmbH
 
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto GarcíaOpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto GarcíaOpenNebula Project
 
Salt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaSalt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaDevOpsBangalore
 
PHP Matsuri JIREI NIGHT お知らせメール
PHP Matsuri JIREI NIGHT お知らせメールPHP Matsuri JIREI NIGHT お知らせメール
PHP Matsuri JIREI NIGHT お知らせメールTakahiro Fujiwara
 
Rails Summit - De Volta Ao Básico
Rails Summit - De Volta Ao BásicoRails Summit - De Volta Ao Básico
Rails Summit - De Volta Ao BásicoFabio Akita
 
Torquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosTorquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosBruno Oliveira
 
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.Takatoshi Matsuo
 
Where Does VMware Integration Occur?
Where Does VMware Integration Occur?Where Does VMware Integration Occur?
Where Does VMware Integration Occur?Scott Lowe
 

Mais procurados (14)

History and Versions of Java Programming.pdf
History and Versions of Java Programming.pdfHistory and Versions of Java Programming.pdf
History and Versions of Java Programming.pdf
 
Glass Fish V3 University Amers May2009
Glass Fish V3  University Amers May2009Glass Fish V3  University Amers May2009
Glass Fish V3 University Amers May2009
 
Quickly Debug VM Failures in OpenStack
Quickly Debug VM Failures in OpenStackQuickly Debug VM Failures in OpenStack
Quickly Debug VM Failures in OpenStack
 
톰캣 #04-환경설정
톰캣 #04-환경설정톰캣 #04-환경설정
톰캣 #04-환경설정
 
TorqueBox - When Java meets Ruby
TorqueBox - When Java meets RubyTorqueBox - When Java meets Ruby
TorqueBox - When Java meets Ruby
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera Cluster
 
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto GarcíaOpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
 
Salt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaSalt Stack - Subhankar Sengupta
Salt Stack - Subhankar Sengupta
 
PHP Matsuri JIREI NIGHT お知らせメール
PHP Matsuri JIREI NIGHT お知らせメールPHP Matsuri JIREI NIGHT お知らせメール
PHP Matsuri JIREI NIGHT お知らせメール
 
Rails Summit - De Volta Ao Básico
Rails Summit - De Volta Ao BásicoRails Summit - De Volta Ao Básico
Rails Summit - De Volta Ao Básico
 
Torquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundosTorquebox - O melhor dos dois mundos
Torquebox - O melhor dos dois mundos
 
NoSQL with MySQL
NoSQL with MySQLNoSQL with MySQL
NoSQL with MySQL
 
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
 
Where Does VMware Integration Occur?
Where Does VMware Integration Occur?Where Does VMware Integration Occur?
Where Does VMware Integration Occur?
 

Destaque

Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRubyAmit Solanki
 
Abstraction of JRuby Kaigi2010
Abstraction of  JRuby Kaigi2010Abstraction of  JRuby Kaigi2010
Abstraction of JRuby Kaigi2010Koichiro Ohba
 
Why JRuby? - RubyConf 2012
Why JRuby? - RubyConf 2012Why JRuby? - RubyConf 2012
Why JRuby? - RubyConf 2012Charles Nutter
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRubyajuckel
 
jRuby: The best of both worlds
jRuby: The best of both worldsjRuby: The best of both worlds
jRuby: The best of both worldsChristopher Spring
 
Focuslight, Jobs and OSS - HackGirls bar vol.2
Focuslight, Jobs and OSS - HackGirls bar vol.2Focuslight, Jobs and OSS - HackGirls bar vol.2
Focuslight, Jobs and OSS - HackGirls bar vol.2Koichiro Ohba
 

Destaque (9)

S
SS
S
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
Abstraction of JRuby Kaigi2010
Abstraction of  JRuby Kaigi2010Abstraction of  JRuby Kaigi2010
Abstraction of JRuby Kaigi2010
 
Why JRuby? - RubyConf 2012
Why JRuby? - RubyConf 2012Why JRuby? - RubyConf 2012
Why JRuby? - RubyConf 2012
 
Megyünk a Balcsira?
Megyünk a Balcsira?Megyünk a Balcsira?
Megyünk a Balcsira?
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
Intro to J Ruby
Intro to J RubyIntro to J Ruby
Intro to J Ruby
 
jRuby: The best of both worlds
jRuby: The best of both worldsjRuby: The best of both worlds
jRuby: The best of both worlds
 
Focuslight, Jobs and OSS - HackGirls bar vol.2
Focuslight, Jobs and OSS - HackGirls bar vol.2Focuslight, Jobs and OSS - HackGirls bar vol.2
Focuslight, Jobs and OSS - HackGirls bar vol.2
 

Semelhante a J Ruby Kungfu Rails

Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012Alexandre Morgaut
 
State of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJSState of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJSAlexandre Morgaut
 
State of the art server side java script
State of the art server side java scriptState of the art server side java script
State of the art server side java scriptThibaud Arguillere
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...Alexandre Morgaut
 
State of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJSState of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJSAlexandre Morgaut
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyLeif Hedstrom
 
Collaborate07kmohiuddin
Collaborate07kmohiuddinCollaborate07kmohiuddin
Collaborate07kmohiuddinSal Marcus
 
Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006Sal Marcus
 
Apache Camel K - Fredericia
Apache Camel K - FredericiaApache Camel K - Fredericia
Apache Camel K - FredericiaClaus Ibsen
 
State of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljsState of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljsAlexandre Morgaut
 
Java on Linux for devs and ops
Java on Linux for devs and opsJava on Linux for devs and ops
Java on Linux for devs and opsaragozin
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell Youelliando dias
 
M|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocksM|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocksMariaDB plc
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudArun Gupta
 
State of the art: Server-Side JavaScript (ParisJS)
State of the art: Server-Side JavaScript  (ParisJS)State of the art: Server-Side JavaScript  (ParisJS)
State of the art: Server-Side JavaScript (ParisJS)Alexandre Morgaut
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 

Semelhante a J Ruby Kungfu Rails (20)

Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012State of the art - server side JavaScript - web-5 2012
State of the art - server side JavaScript - web-5 2012
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
State of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJSState of the art: server-side javaScript - NantesJS
State of the art: server-side javaScript - NantesJS
 
State of the art server side java script
State of the art server side java scriptState of the art server side java script
State of the art server side java script
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
 
State of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJSState of the art: Server-side JavaScript - MoscowJS
State of the art: Server-side JavaScript - MoscowJS
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Collaborate07kmohiuddin
Collaborate07kmohiuddinCollaborate07kmohiuddin
Collaborate07kmohiuddin
 
Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006
 
Apache Camel K - Fredericia
Apache Camel K - FredericiaApache Camel K - Fredericia
Apache Camel K - Fredericia
 
State of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljsState of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljs
 
OpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOFOpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOF
 
Java on Linux for devs and ops
Java on Linux for devs and opsJava on Linux for devs and ops
Java on Linux for devs and ops
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell You
 
M|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocksM|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocks
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the Cloud
 
State of the art: Server-Side JavaScript (ParisJS)
State of the art: Server-Side JavaScript  (ParisJS)State of the art: Server-Side JavaScript  (ParisJS)
State of the art: Server-Side JavaScript (ParisJS)
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 

Mais de Daniel Lv

Javascript framework and backbone
Javascript framework and backboneJavascript framework and backbone
Javascript framework and backboneDaniel Lv
 
Intridea & open source
Intridea & open sourceIntridea & open source
Intridea & open sourceDaniel Lv
 
Getting start with titanium
Getting start with titaniumGetting start with titanium
Getting start with titaniumDaniel Lv
 
Better framework, better life
Better framework, better lifeBetter framework, better life
Better framework, better lifeDaniel Lv
 
上海的Rails社区
上海的Rails社区上海的Rails社区
上海的Rails社区Daniel Lv
 
Kungfurails2009
Kungfurails2009Kungfurails2009
Kungfurails2009Daniel Lv
 
Contributing To Rails By Plugin Gem
Contributing To Rails By Plugin GemContributing To Rails By Plugin Gem
Contributing To Rails By Plugin GemDaniel Lv
 
Active Direct
Active DirectActive Direct
Active DirectDaniel Lv
 
岛根县政府的挑战
岛根县政府的挑战岛根县政府的挑战
岛根县政府的挑战Daniel Lv
 

Mais de Daniel Lv (11)

Javascript framework and backbone
Javascript framework and backboneJavascript framework and backbone
Javascript framework and backbone
 
Intridea & open source
Intridea & open sourceIntridea & open source
Intridea & open source
 
Getting start with titanium
Getting start with titaniumGetting start with titanium
Getting start with titanium
 
Better framework, better life
Better framework, better lifeBetter framework, better life
Better framework, better life
 
上海的Rails社区
上海的Rails社区上海的Rails社区
上海的Rails社区
 
Kungfurails2009
Kungfurails2009Kungfurails2009
Kungfurails2009
 
Sinatra
SinatraSinatra
Sinatra
 
Contributing To Rails By Plugin Gem
Contributing To Rails By Plugin GemContributing To Rails By Plugin Gem
Contributing To Rails By Plugin Gem
 
Active Direct
Active DirectActive Direct
Active Direct
 
岛根县政府的挑战
岛根县政府的挑战岛根县政府的挑战
岛根县政府的挑战
 
Why Ruby
Why RubyWhy Ruby
Why Ruby
 

Último

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

J Ruby Kungfu Rails

  • 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
  • 13. Showcase: Monitor • Tomcat Monitor Tools PSI Probe (Lambda Probe) Hyperic HQ • VM Monitor Tools JConsole VisualVM JRockit Mission Control
  • 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