Node Roundup: Common Node, Talks,

15 Jun 2011 | By Alex Young | Tags node modules events fibers

Common Node

Common Node (GitHub: olegp / common-node) by Oleg Podsechin uses node-fibers to build CommonJS proposals. This means it’s now possible in many cases to write asynchronous code with synchronous logic.

The CommonJS proposals implemented by Common Node are:

  • assert
  • binary
  • fs
  • httpclient
  • io
  • jsgi
  • system
  • test

This fragment is from the https.js example:

new HttpClient({url: ''}).finish().body

The finish() method calls which uses a fiber:

var req = protocols[uri.protocol].request(options, function(response) {;

As Oleg says in his documentation:

Fibers are used to emulate multi-threading within a single process, allowing one to use a synchronous programming style and as a result. Talks

I saw Ryan Dahl tweeted a link to this huge list of talk slides: A collection of talks and presentations held at 2011.

using libuv and http-parser to build a webserver from ry on Vimeo.

The Understanding V8 talk includes some real JavaScript examples, and Ryan Dahl’s talk is available as a screencast.

Ryan’s talk is about using libuv" and http-parser to build a web server using C. It’s not as scary as it sounds, libuv really looks very accessible. by Marak Squires is a distributed EventEmitter:

You create custom i/o scenarios by picking and choosing from an extensive library of tiny, independent, autonomous “hooks” that seamlessly work together.

It has a big list of interesting features:

  • Create hooks on ANY device that supports JavaScript
  • Interprocess Message Publishing and Subscribing done through EventEmitter2 and dnode
  • Spawning and Daemonizing of processes handled with Forever

  • blog comments powered by Disqus