What's node.js all about

383 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
383
On SlideShare
0
From Embeds
0
Number of Embeds
23
Actions
Shares
0
Downloads
5
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

What's node.js all about

  1. 1. What Is Node.JS All About @niallohiggins niallo@frozenridge.co
  2. 2. Node Is JavaScript Uses V8 - Fast dynamic JIT (beats Python, Ruby) JavaScript is not the DOM: - First class functions - Lambdas - Closures - Dynamic - Multi-paradigm OO (shallow hierarchies)
  3. 3. Node is Async “When something happens, let me know” - Callbacks - Events - Streams doSomeIO(function(err, result) { console.log(“IO complete: %s”, result) }) foo.on(‘roboDance’, function(ev) { console.log(“robot is dancing”) })
  4. 4. Node is Async Everywhere Async is not new “Async Everywhere” is new Entire stdlib is async Entire module ecosystem is async Compare to Twisted, EventMachine, etc
  5. 5. Node is Async Everywhere Good for I/O with low overhead Good for network software Good for hardware (NodeBots) Can be hard to read and handle errors (opinion) Terrible for CPU (e.g. SSL a weakness)
  6. 6. Node is Systems Glue LibUV is the core of node Cross-platform Async C library Node is JavaScript bindings for libuv: Timers, Filesystem, Network, Processes, etc JavaScript easier to write than C!
  7. 7. Node is Modules Node Package Manager (NPM) Local By Default (unlike Python virtual env) Very easy to use & publish modules Great ecosystem of modules IMHO - Single best thing about Node
  8. 8. Node is Modules Interesting uses of NPM modules: LevelDB Plug new features into your database! level-replicate, map-reduce, jsonquery- engine … VoxelJS Plug new features into your virtual world!
  9. 9. Node is New Lot’s of interesting ideas, experimentation Some great, some not so great Hard to handle errors (hint: use domains!) Hard to debug, monitor (no JMX) Things improving, but keep this in mind...
  10. 10. Node is New Questions about scale / performance? Others have been there: - Voxer talks (debugging, dtrace) - Mozilla blog posts - Walmart Labs - LinkedIn - Many more
  11. 11. Node is Fun! Easy to write, use & share code JavaScript fun once you learn it Lots of interesting ideas Makes front-end browser code fun too
  12. 12. Thanks & Shameless Plug My company FrozenRidge.co helps with JS/Node, MongoDB, DevOps and Continuous Deployment. We make StriderCD.com - Open Source Continuous Deployment Platform in Node.js niallo@frozenridge.co @niallohiggins on Twitter

×