WHAT IS JRUBY?
... AND WHY I LIKE IT :)
/BalazsVarga @vbalazs
"JRuby is a100% Javaimplementation of the
Ruby programming language. Itis Ruby for the
JVM."
MIXED MODE ENGINE
Interpreter + JRubyJIT
AOT-compiled to Javabytecode
JIT:JustInTimecompile
AOT:Ahead-of-timecompile
JIT ALL THE THINGS (J.A.T.T ©)
JIT:JustInTimecompiler
HOW CAN I USE IT?
rvm installjruby
rbenvinstalljruby-X.Y.Z
$ruby-v
jruby1.7.11(1.9.3p392)2014-02-2486339bbon
JavaHotSpot(T...
HOW ABOUT WEBAPPS?
Embedded servers mostlybased on Jetty, Tomcat, JBoss and
Vertx (ex.: Puma, Trinidad, TourqueBox)
run wi...
PERFORMANCE
JRuby: interpreted or AOTmode
JVM: clientor server mode
JIT:JustInTimecompiler
AOT:Ahead-of-timecompiler
THREADS & CONCURRENCY
THREADS & CONCURRENCY
Rubythread == Javathread == native thread
No GIL
Runtime is threadsafe (exceptsome core classes)
STARTUP TIME
Performance trade-off
DEBUGGING
Itworks :)
C EXTENSIONS, INCOMPATIBILITIES
cannotrun native C extensions
ActiveRecord-JDBC adapter (extension)
FFI ftw
FFI:Foreignfun...
FUTURE - TRUFFLE
experimentalimplementation usingGraaland Truffle
Graalis anew implementation of aJITcompiler in the
OpenJ...
FUTURE DEVELOPMENT
https://github.com/jruby/jruby/wiki/SuccessStories
Sponsors over the years:
Sun Microsystems
ThoughtWor...
SUMMARY
Disadvantages
Slowlyfollows the Rubylang.
Incompatibilitywith C exts
Fewer developer
Advantages
Integration with J...
QUESTIONS?
Upcoming SlideShare
Loading in …5
×

JRuby talk / 26.03.2014 / @vbalazs

1,543 views
1,519 views

Published on

My talk about what is jruby, how it works and why i find it very interesting.
Also it's about how you can try it today, what are the main advantages of using it and what difficulties you can face

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

  • Be the first to like this

No Downloads
Views
Total views
1,543
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JRuby talk / 26.03.2014 / @vbalazs

  1. 1. WHAT IS JRUBY? ... AND WHY I LIKE IT :) /BalazsVarga @vbalazs
  2. 2. "JRuby is a100% Javaimplementation of the Ruby programming language. Itis Ruby for the JVM."
  3. 3. MIXED MODE ENGINE Interpreter + JRubyJIT AOT-compiled to Javabytecode JIT:JustInTimecompile AOT:Ahead-of-timecompile
  4. 4. JIT ALL THE THINGS (J.A.T.T ©) JIT:JustInTimecompiler
  5. 5. HOW CAN I USE IT? rvm installjruby rbenvinstalljruby-X.Y.Z $ruby-v jruby1.7.11(1.9.3p392)2014-02-2486339bbon JavaHotSpot(TM)64-BitServerVM1.8.0-b132+indy[darwin-x86_64] $ruby-e"puts'hello'" hello
  6. 6. HOW ABOUT WEBAPPS? Embedded servers mostlybased on Jetty, Tomcat, JBoss and Vertx (ex.: Puma, Trinidad, TourqueBox) run with the server from the project package in ajavaarchive (jar) and execute as ajavaapp Standard javaservers like Jetty, Tomcat, JBoss, GlassFish, WebLogic Phusion Passenger (>=4.0) :) Differentfeatures and performance butyou can easilyswitch between them.
  7. 7. PERFORMANCE JRuby: interpreted or AOTmode JVM: clientor server mode JIT:JustInTimecompiler AOT:Ahead-of-timecompiler
  8. 8. THREADS & CONCURRENCY
  9. 9. THREADS & CONCURRENCY Rubythread == Javathread == native thread No GIL Runtime is threadsafe (exceptsome core classes)
  10. 10. STARTUP TIME Performance trade-off
  11. 11. DEBUGGING Itworks :)
  12. 12. C EXTENSIONS, INCOMPATIBILITIES cannotrun native C extensions ActiveRecord-JDBC adapter (extension) FFI ftw FFI:Foreignfunctioninterface
  13. 13. FUTURE - TRUFFLE experimentalimplementation usingGraaland Truffle Graalis anew implementation of aJITcompiler in the OpenJDK JVM expose VM functionalityviaJavaAPIs Truffle: AST(AbstractSyntax Tree) interpretingframework SimonyiConference 2014 15 April2014 http://konferencia.simonyi.bme.hu
  14. 14. FUTURE DEVELOPMENT https://github.com/jruby/jruby/wiki/SuccessStories Sponsors over the years: Sun Microsystems ThoughtWorks Engine Yard RedHat(from 2012)
  15. 15. SUMMARY Disadvantages Slowlyfollows the Rubylang. Incompatibilitywith C exts Fewer developer Advantages Integration with Java Performance Brightfuture
  16. 16. QUESTIONS?

×