Hacker News new | ask | show | jobs
by el33th40r 4006 days ago
Nice description. The Node event loop pretty much defines the general shape of all APIs that work in Node. When we were porting HyperDex to Node, the greatest challenge was to integrate the data store with the async event loop [1]. The resulting callback oriented programs look strange at first to people coming from a traditional thread-oriented background, but they have an elegance of their own.

[1] http://hyperdex.org/doc/latest/NodeAPI/

1 comments

btw, the params order for callbacks is not very node-y in HyperDex. It should be (err, result) instead of (result, err).

Putting the error first would enable Async or Promise libs to work...