SlideShare a Scribd company logo
JRuby at LinkedIn
                                   in three acts




Baq Haidri | @baqhaidri
Wednesday, August 3rd 2011

           Recruiting Solutions
            professional hacking
Me
• Generalist
• Background in Java, not Ruby




     professional hacking        2
100M+
LinkedIn                                                               90


• Over one user added per second
• Mostly Java
                                                                55
• Strong product focus
                                                         32


                                                  17

                                            8
                            2      4


                           2004   2005    2006   2007   2008   2009    2010
                                         LinkedIn Members (Millions)

    professional hacking
Act I: The Data




    professional hacking   4
source:	
  Mathieu	
  Bas/an	
  using	
  Gephi	
  on	
  LinkedIn	
  skill	
  data
            professional hacking                                                    5
professional hacking
source:	
  Mathieu	
  Bas/an	
  using	
  Gephi	
  on	
  LinkedIn	
  skill	
  data   6
Rails Prototype




    professional hacking   7
Act II: The Challenge




    professional hacking   8
oldemort




professional hacking              9
Service	
  Call


                                                      Security,	
  Auth,	
  Iden5ty
            Naviga5on	
  Bar




                                                      Interna5onaliza5on
                                                      Qui	
  a	
  consulté	
  votre	
  profil?
       Unified	
  URL	
  genera5on




professional hacking                                                                            10
Tomcat
                        LinkedIn	
  Spring	
  MVC
                              SiteMesh
Request                           JRuby-­‐Rack

                                       Sinatra
                                          get ‘/hello’ do
                                            erb :layout
                                          end


                                           <html>
                                             <head>
                                               <title>Hi</title>
                                             </head>
                                             <body>
                                                Hello from JRuby!
                                             </body>
                                           </html>
Response




 professional hacking                                               11
Hello from JRuby!




               professional hacking   12
Service Calls
 Pre-existing library for parallel, de-duplicating async
  data operations, loosely based on REST
 Clunky abstractions in Java, but wrapped by Ruby:




      professional hacking                                  13
Ruby’s simplicity
 Some Ruby wrappers were created to mimic Java
  APIs but Ruby made them more expressive:




     professional hacking                         14
Act III: To Production




    professional hacking   15
#winning!




     huh?




professional hacking           16
Deployment
 Ops knows nothing
  ‣ Configuration
  ‣ Deployment
  ‣ Monitoring
 Standard monitoring already available via JMX:
  ‣ Latency
  ‣ Requests/Second
  ‣ Memory and CPU usage


  source:	
  LinkedIn	
  internal	
  performance	
  graph



              professional hacking                          17
Gotchas
      Unpack wars on deployment
      Watch out for PermGen usage:



                                             Leak!        Restart

                                                                    Fixed




source:	
  LinkedIn	
  internal	
  performance	
  graph




                            professional hacking                       18
Flags
 JVM:
 ‣ -XX:PermSize=256m
 ‣ -XX:MaxPermSize=256m
 ‣ -XX:+CMSClassUnloadingEnabled
 JRuby:
 ‣ None, but still use 1.8.7
 ‣ JRuby 1.6.2




     professional hacking          19
Performance
 Internal latency is averaging 700ms

                                                            Time	
  spent	
  in	
  Ruby
                                                            <=	
  ~50	
  ms	
  




  source:	
  LinkedIn	
  internal	
  performance	
  graph



              professional hacking                                                        20
Conclusion




   professional hacking   21
Happily Ever After
 Adoption of JRuby is growing internally
 Open-minded, polyglot culture




      professional hacking                  22
JRubyConf Swag Contest
 Visit linkedin.com/skills/skill/JRuby
 Tweet-share the page
 Be sure to include link back to JRuby Skills page,
  with the #in tag and a #jrubyconf tag.
 First 40 users to tweet will win a prize
 Winners announced at lunch tomorrow




      professional hacking                             23
Questions?




    professional hacking   24

More Related Content

PPT
Desperately seeking a lightweight Perl framework
PDF
New Features of Java7 SE
PPT
Ruby on rails
PDF
Ruby with cucmber
PDF
GlassFish can support multiple Ruby frameworks ... really ?
PDF
Glass fish rubyconf-india-2010-Arun gupta
PDF
Jaoo Michael Neale 09
PDF
State of Developer Tools (WDS09)
Desperately seeking a lightweight Perl framework
New Features of Java7 SE
Ruby on rails
Ruby with cucmber
GlassFish can support multiple Ruby frameworks ... really ?
Glass fish rubyconf-india-2010-Arun gupta
Jaoo Michael Neale 09
State of Developer Tools (WDS09)

Similar to JRuby At LinkedIn (20)

