jruby at linkedin
DESCRIPTION
TRANSCRIPT
![Page 1: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/1.jpg)
Recruiting Solutions professional hacking
JRuby at LinkedIn
Baq Haidri | @baqhaidriWednesday, August 3rd 2011
in three acts
![Page 2: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/2.jpg)
professional hacking
Me
• Generalist• Background in Java, not Ruby
2
![Page 3: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/3.jpg)
• Over one user added per second• Mostly Java• Strong product focus
professional hacking
2 4 8
17
32
55
90
2004 2005 2006 2007 2008 2009 2010
LinkedIn Members (Millions)
100M+ LinkedIn
![Page 4: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/4.jpg)
professional hacking
Act I: The Data
4
![Page 5: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/5.jpg)
professional hacking 5source: Mathieu Bas/an using Gephi on LinkedIn skill data
![Page 6: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/6.jpg)
professional hacking 6source: Mathieu Bas/an using Gephi on LinkedIn skill data
![Page 7: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/7.jpg)
professional hacking 7
Rails Prototype
![Page 8: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/8.jpg)
professional hacking
Act II: The Challenge
8
![Page 9: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/9.jpg)
professional hacking 9
oldemort
![Page 10: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/10.jpg)
professional hacking 10
Service Call
Unified URL genera5on
Interna5onaliza5onQui a consulté votre profil?
Security, Auth, Iden5tyNaviga5on Bar
![Page 11: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/11.jpg)
professional hacking
Tomcat
Request
LinkedIn Spring MVC
JRuby-‐Rack
SiteMesh
Sinatraget ‘/hello’ do
erb :layoutend
<html> <head>
<title>Hi</title></head><body>
Hello from JRuby!</body>
</html> Response
11
![Page 12: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/12.jpg)
professional hacking 12
Hello from JRuby!
![Page 13: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/13.jpg)
professional hacking
Service Calls
13
Pre-existing library for parallel, de-duplicating async data operations, loosely based on REST
Clunky abstractions in Java, but wrapped by Ruby:
![Page 14: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/14.jpg)
professional hacking
Ruby’s simplicity
14
Some Ruby wrappers were created to mimic Java APIs but Ruby made them more expressive:
![Page 15: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/15.jpg)
professional hacking
Act III: To Production
15
![Page 16: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/16.jpg)
professional hacking 16
huh?
#winning!
![Page 17: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/17.jpg)
professional hacking
Deployment
17
source: LinkedIn internal performance graph
Ops knows nothing‣ Configuration‣ Deployment‣Monitoring
Standard monitoring already available via JMX:‣ Latency‣ Requests/Second‣Memory and CPU usage
![Page 18: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/18.jpg)
professional hacking
Gotchas
18
source: LinkedIn internal performance graph
Unpack wars on deployment Watch out for PermGen usage:
Leak! Restart
Fixed
![Page 19: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/19.jpg)
professional hacking
Flags
JVM:‣ -XX:PermSize=256m‣ -XX:MaxPermSize=256m‣ -XX:+CMSClassUnloadingEnabled
JRuby:‣None, but still use 1.8.7‣ JRuby 1.6.2
19
![Page 20: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/20.jpg)
professional hacking
Performance
Internal latency is averaging 700ms
20
Time spent in Ruby<= ~50 ms
source: LinkedIn internal performance graph
![Page 21: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/21.jpg)
professional hacking
Conclusion
21
![Page 22: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/22.jpg)
professional hacking
Happily Ever After
Adoption of JRuby is growing internally Open-minded, polyglot culture
22
![Page 23: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/23.jpg)
professional hacking
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
23
![Page 24: JRuby At LinkedIn](https://reader033.vdocument.in/reader033/viewer/2022051209/548da28eb47959ce0c8b6682/html5/thumbnails/24.jpg)
professional hacking
Questions?
24