2010/Node.js and you

From Open Source Bridge Wiki
Jump to: navigation, search

Node.js is one of the most exciting things to happen to server-side development in the last few years. Here you’ll find out why Node.js is a perfect fit for your next project and a better fit than existing languages for modern web development.

Speaker: Mikeal Rogers

Return to this session's details

Contributed notes

node.js = v8 js engine + libev (C library inspired by libevent) + libeio + commonjs + HTTP

The community has sidestepped style and language wars by focusing on the platform and on non-blocking operations instead.

Concurrency in other languages

  • Python's print() makes concurrency difficult
  • Block-by-default looks like a transaction, but doesn't provide a transaction's guarantees
  • Event-handling code can have side effects
  • Idle loops are wasteful

Concurrency in node.js

  • Events make I/O-based apps simpler
  • Fewer moving parts

node.js supports both events and callbacks

  • Callbacks are functions passed as the last argument to another function
  • Callbacks defer processing until later
  • Events block on processing while they're being called
  • Events can be used sequentially