This is awesome!
On Mon, Jun 30, 2014 at 11:19 AM, Rebecca Turner <[email protected]> wrote: > Abraxas is a end-to-end streaming Gearman client and worker library. > (Server implementation coming soon.) > > https://www.npmjs.org/package/abraxas > > Standout features: > > * Support for workers handling multiple jobs at the same time over a > single connection. This is super useful if your jobs tend to be bound by > external resources (eg databases). > * Built streaming end-to-end from the start, due to being built on > gearman-packet. > * Most all APIs support natural callback, stream and promise style usage. > * Support for the gearman admin commands to query server status. > * Delayed background job execution built in, with recent versions of the > C++ gearmand. > > Things I learned on this project: > > * Nothing in the protocol stops clients and workers from sharing the same > connection. This was imposed by arbitrary library restrictions. > * In fact, the plain text admin protocol can be included cleanly on the > same connection as the binary protocol. > * Nothing stops workers from handling multiple jobs at the same time, > except, again, arbitrary library restrictions. > * The protocol documentation on gearman.org is out of date when compared > to the C++ gearmand implementation– notably, SUBMIT_JOB_EPOCH has been > implemented. I've begun updating the protocol documentation here: > https://github.com/iarna/gearman-packet/blob/master/PROTOCOL.md > > Because everything is a stream, you can do things like this: > > process.stdin.pipe(client.submitJob('toUpper')).pipe(process.stdout); > > Or as a promise: > > client.submitJob('toUpper', 'test string').then(function (result) { > console.log("Upper:", result); > }); > > Or as a callback: > > client.submitJob('toUpper', 'test string', function(error, result) { > if (error) console.error(error); > console.log("Upper:", result); > }); > > Or mix and match: > > process.stdin.pipe(client.submitJob('toUpper')).then(function(result) { > console.log("Upper:", result); > }); > > > -- Rebecca > > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > Old group rules: > 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 unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/etPan.53b17213.327b23c6.587b%40Sierra-2.local > . > For more options, visit https://groups.google.com/d/optout. > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CACZE8Y5ZkOr0Av3v8E-8TnycyXxnaY26jYiQGscGO6Qoqc_eiw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
