Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

JRuby talk / 26.03.2014 / @vbalazs

1,892 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
  • Be the first to comment

  • Be the first to like this

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?

×