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.

Like this presentation? Why not share!

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,176
On Slideshare
2,176
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
3
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Transcript

  • 1. JRuby The Best of Both Worlds
  • 2. Me • Charles Oliver Nutter • JRuby Architect at Engine Yard • Java developer since 1997 • JRuby developer since 2005 • @headius, headius@headius.com
  • 3. JRuby • Ruby on JVM • Latest release: 1.5.3 • Ruby 1.8.7 compat, 1.9.2 coming • It’s Just Ruby! • (It’s Not Just Ruby!)
  • 4. If you... ...want or need to run on JVM... ...JRuby is the answer!
  • 5. If you... ...need to use a Java library... ...JRuby is the answer!
  • 6. If you... ...want the best GC in the world... ...JRuby is the answer!
  • 7. If you... ...hate dealing with native libraries... ...JRuby is the answer!
  • 8. If you... ...need to develop or deploy on Windows... ...JRuby is the answer!
  • 9. If you... ...need to develop or deploy on zLinux... ...JRuby is the answer!
  • 10. If you... ...need to develop or deploy on AS/400... ...JRuby is the answer!
  • 11. If you... ...need to develop or deploy on OpenVMS... ...JRuby is the answer!
  • 12. If you... ...want to integrate with other languages like Clojure, Scala, Mirah... ...JRuby is the answer!
  • 13. If you... ...want a better Ruby... ...JRuby is the answer!
  • 14. Boring Stuff • Trivial install: unpack, run (only prereq: Java) • Performance is great, ~1.9 • Rails etc run great • Production users since 2007 • Most mature, most stable alternative Ruby
  • 15. Installation • Step 1: unpack JRuby
  • 16. Installation • Java (easy on any platform) • Download, unpack JRuby • Or use rvm, pik, apt-get, yum, etc • Add bin/ to PATH • Done!
  • 17. Cool Stuff • Java/JVM integration • Native threads (real concurrency!) • Tooling and maturity • New frontiers
  • 18. Platform Integration • Use any Java library like it’s a Ruby library • No-compile, single-file deployments • Cross-platform GUI libraries
  • 19. Using a Library
  • 20. Native Threads • Ruby Thread :: Native Thread • Thread.new # real system-level thread • One process can saturate all cores • One Rails instance for a whole site
  • 21. Scaling Rails
  • 22. Tooling and Maturity • Editor/IDE support with bonuses • Debugging tools • Profiling, memory tools • Commercial JVM environments • Richest tools of any Ruby
  • 23. Tools
  • 24. New Frontiers • Google AppEngine • Java or Python only (...or JRuby!) • Android • Java-mostly (...or JRuby!) • Anywhere with a Java server • Deploy like any other application
  • 25. Android
  • 26. New Stuff • C Extensions • Improving Performance • Tighter Java Integration
  • 27. C Extensions • Biggest migration headache • JRuby 1.6: C extension support • Ruby Summer of Code: @timfelgentreff • Not recommended, but... • Good enough for migration
  • 28. Improving Performance • JVM is fast because... • Efficient JIT compiler • Method inlining • JRuby has a JIT, but... • Not super efficient • No inlining
  • 29. Yay JVM! • InvokeDynamic in Java 7 • JVM writers use JRuby as a test case • ...and competing to run JRuby best! • Dynamic optimizations • 3-5x improvement on early experiments
  • 30. Tighter Java Integration • Generating “real” Java classes • `jrubyc --java(c)` • become_java! • Reduced call overhead • Eliminating reflection • Avoiding unnecessary conversions
  • 31. Your Turn • Just try it! • Tell everyone • Let us know what you need
  • 32. JRuby Book!
  • 33. For The Managers • Three fulltime devs at Engine Yard • Support, professional services • And OSS-style IRC/email support • Engine Yard Cloud (soon!) • Well-established, mature, stable
  • 34. Production Users • Oslo Airport refueling terminals • LinkedIn’s “Signal” social aggregator • BankSimple • Oracle Mix, Kenai • Thoughtworks • Github FI (Firewall Install)
  • 35. More? • Madness! • Redcar
  • 36. Thanks! • http://jruby.org • http://wiki.jruby.org • http://bugs.jruby.org • http://engineyard.com/jruby • http://blog.headius.com