• Like
JRuby talk / 26.03.2014 / @vbalazs
Upcoming SlideShare
Loading in...5
×

JRuby talk / 26.03.2014 / @vbalazs

  • 1,049 views
Uploaded on

My talk about what is jruby, how it works and why i find it very interesting. …

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

More in: Technology
  • 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
1,049
On Slideshare
0
From Embeds
0
Number of Embeds
8

Actions

Shares
Downloads
0
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

Transcript

  • 1. WHAT IS JRUBY? ... AND WHY I LIKE IT :) /BalazsVarga @vbalazs
  • 2. "JRuby is a100% Javaimplementation of the Ruby programming language. Itis Ruby for the JVM."
  • 3. MIXED MODE ENGINE Interpreter + JRubyJIT AOT-compiled to Javabytecode JIT:JustInTimecompile AOT:Ahead-of-timecompile
  • 4. JIT ALL THE THINGS (J.A.T.T ©) JIT:JustInTimecompiler
  • 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. 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. PERFORMANCE JRuby: interpreted or AOTmode JVM: clientor server mode JIT:JustInTimecompiler AOT:Ahead-of-timecompiler
  • 8. THREADS & CONCURRENCY
  • 9. THREADS & CONCURRENCY Rubythread == Javathread == native thread No GIL Runtime is threadsafe (exceptsome core classes)
  • 10. STARTUP TIME Performance trade-off
  • 11. DEBUGGING Itworks :)
  • 12. C EXTENSIONS, INCOMPATIBILITIES cannotrun native C extensions ActiveRecord-JDBC adapter (extension) FFI ftw FFI:Foreignfunctioninterface
  • 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. FUTURE DEVELOPMENT https://github.com/jruby/jruby/wiki/SuccessStories Sponsors over the years: Sun Microsystems ThoughtWorks Engine Yard RedHat(from 2012)
  • 15. SUMMARY Disadvantages Slowlyfollows the Rubylang. Incompatibilitywith C exts Fewer developer Advantages Integration with Java Performance Brightfuture
  • 16. QUESTIONS?