Yahoo! scale Node.js        @Fabian_Frank     <fabian@pagefault.de>     The Yahoo! Axis Team     http://axis.yahoo.com
Challenges• Being able to share code (across  applications)• Dynamic configuration, per environment• Stability and performa...
Code re-use• Different applications (teams), same  problems• Potential side effects, e.g. through  unexpected updates
npm• Package manager for Node.js packages• resolves dependencies automatically• hosts packages in a central registry
Mojito and npm• Every Mojito application can specify its  dependencies in package.json• Mojito probes node_modules/, when ...
Mojito resource• YUI Module• Mojito add-on• Mojit (views, a controller, models)
npm dependencies"dependencies": {    "mojito": "=0.3.26",    "mojito-shaker": "~0.7.5",    "yui": ">=3.5.1"}$ npm shrinkwr...
Internal npm• Only the build system can publish packages• Packages are published only after unit and  functional tests pas...
Dynamic configuration• Change application behavior without  redeployment• JSON is a common way to express  configuration in ...
Configuration through YQL        http://developer.yahoo.com/yql/console/
Node.js 0.6• transparent change for Mojito users• important fixes and improvements in HTTP  and DNS
YUI 3.5• officially supports Node.js• removed jsdom dependency• Y.io uses request as transport layer     http://yuilibrary....
Node.js 0.8
Performancehttp://www.slideshare.net/FabianFrankDe/nodejs-performance-case-study
Performance• Mojito&Manhattan compared to  Apache&PHP• CPU bound• found that Manhattan can serve twice the  amount of requ...
Performance
Stability• Yahoo! Axis is served using Mojito and  Manhattan• Hundreds of requests per second• Static HTML and CSS, dynami...
Building and Maintenance   • Need to know only one language and         framework, no context switches.   • Allows to post...
Conclusion• Mojito works for our computers• Mojito works for us, as engineers
Thank you!• Fabio Hirata, @fabiohh• Caridy Patiño, @caridy• Eugene Kashida, @ekashida• Fabian Frank, @Fabian_Frank
Upcoming SlideShare
Loading in …5
×

Yahoo! scale Node.js

3,204 views
3,091 views

Published on

http://www.youtube.com/watch?v=it9ttbqVSUs

Published in: Technology, Design
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,204
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
31
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • yui abstraction layer\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Yahoo! scale Node.js

    1. 1. Yahoo! scale Node.js @Fabian_Frank <fabian@pagefault.de> The Yahoo! Axis Team http://axis.yahoo.com
    2. 2. Challenges• Being able to share code (across applications)• Dynamic configuration, per environment• Stability and performance
    3. 3. Code re-use• Different applications (teams), same problems• Potential side effects, e.g. through unexpected updates
    4. 4. npm• Package manager for Node.js packages• resolves dependencies automatically• hosts packages in a central registry
    5. 5. Mojito and npm• Every Mojito application can specify its dependencies in package.json• Mojito probes node_modules/, when loading Mojito resources http://developer.yahoo.com/cocktails/mojito/docs/topics/mojito_npm.html
    6. 6. Mojito resource• YUI Module• Mojito add-on• Mojit (views, a controller, models)
    7. 7. npm dependencies"dependencies": { "mojito": "=0.3.26", "mojito-shaker": "~0.7.5", "yui": ">=3.5.1"}$ npm shrinkwrap http://npmjs.org/doc/shrinkwrap.html
    8. 8. Internal npm• Only the build system can publish packages• Packages are published only after unit and functional tests passed• immutable packages
    9. 9. Dynamic configuration• Change application behavior without redeployment• JSON is a common way to express configuration in JavaScript applications• YQL Storage holds JSON http://developer.yahoo.com/yql/guide/yql-cloud-chapter.html
    10. 10. Configuration through YQL http://developer.yahoo.com/yql/console/
    11. 11. Node.js 0.6• transparent change for Mojito users• important fixes and improvements in HTTP and DNS
    12. 12. YUI 3.5• officially supports Node.js• removed jsdom dependency• Y.io uses request as transport layer http://yuilibrary.com/yui/docs/yui/nodejs.html https://github.com/mikeal/request
    13. 13. Node.js 0.8
    14. 14. Performancehttp://www.slideshare.net/FabianFrankDe/nodejs-performance-case-study
    15. 15. Performance• Mojito&Manhattan compared to Apache&PHP• CPU bound• found that Manhattan can serve twice the amount of requests at half the latency
    16. 16. Performance
    17. 17. Stability• Yahoo! Axis is served using Mojito and Manhattan• Hundreds of requests per second• Static HTML and CSS, dynamic pages, API entry points• Monitoring
    18. 18. Building and Maintenance • Need to know only one language and framework, no context switches. • Allows to postpone design decisions • Easier to revert design decisions • Easier deployment and resource allocationhttp://developer.yahoo.com/blogs/ydn/posts/2011/11/yahoo-announces-cocktails-%E2%80%93-shaken-not-stirred/
    19. 19. Conclusion• Mojito works for our computers• Mojito works for us, as engineers
    20. 20. Thank you!• Fabio Hirata, @fabiohh• Caridy Patiño, @caridy• Eugene Kashida, @ekashida• Fabian Frank, @Fabian_Frank

    ×