Your SlideShare is downloading. ×
  • Like
Going Node At Netflix
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Going Node At Netflix

  • 1,315 views
Published

Slides from my talk "Going Node at Netflix" talk where I talk a bit about how we built a Node.js application at Netflix.

Slides from my talk "Going Node at Netflix" talk where I talk a bit about how we built a Node.js application at Netflix.

Published in Engineering , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • This truly shows the potential that Javascript can bring to the table. At Neev, having worked on diverse JS-based projects, we have realized that Javascript is the technology for the future and needs to be tapped right.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
1,315
On SlideShare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
17
Comments
1
Likes
12

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. Going at
  • 2. About Me Senior UI Engineer At Netflix! ranklam@netflix.com! @bittersweetryan
  • 3. The Rest! 44% Facebook BitTorrent iTunes YouTube! 13% Netflix! 34% Peak Downstream Traffic 1H 2014 https://www.sandvine.com/downloads/general/global-internet-phenomena/2014/1h-2014-global-internet-phenomena-report.pdf
  • 4. "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Stable
  • 5. "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Full Featured
  • 6. "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Needs a diverse crew
  • 7. "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Not very agile
  • 8. "Lewis Hamilton 2014 China Race" by emperornie We want this
  • 9. …but not for the reason you think Modular
  • 10. …but not for the reason you think Lightweight
  • 11. …but not for the reason you think Very Agile
  • 12. Shakti
  • 13. Why Node?
  • 14. UI Engineers Write the JavaScript They Love
  • 15. Node is the New UI Layer Client Node Request Time HTML Post Request HTML Service Calls Client JS Services Build Process
  • 16. The event loop fits our needs well
  • 17. The Node Event Loop http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/ function contextMiddleware( req, res, next ){ var movieId = req.params.movieId || 0; movie.fetch( movieId, function( movieData ){ res.set( { movieData : movieData } ) next(); } ); }
  • 18. The Node Event Loop http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/ function contextMiddleware( req, res, next ){ var movieId = req.params.movieId || 0; movie.fetch( movieId, function( movieData ){ res.set( { movieData : movieData } ) next(); } ); }
  • 19. The Node Event Loop http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/ function contextMiddleware( req, res, next ){ var movieId = req.params.movieId || 0; movie.fetch( movieId, function( movieData ){ res.set( { movieData : movieData } ) next(); } ); }
  • 20. The Node Event Loop http://blog.carbonfive.com/2013/10/27/the-javascript-event-loop-explained/ function contextMiddleware( req, res, next ){ var movieId = req.params.movieId || 0; movie.fetch( movieId, function( movieData ){ res.set( { movieData : movieData } ) next(); } ); }
  • 21. Allowed us to remove many runtime dependencies
  • 22. Shakti was built with a few core principals
  • 23. Embrace the JavaScript Ecosystem.
  • 24. Embrace the JavaScript Ecosystem. express web application framework for node
  • 25. Embrace the JavaScript Ecosystem.
  • 26. Embrace the JavaScript Ecosystem. {dust}
  • 27. Embrace the JavaScript Ecosystem.
  • 28. Use Existing Infrastructure Jasori Lewis
  • 29. Simple API, Reduce Depencencies http://www.launchphotography.com/Discovery_Flight_Deck.html
  • 30. http://www.launchphotography.com/Discovery_Flight_Deck.html Simplify By Removing Dependencies
  • 31. We do have a few unique challenges http://sjmagazine.net/wp-content/uploads/2014/07/NUP_163855_0336.jpg
  • 32. Assets http://www.wired.com/wp-content/uploads/blogs/wiredenterprise/wp-content/uploads/2012/10/ff_googleinfrastructure_large.jpg
  • 33. Templating / i18n http://2.bp.blogspot.com/-4KCTn2jSdU0/TlZFNNwofPI/AAAAAAAAFc0/K0ogqSByYlY/s1600/IMG_5947.JPG
  • 34. Middle Tier Services
  • 35. Build Process http://3.bp.blogspot.com/-o-LcrSq_w1o/T1ywq9G57gI/AAAAAAAACQU/sRYxh6A6fBA/s1600/P1120378.jpg
  • 36. Modules http://www.launchphotography.com/Discovery_Flight_Deck.html commonjs
  • 37. Modules http://www.launchphotography.com/Discovery_Flight_Deck.html es6
  • 38. Modules http://www.launchphotography.com/Discovery_Flight_Deck.html NPM
  • 39. We Learned A Few Things On Our Journey http://i.huffpost.com/gen/951056/thumbs/o-CANADA-LIGHT-BULB-BAN-facebook.jpg
  • 40. Nothing Is Ever Done
  • 41. Engineers are opinionated creative.
  • 42. Automate as many things is you can
  • 43. Allow for diverse inputs, always have predictable outputs
  • 44. function getLocalizedStrings( arrayOrBundle, key, callback ){ if( arrayOrBundle.isArray() ){ return new Promise( function( resolve, reject ){ //return localized object } ); } else if( typeof arrayOrBundle === ‘string’ ){ return new Promise( function( resolve, reject ){ //return localized object } ); } }
  • 45. Keep async API’s async
  • 46. function getLocalizedString( package, key, callback ){ if( this.cache[ package ] && this.cache[ package ][ key ] ){ callback( this.cache[ package ][ key ] ); //not async } else{ this.getString( package, key, callback ); //async call } }
  • 47. function getLocalizedString( package, key, callback ){ if( this.cache[ package ] && this.cache[ package ][ key ] ){ setTimeout( function( ){ callback( this.cache[ package ][ key ] ); }, 0 ); } else{ this.getString( package, key, callback ); } }
  • 48. Questions http://eugenebrandt.files.wordpress.com/2013/09/hands-voting.jpg
  • 49. Thank You! Please stop me in the halls and talk to me about all the cool things Netflix is doing with JavaScript! I love to talk about this stuff! ranklam@netflix.com