Top Banner
Recruiting Solutions professional hacking JRuby at LinkedIn Baq Haidri | @baqhaidri Wednesday, August 3rd 2011 in three acts
24

JRuby At LinkedIn

Dec 05, 2014

Download

Technology

baqhaidri

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: JRuby At LinkedIn

Recruiting Solutions professional hacking

JRuby at LinkedIn

Baq Haidri | @baqhaidriWednesday, August 3rd 2011

in three acts

Page 2: JRuby At LinkedIn

professional hacking

Me

• Generalist• Background in Java, not Ruby

2

Page 3: JRuby At LinkedIn

• 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

professional hacking

Act I: The Data

4

Page 5: JRuby At LinkedIn

professional hacking 5source:  Mathieu  Bas/an  using  Gephi  on  LinkedIn  skill  data

Page 6: JRuby At LinkedIn

professional hacking 6source:  Mathieu  Bas/an  using  Gephi  on  LinkedIn  skill  data

Page 7: JRuby At LinkedIn

professional hacking 7

Rails Prototype

Page 8: JRuby At LinkedIn

professional hacking

Act II: The Challenge

8

Page 9: JRuby At LinkedIn

professional hacking 9

oldemort

Page 10: JRuby At LinkedIn

professional hacking 10

Service  Call

Unified  URL  genera5on

Interna5onaliza5onQui  a  consulté  votre  profil?

Security,  Auth,  Iden5tyNaviga5on  Bar

Page 11: JRuby At LinkedIn

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

professional hacking 12

Hello from JRuby!

Page 13: JRuby At LinkedIn

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

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

professional hacking

Act III: To Production

15

Page 16: JRuby At LinkedIn

professional hacking 16

huh?

#winning!

Page 17: JRuby At LinkedIn

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

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

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

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

professional hacking

Conclusion

21

Page 22: JRuby At LinkedIn

professional hacking

Happily Ever After

Adoption of JRuby is growing internally Open-minded, polyglot culture

22

Page 23: JRuby At LinkedIn

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

professional hacking

Questions?

24