Hi Kevin,

I have written a similar module (https://github.com/mcollina/kanban) for
pipeline-processing.
However our concern was about reducing parallelism of spawned processes.
>From the readme:

var kanban = require("kanban");
var board = new kanban.Board();

Then, you define some tasks:

board.defineStep("fast", { wip: 2 }, function (obj, done) {
  console.log("Fast step started for " + obj);
  setTimeout(function () {
    console.log("Fast step done for " + obj);
    done();
  }, 1000);
});
board.defineStep("buffer");
board.defineStep("slow", { wip: 1 }, function (obj, done) {
  console.log("Slow step started for " + obj);
  setTimeout(function () {
    console.log("Slow step done for " + obj);
    done();
  }, 5000);
});

Note that the second and third parameters are optional.

Finally you insert some jobs in the *Board*:

var print = function (err, job) {
  // job is an instance of the Job class
  console.dir(job);
};

for (var i = 0; i < 15; i++) {
  board.insert(i, print);
}


Your API seems a lot nicer than mine, but the usage should be quite similar
at least in the basic example.

Limiting the concurrency is something you might be interested into?

Cheers,

Matteo

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to