Going Node At Netflix
Upcoming SlideShare
Loading in...5
×
 

Going Node At Netflix

on

  • 1,096 views

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.

Statistics

Views

Total Views
1,096
Views on SlideShare
1,071
Embed Views
25

Actions

Likes
10
Downloads
9
Comments
1

4 Embeds 25

https://twitter.com 14
http://www.slideee.com 5
http://www.conferize.com 5
http://feedly.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • 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
    Processing…
Post Comment
Edit your comment

Going Node At Netflix Going Node At Netflix Presentation Transcript

  • Going at
  • About Me Senior UI Engineer At Netflix! ranklam@netflix.com! @bittersweetryan
  • 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 http://image.slidesharecdn.com/presentation-140814095340-phpapp01/95/going-node-at-netflix-3-638.jpg?cb=1408086111
  • "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Stable http://image.slidesharecdn.com/presentation-140814095340-phpapp01/95/going-node-at-netflix-4-638.jpg?cb=1408086111
  • "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Full Featured
  • "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Needs a diverse crew
  • "MS Freedom of the Seas in its maiden voyage" by Andres Manuel Rodriguez - We have this Not very agile
  • "Lewis Hamilton 2014 China Race" by emperornie We want this
  • …but not for the reason you think Modular
  • …but not for the reason you think Lightweight
  • …but not for the reason you think Very Agile
  • Shakti
  • Why Node?
  • UI Engineers Write the JavaScript They Love
  • Node is the New UI Layer Client Node Request Time HTML Post Request HTML Service Calls Client JS Services Build Process
  • The event loop fits our needs well
  • 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(); } ); }
  • 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(); } ); }
  • 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(); } ); }
  • 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(); } ); }
  • Allowed us to remove many runtime dependencies
  • Shakti was built with a few core principals
  • Embrace the JavaScript Ecosystem.
  • Embrace the JavaScript Ecosystem. express web application framework for node
  • Embrace the JavaScript Ecosystem.
  • Embrace the JavaScript Ecosystem. {dust}
  • Embrace the JavaScript Ecosystem.
  • Use Existing Infrastructure Jasori Lewis
  • Simple API, Reduce Depencencies http://www.launchphotography.com/Discovery_Flight_Deck.html
  • http://www.launchphotography.com/Discovery_Flight_Deck.html Simplify By Removing Dependencies
  • We do have a few unique challenges http://sjmagazine.net/wp-content/uploads/2014/07/NUP_163855_0336.jpg
  • Assets http://www.wired.com/wp-content/uploads/blogs/wiredenterprise/wp-content/uploads/2012/10/ff_googleinfrastructure_large.jpg
  • Templating / i18n http://2.bp.blogspot.com/-4KCTn2jSdU0/TlZFNNwofPI/AAAAAAAAFc0/K0ogqSByYlY/s1600/IMG_5947.JPG
  • Middle Tier Services
  • Build Process http://3.bp.blogspot.com/-o-LcrSq_w1o/T1ywq9G57gI/AAAAAAAACQU/sRYxh6A6fBA/s1600/P1120378.jpg
  • Modules http://www.launchphotography.com/Discovery_Flight_Deck.html commonjs
  • Modules http://www.launchphotography.com/Discovery_Flight_Deck.html es6
  • Modules http://www.launchphotography.com/Discovery_Flight_Deck.html NPM
  • We Learned A Few Things On Our Journey http://i.huffpost.com/gen/951056/thumbs/o-CANADA-LIGHT-BULB-BAN-facebook.jpg
  • Nothing Is Ever Done
  • Engineers are opinionated creative.
  • Automate as many things is you can
  • Allow for diverse inputs, always have predictable outputs
  • 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 } ); } }
  • Keep async API’s async
  • 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 } }
  • 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 ); } }
  • Questions http://eugenebrandt.files.wordpress.com/2013/09/hands-voting.jpg
  • 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