SlideShare una empresa de Scribd logo
1 de 40
GlassFish can support multiple
Ruby frameworks ... really ?




Arun Gupta, Oracle Corp
blogs.sun.com/arungupta, @arungupta
What is GlassFish ?
What is GlassFish ?
GlassFish: It's a Community!
GlassFish: Lives on java.net




Since 2005
GlassFish: Reference Implementation
GlassFish v3
JRuby

• Ruby interpreter written in Java
• Current Version: 1.4.0
 • 1.5 RC coming soon
• Ruby 1.8.7 compatible
• Some Ruby 1.9 support
 • --1.9 flag (80%)
• Solid performance (~Ruby 1.9)
  • Startup is poor, execution usually better than 1.9
• Runs native threads
• Foreign Function Interface (FFI)for C
 libraries
  • Adopted from Rubinius, CRuby gem
• Runs Rails great!
Ruby Frameworks on GlassFish
GlassFish v3 Architecture

JSF       Grails          ...       Rails       Merb         ...    Django            ...

       Servlet Spec                             Rack                       WSGI

          Web                                 JRuby                      Jython
        Container                            Container                  Container


                                    V3 Kernel

                                     Grizzly

                                      JVM

 Key         GlassFish v3 Modules           Java Framework         Python Framework
              Web Framework
                                            Ruby Framework
              Interface
Why Ruby on GlassFish ? - Agile
Why ? - Easy prototyping, yet powerful
Why ? - Best of both worlds
Why ? - Database Connection Pooling
Why ? - Management
Why ? - Monitoring
Rails Deployment choices
Directory, WAR, Gem
jruby -S gem install glassfish
jruby -S rails helloworld
cd helloworld
jruby -S glassfish



 http://blogs.sun.com/arungupta/entry/totd_70_jruby_and_glassf sh
                                                             i
jruby -S glassfish -h

-c: change the context root
-e: environment
-d: Runs as daemon
-P: location of PID file
-l: log file location
-log-level: Logging level (0-7)
asadmin start-domain
asadmin deploy
   --property "jruby.home=JRUBY_HOME"
   helloworld

                              Complete
                              Absolute
                                Path
http://wiki.glassf sh.java.net/Wiki.jsp?page=GlassFishV3CapistranoRecipes
                 i
jruby -S gem install warbler
jruby -S warble




http://blogs.sun.com/arungupta/entry/totd_73_jruby_and_glassf sh
                                                            i
WAR Deployment: Packaging
http://blogs.sun.com/arungupta/entry/totd_80_sinatra_crud_application
Any Rack-based framework ...




 http://weblogs.java.net/blog/vivekp/archive/2009/04/plugin_any_ruby.html
Deployment Options




   http://blogs.sun.com/arungupta/entry/totd_81_how_to_use
   http://blog.headius.com/2009/04/apache-jruby-rails-glassf sh-easy.html
                                                           i
NetBeans: Develop with Pleasure




 http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug
Ruby Monitoring

• Basic Monitoring
 •   jinfo: System properties and VM CLI flags
 •   jmap: Shared object memory map
 •   jstack: Stack traces of Java threads
 •   jstat: Performance statistics on class, JIT compiler, GC, ...
• Advanced
 • jconsole / Visual VM
 • NewRelic, FiveRuns, ...
jConsole




      http://blogs.sun.com/arungupta/tags/rubyonrails+jmx
Who loves Ruby on GlassFish ?
Turbo charging your JRuby Startup

• “-client” or “-server” ? (Upto 50%)
   • Faster startup or solid runtime ?
   • export JAVA_OPTS=”-client -D32”
   • Upto 50% improvement
• For Linux: Class Data Sharing
• Delay or disable JRuby's JIT (Upto 10%)
   • -X-C
   • jruby.compile.mode=OFF
• Avoid spawning “sub-Rubies”
• Nailgun for small JRuby CLI invocations
• Favorite JVM Flags


 http://blog.headius.com/2010/03/jruby-startup-time-tips.html
Resources

• glassfish.org
• blogs.sun.com/theaquarium
• glassfish-scripting.dev.java.net
• @glassfish
GlassFish can support multiple
Ruby frameworks ... really ?




Arun Gupta, Oracle Corp
blogs.sun.com/arungupta, @arungupta

Más contenido relacionado

La actualidad más candente

Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
Amit Solanki
 
Team RISC nullcon 2012 Jailbreak presentation
Team RISC nullcon 2012 Jailbreak presentationTeam RISC nullcon 2012 Jailbreak presentation
Team RISC nullcon 2012 Jailbreak presentation
Raghu Nath
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
Miroslav Resetar
 
Moving From Plexus To Guice
Moving From Plexus To GuiceMoving From Plexus To Guice
Moving From Plexus To Guice
Stuart McCulloch
 
How to Make Your Code OSGi Friendly Without Depending on OSGi - Neil Bartlett
How to Make Your Code OSGi Friendly Without Depending on OSGi - Neil BartlettHow to Make Your Code OSGi Friendly Without Depending on OSGi - Neil Bartlett
How to Make Your Code OSGi Friendly Without Depending on OSGi - Neil Bartlett
mfrancis
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yong
jbossug
 

La actualidad más candente (20)

Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
MacRuby
MacRubyMacRuby
MacRuby
 
Chennai.rb feb 2016
Chennai.rb   feb 2016Chennai.rb   feb 2016
Chennai.rb feb 2016
 
くみこみからひとことReturns
くみこみからひとことReturnsくみこみからひとことReturns
くみこみからひとことReturns
 
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup ChicagoNode.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
 
Development environment
Development environmentDevelopment environment
Development environment
 
