January 2011
2 posts
1 tag
Asynchronous iteration patterns in Node.js
Some patterns are hard to grasp, specially when programming asynchronously like you have to when you’re doing IO on node.js. For example, let’s suppose you had to program the following routine: Insert a collection of objects on the database and then, when finished, call a callback. So, if you had to write this in a synchronous fashion you would do something like this: So,...
Jan 9th
17 notes
1 tag
Introducing Alfred.js - a node.js in-process...
On November 2010 I blogged about wanting to have an in-process key-value store for node.js. I was displeased with the impedance mismatch between external datastores and node.js, and soon noticed there was nothing really similar to what I wanted. Following the advise from Tom Preston Werner, I created my own BOMTYCC problem. Two months and a lot of long nights later, Alfred.jsĀ emerges. To...
Jan 7th
1 note