jruby at linkedin

Post on 05-Dec-2014

1.857 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

Recruiting Solutions professional hacking

JRuby at LinkedIn

Baq Haidri | @baqhaidriWednesday, August 3rd 2011

in three acts

professional hacking

Me

• Generalist• Background in Java, not Ruby

2

• 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

professional hacking

Act I: The Data

4

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

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

professional hacking 7

Rails Prototype

professional hacking

Act II: The Challenge

8

professional hacking 9

oldemort

professional hacking 10

Service  Call

Unified  URL  genera5on

Interna5onaliza5onQui  a  consulté  votre  profil?

Security,  Auth,  Iden5tyNaviga5on  Bar

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

professional hacking 12

Hello from JRuby!

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:

professional hacking

Ruby’s simplicity

14

Some Ruby wrappers were created to mimic Java APIs but Ruby made them more expressive:

professional hacking

Act III: To Production

15

professional hacking 16

huh?

#winning!

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

professional hacking

Gotchas

18

source:  LinkedIn  internal  performance  graph

Unpack wars on deployment Watch out for PermGen usage:

Leak! Restart

Fixed

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

professional hacking

Performance

Internal latency is averaging 700ms

20

Time  spent  in  Ruby<=  ~50  ms  

source:  LinkedIn  internal  performance  graph

professional hacking

Conclusion

21

professional hacking

Happily Ever After

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

22

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

professional hacking

Questions?

24

top related