Your SlideShare is downloading. ×
0
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 Ru...
• Solid performance (~Ruby 1.9)
  • Startup is poor, execution usually better than 1.9
• Runs native threads
• Foreign Fun...
Ruby Frameworks on GlassFish
GlassFish v3 Architecture

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

    ...
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/arungup...
jruby -S glassfish -h

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

                              Com...
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
        ...
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/apach...
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
 • ...
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 ?
   • expor...
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
GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?
Upcoming SlideShare
Loading in...5
×

GlassFish can support multiple Ruby frameworks ... really ?

2,685

Published on

"GlassFish can support multiple Ruby frameworks ... really ?" preso at Ruby Conf India 2010

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,685
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
23
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "GlassFish can support multiple Ruby frameworks ... really ?"

  1. 1. GlassFish can support multiple Ruby frameworks ... really ? Arun Gupta, Oracle Corp blogs.sun.com/arungupta, @arungupta
  2. 2. What is GlassFish ?
  3. 3. What is GlassFish ?
  4. 4. GlassFish: It's a Community!
  5. 5. GlassFish: Lives on java.net Since 2005
  6. 6. GlassFish: Reference Implementation
  7. 7. GlassFish v3
  8. 8. 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%)
  9. 9. • 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!
  10. 10. Ruby Frameworks on GlassFish
  11. 11. 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
  12. 12. Why Ruby on GlassFish ? - Agile
  13. 13. Why ? - Easy prototyping, yet powerful
  14. 14. Why ? - Best of both worlds
  15. 15. Why ? - Database Connection Pooling
  16. 16. Why ? - Management
  17. 17. Why ? - Monitoring
  18. 18. Rails Deployment choices Directory, WAR, Gem
  19. 19. 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
  20. 20. 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)
  21. 21. asadmin start-domain asadmin deploy --property "jruby.home=JRUBY_HOME" helloworld Complete Absolute Path
  22. 22. http://wiki.glassf sh.java.net/Wiki.jsp?page=GlassFishV3CapistranoRecipes i
  23. 23. jruby -S gem install warbler jruby -S warble http://blogs.sun.com/arungupta/entry/totd_73_jruby_and_glassf sh i
  24. 24. WAR Deployment: Packaging
  25. 25. http://blogs.sun.com/arungupta/entry/totd_80_sinatra_crud_application
  26. 26. Any Rack-based framework ... http://weblogs.java.net/blog/vivekp/archive/2009/04/plugin_any_ruby.html
  27. 27. 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
  28. 28. NetBeans: Develop with Pleasure http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug
  29. 29. 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, ...
  30. 30. jConsole http://blogs.sun.com/arungupta/tags/rubyonrails+jmx
  31. 31. Who loves Ruby on GlassFish ?
  32. 32. 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
  33. 33. Resources • glassfish.org • blogs.sun.com/theaquarium • glassfish-scripting.dev.java.net • @glassfish
  34. 34. GlassFish can support multiple Ruby frameworks ... really ? Arun Gupta, Oracle Corp blogs.sun.com/arungupta, @arungupta
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×