JBoss Snowdrop
JBoss SnowdropJBoss Snowdrop
JBoss Snowdrop
 
Team RISC nullcon 2012 Jailbreak presentation
Team RISC nullcon 2012 Jailbreak presentationTeam RISC nullcon 2012 Jailbreak presentation
Team RISC nullcon 2012 Jailbreak presentation
 
Why Java
Why JavaWhy Java
Why Java
 
Ruby on rails toolbox
Ruby on rails toolboxRuby on rails toolbox
Ruby on rails toolbox
 
Javantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript NashornJavantura 2014 - Java 8 JavaScript Nashorn
Javantura 2014 - Java 8 JavaScript Nashorn
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejs
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manor
 
Scripting with NodeJS
Scripting with NodeJSScripting with NodeJS
Scripting with NodeJS
 
Moving From Plexus To Guice
Moving From Plexus To GuiceMoving From Plexus To Guice
Moving From Plexus To Guice
 
How to Make Your Code OSGi Friendly Without Depending on OSGi - Neil Bartlett
How to Make Your Code OSGi Friendly Without Depending on OSGi - Neil BartlettHow to Make Your Code OSGi Friendly Without Depending on OSGi - Neil Bartlett
How to Make Your Code OSGi Friendly Without Depending on OSGi - Neil Bartlett
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yong
 
Java -lec-1
Java -lec-1Java -lec-1
Java -lec-1
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
 
Distributing OSGi
Distributing OSGiDistributing OSGi
Distributing OSGi
 

Similar a Glass fish rubyconf-india-2010-Arun gupta

Dynamic Languages & Web Frameworks in GlassFish
Dynamic Languages & Web Frameworks in GlassFishDynamic Languages & Web Frameworks in GlassFish
Dynamic Languages & Web Frameworks in GlassFish
IndicThreads
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
railsconf
 
Jruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-javaJruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-java
Keith Bennett
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
Jukka Zitting
 

Similar a Glass fish rubyconf-india-2010-Arun gupta (20)

Dynamic Languages & Web Frameworks in GlassFish
Dynamic Languages & Web Frameworks in GlassFishDynamic Languages & Web Frameworks in GlassFish
Dynamic Languages & Web Frameworks in GlassFish
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
 
Why JRuby? - RubyConf 2012
Why JRuby? - RubyConf 2012Why JRuby? - RubyConf 2012
Why JRuby? - RubyConf 2012
 
Jruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-javaJruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-java
 
Practical JRuby
Practical JRubyPractical JRuby
Practical JRuby
 
Scripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionScripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full Version
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Практики применения JRuby
Практики применения JRubyПрактики применения JRuby
Практики применения JRuby
 
Aloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRubyAloha RubyConf 2012 - JRuby
Aloha RubyConf 2012 - JRuby
 
JFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudJFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the Cloud
 
Euruko 2012 - JRuby
Euruko 2012 - JRubyEuruko 2012 - JRuby
Euruko 2012 - JRuby
 
JRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVMJRuby - Programmer's Best Friend on JVM
JRuby - Programmer's Best Friend on JVM
 
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
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)
 
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
GlassFish and NetBeans: Develop with pleasure, Deploy with Fun for a better R...
 

Más de ThoughtWorks

Construction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesConstruction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific Languages
ThoughtWorks
 
Ruby 124C41+ - Matz
Ruby 124C41+  - MatzRuby 124C41+  - Matz
Ruby 124C41+ - Matz
ThoughtWorks
 
Aman kingrubyoo pnew
Aman kingrubyoo pnew Aman kingrubyoo pnew
Aman kingrubyoo pnew
ThoughtWorks
 

Más de ThoughtWorks (20)

Online and Publishing casestudies
Online and Publishing casestudiesOnline and Publishing casestudies
Online and Publishing casestudies
 
Insurecom Case Study
Insurecom Case StudyInsurecom Case Study
Insurecom Case Study
 
Grameen Case Study
Grameen Case StudyGrameen Case Study
Grameen Case Study
 
BFSI Case Sudies
BFSI Case SudiesBFSI Case Sudies
BFSI Case Sudies
 
Construction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific LanguagesConstruction Techniques For Domain Specific Languages
Construction Techniques For Domain Specific Languages
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in Ruby
 
Concurrency patterns in Ruby
Concurrency patterns in RubyConcurrency patterns in Ruby
Concurrency patterns in Ruby
 
Lets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagiLets build-ruby-app-server: Vineet tyagi
Lets build-ruby-app-server: Vineet tyagi
 
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank... Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices
 
Present and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola biniPresent and Future of Programming Languages - ola bini
Present and Future of Programming Languages - ola bini
 
The ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj KumarThe ruby on rails i18n core api-Neeraj Kumar
The ruby on rails i18n core api-Neeraj Kumar
 
Ruby 124C41+ - Matz
Ruby 124C41+  - MatzRuby 124C41+  - Matz
Ruby 124C41+ - Matz
 
Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. Lim
 
Project Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G SProject Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G S
 
Aman kingrubyoo pnew
Aman kingrubyoo pnew Aman kingrubyoo pnew
Aman kingrubyoo pnew
 
HadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software FrameworkHadoopThe Hadoop Java Software Framework
HadoopThe Hadoop Java Software Framework
 
Bootstrapping iPhone Development
Bootstrapping iPhone DevelopmentBootstrapping iPhone Development
Bootstrapping iPhone Development
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith Ruby
 
Cloud Computing
Cloud  ComputingCloud  Computing
Cloud Computing
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Glass fish rubyconf-india-2010-Arun gupta