PDF
RMI and CORBA Why both are valuable tools
PDF
Dynamic Languages & Web Frameworks in GlassFish
PDF
Ruby on rails探索
PPTX
Neo4 + Grails
PDF
Monkeybars in the Manor
PDF
JRuby - Programmer's Best Friend on JVM
ODP
Dynamic Languages Web Frameworks Indicthreads 2009
PPTX
Neo4J and Grails
PDF
Real World Technologies
KEY
Euruko 2012 - JRuby
PDF
Adopting Grails - GR8Conf Europe
PDF
GR8Conf 2011: Adopting Grails
KEY
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
PDF
What is new and cool j2se & java
PDF
Log everything!
PPTX
Building robust REST APIs
PDF
Abusing bleeding edge web standards for appsec glory
PDF
Guides To Analyzing WebKit Performance
PDF
Groovy & Grails for Spring/Java developers
PDF
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
RMI and CORBA Why both are valuable tools
Dynamic Languages & Web Frameworks in GlassFish
Ruby on rails探索
Neo4 + Grails
Monkeybars in the Manor
JRuby - Programmer's Best Friend on JVM
Dynamic Languages Web Frameworks Indicthreads 2009
Neo4J and Grails
Real World Technologies
Euruko 2012 - JRuby
Adopting Grails - GR8Conf Europe
GR8Conf 2011: Adopting Grails
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
What is new and cool j2se & java
Log everything!
Building robust REST APIs
Abusing bleeding edge web standards for appsec glory
Guides To Analyzing WebKit Performance
Groovy & Grails for Spring/Java developers
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Machine Learning_overview_presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
A comparative analysis of optical character recognition models for extracting...
PPT
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Spectroscopy.pptx food analysis technology
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Empathic Computing: Creating Shared Understanding
Machine Learning_overview_presentation.pptx
Approach and Philosophy of On baking technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Per capita expenditure prediction using model stacking based on satellite ima...
A comparative analysis of optical character recognition models for extracting...
Teaching material agriculture food technology
Ad

JRuby At LinkedIn

  • 1. JRuby at LinkedIn in three acts Baq Haidri | @baqhaidri Wednesday, August 3rd 2011 Recruiting Solutions professional hacking
  • 2. Me • Generalist • Background in Java, not Ruby professional hacking 2
  • 3. 100M+ LinkedIn 90 • Over one user added per second • Mostly Java 55 • Strong product focus 32 17 8 2 4 2004 2005 2006 2007 2008 2009 2010 LinkedIn Members (Millions) professional hacking
  • 4. Act I: The Data professional hacking 4
  • 5. source:  Mathieu  Bas/an  using  Gephi  on  LinkedIn  skill  data professional hacking 5
  • 6. professional hacking source:  Mathieu  Bas/an  using  Gephi  on  LinkedIn  skill  data 6
  • 7. Rails Prototype professional hacking 7
  • 8. Act II: The Challenge professional hacking 8
  • 10. Service  Call Security,  Auth,  Iden5ty Naviga5on  Bar Interna5onaliza5on Qui  a  consulté  votre  profil? Unified  URL  genera5on professional hacking 10
  • 11. Tomcat LinkedIn  Spring  MVC SiteMesh Request JRuby-­‐Rack Sinatra get ‘/hello’ do erb :layout end <html> <head> <title>Hi</title> </head> <body> Hello from JRuby! </body> </html> Response professional hacking 11
  • 12. Hello from JRuby! professional hacking 12
  • 13. Service Calls  Pre-existing library for parallel, de-duplicating async data operations, loosely based on REST  Clunky abstractions in Java, but wrapped by Ruby: professional hacking 13
  • 14. Ruby’s simplicity  Some Ruby wrappers were created to mimic Java APIs but Ruby made them more expressive: professional hacking 14
  • 15. Act III: To Production professional hacking 15
  • 16. #winning! huh? professional hacking 16
  • 17. Deployment  Ops knows nothing ‣ Configuration ‣ Deployment ‣ Monitoring  Standard monitoring already available via JMX: ‣ Latency ‣ Requests/Second ‣ Memory and CPU usage source:  LinkedIn  internal  performance  graph professional hacking 17
  • 18. Gotchas  Unpack wars on deployment  Watch out for PermGen usage: Leak! Restart Fixed source:  LinkedIn  internal  performance  graph professional hacking 18
  • 19. Flags  JVM: ‣ -XX:PermSize=256m ‣ -XX:MaxPermSize=256m ‣ -XX:+CMSClassUnloadingEnabled  JRuby: ‣ None, but still use 1.8.7 ‣ JRuby 1.6.2 professional hacking 19
  • 20. Performance  Internal latency is averaging 700ms Time  spent  in  Ruby <=  ~50  ms   source:  LinkedIn  internal  performance  graph professional hacking 20
  • 21. Conclusion professional hacking 21
  • 22. Happily Ever After  Adoption of JRuby is growing internally  Open-minded, polyglot culture professional hacking 22
  • 23. JRubyConf Swag Contest  Visit linkedin.com/skills/skill/JRuby  Tweet-share the page  Be sure to include link back to JRuby Skills page, with the #in tag and a #jrubyconf tag.  First 40 users to tweet will win a prize  Winners announced at lunch tomorrow professional hacking 23
  • 24. Questions? professional hacking 24