• Stars
    star
    315
  • Rank 132,951 (Top 3 %)
  • Language
    JavaScript
  • Created over 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

utilities for observable asynchronous control flow

vasync: observable asynchronous control flow

This module provides several functions for asynchronous control flow. There are many modules that do this already (notably async.js). This one's claim to fame is improved debuggability.

Observability is important

Working with Node's asynchronous, callback-based model is much easier with a handful of simple control-flow abstractions, like:

  • waterfalls and pipelines (which invoke a list of asynchronous callbacks sequentially)
  • parallel pipelines (which invoke a list of asynchronous callbacks in parallel and invoke a top-level callback when the last one completes).
  • queues
  • barriers

But these structures also introduce new types of programming errors: failing to invoke the callback can cause the program to hang, and inadvertently invoking it twice can cause all kinds of mayhem that's very difficult to debug.

The functions in this module keep track of what's going on so that you can figure out what happened when your program goes wrong. They generally return an object describing details of the current state. If your program goes wrong, you have several ways of getting at this state:

  • On illumos-based systems, use MDB to find the status object and then print it out.
  • Provide an HTTP API (or AMQP, or whatever) that returns these pending status objects as JSON (see kang).
  • Incorporate a REPL into your program and print out the status object.
  • Use the Node debugger to print out the status object.

Functions

  • parallel: invoke N functions in parallel (and merge the results)
  • forEachParallel: invoke the same function on N inputs in parallel
  • pipeline: invoke N functions in series (and stop on failure)
  • tryEach: invoke N functions in series (and stop on success)
  • forEachPipeline: invoke the same function on N inputs in series (and stop on failure)
  • filter/filterSeries/filterLimit: filter N inputs serially or concurrently
  • whilst: invoke a function repeatedly until a stopping condition is met
  • waterfall: like pipeline, but propagating results between stages
  • barrier: coordinate multiple concurrent operations
  • queue/queuev: fixed-size worker queue

parallel: invoke N functions in parallel

Synopsis: parallel(args, callback)

This function takes a list of input functions (specified by the "funcs" property of "args") and runs them all. These input functions are expected to be asynchronous: they get a "callback" argument and should invoke it as callback(err, result). The error and result will be saved and made available to the original caller when all of these functions complete.

This function returns the same "result" object it passes to the callback, and you can use the fields in this object to debug or observe progress:

  • operations: array corresponding to the input functions, with
    • func: input function,
    • status: "pending", "ok", or "fail",
    • err: returned "err" value, if any, and
    • result: returned "result" value, if any
  • successes: "result" field for each of "operations" where "status" == "ok" (in no particular order)
  • ndone: number of input operations that have completed
  • nerrors: number of input operations that have failed

This status object lets you see in a debugger exactly which functions have completed, what they returned, and which ones are outstanding.

All errors are combined into a single "err" parameter to the final callback (see below).

Example usage:

console.log(mod_vasync.parallel({
    'funcs': [
        function f1 (callback) { mod_dns.resolve('joyent.com', callback); },
        function f2 (callback) { mod_dns.resolve('github.com', callback); },
        function f3 (callback) { mod_dns.resolve('asdfaqsdfj.com', callback); }
    ]
}, function (err, results) {
        console.log('error: %s', err.message);
        console.log('results: %s', mod_util.inspect(results, null, 3));
}));

In the first tick, this outputs:

status: { operations:
   [ { func: [Function: f1], status: 'pending' },
     { func: [Function: f2], status: 'pending' },
     { func: [Function: f3], status: 'pending' } ],
  successes: [],
  ndone: 0,
  nerrors: 0 }

showing that there are three operations pending and none has yet been started. When the program finishes, it outputs this error:

error: first of 1 error: queryA ENOTFOUND

which encapsulates all of the intermediate failures. This model allows you to write the final callback like you normally would:

if (err)
  return (callback(err));

and still propagate useful information to callers that don't deal with multiple errors (i.e. most callers).

The example also prints out the detailed final status, including all of the errors and return values:

results: { operations:
   [ { func: [Function: f1],
       funcname: 'f1',
       status: 'ok',
       err: null,
       result: [ '165.225.132.33' ] },
     { func: [Function: f2],
       funcname: 'f2',
       status: 'ok',
       err: null,
       result: [ '207.97.227.239' ] },
     { func: [Function: f3],
       funcname: 'f3',
       status: 'fail',
       err: { [Error: queryA ENOTFOUND] code: 'ENOTFOUND',
          errno: 'ENOTFOUND', syscall: 'queryA' },
       result: undefined } ],
  successes: [ [ '165.225.132.33' ], [ '207.97.227.239' ] ],
  ndone: 3,
  nerrors: 1 }

You can use this if you want to handle all of the errors individually or to get at all of the individual return values.

Note that "successes" is provided as a convenience and the order of items in that array may not correspond to the order of the inputs. To consume output in an ordered manner, you should iterate over "operations" and pick out the result from each item.

forEachParallel: invoke the same function on N inputs in parallel

Synopsis: forEachParallel(args, callback)

This function is exactly like parallel, except that the input is specified as a single function ("func") and a list of inputs ("inputs"). The function is invoked on each input in parallel.

This example is exactly equivalent to the one above:

console.log(mod_vasync.forEachParallel({
    'func': mod_dns.resolve,
    'inputs': [ 'joyent.com', 'github.com', 'asdfaqsdfj.com' ]
}, function (err, results) {
    console.log('error: %s', err.message);
    console.log('results: %s', mod_util.inspect(results, null, 3));
}));

pipeline: invoke N functions in series (and stop on failure)

Synopsis: pipeline(args, callback)

The named arguments (that go inside args) are:

  • funcs: input functions, to be invoked in series
  • arg: arbitrary argument that will be passed to each function

The functions are invoked in order as func(arg, callback), where "arg" is the user-supplied argument from "args" and "callback" should be invoked in the usual way. If any function emits an error, the whole pipeline stops.

The return value and the arguments to the final callback are exactly the same as for parallel. The error object for the final callback is just the error returned by whatever pipeline function failed (if any).

This example is similar to the one above, except that it runs the steps in sequence and stops early because pipeline stops on the first error:

console.log(mod_vasync.pipeline({
    'funcs': [
        function f1 (_, callback) { mod_fs.stat('/tmp', callback); },
        function f2 (_, callback) { mod_fs.stat('/noexist', callback); },
        function f3 (_, callback) { mod_fs.stat('/var', callback); }
    ]
}, function (err, results) {
        console.log('error: %s', err.message);
        console.log('results: %s', mod_util.inspect(results, null, 3));
}));

As a result, the status after the first tick looks like this:

{ operations:
   [ { func: [Function: f1], status: 'pending' },
     { func: [Function: f2], status: 'waiting' },
     { func: [Function: f3], status: 'waiting' } ],
  successes: [],
  ndone: 0,
  nerrors: 0 }

Note that the second and third stages are now "waiting", rather than "pending" in the parallel case. The error and complete result look just like the parallel case.

tryEach: invoke N functions in series (and stop on success)

Synopsis: tryEach(funcs, callback)

The tryEach function invokes each of the asynchronous functions in funcs serially. Each function takes a single argument: an interstitial-callback. tryEach will keep calling the functions until one of them succeeds (or they all fail). At the end, the terminating-callback is invoked with the error and/or results provided by the last function that was called (either the last one that failed or the first one that succeeded).

This example is similar to the one above, except that it runs the steps in sequence and stops early because tryEach stops on the first success:

console.log(mod_vasync.tryEach([
        function f1 (callback) { mod_fs.stat('/notreal', callback); },
        function f2 (callback) { mod_fs.stat('/noexist', callback); },
        function f3 (callback) { mod_fs.stat('/var', callback); },
        function f4 (callback) { mod_fs.stat('/noexist', callback); }
    ],
    function (err, results) {
            console.log('error: %s', err);
            console.log('results: %s', mod_util.inspect(results));
}));

The above code will stop when it finishes f3, and we will only print a single result and no errors:

error: null
results: { dev: 65760,
  mode: 16877,
  nlink: 41,
  uid: 0,
  gid: 3,
  rdev: -1,
  blksize: 2560,
  ino: 11,
  size: 41,
  blocks: 7,
  atime: Thu May 28 2015 16:21:25 GMT+0000 (UTC),
  mtime: Thu Jan 21 2016 22:08:50 GMT+0000 (UTC),
  ctime: Thu Jan 21 2016 22:08:50 GMT+0000 (UTC) }

If we comment out f3, we get the following output:

error: Error: ENOENT, stat '/noexist'
results: undefined

Note that: there is a mismatch (inherited from async) between the semantics of the interstitial callback and the sematics of the terminating callback. See the following example:

console.log(mod_vasync.tryEach([
        function f1 (callback) { callback(new Error()); },
        function f2 (callback) { callback(new Error()); },
        function f3 (callback) { callback(null, 1, 2, 3); },
        function f4 (callback) { callback(null, 1); }
    ],
    function (err, results) {
            console.log('error: %s', err);
            console.log('results: %s', mod_util.inspect(results));
}));

We pass one or more results to the terminating-callback via the interstitial-callback's arglist -- (err, res1, res2, ...). From the callback-implementor's perspective, the results get wrapped up in an array (err, [res1, res2, ...]) -- unless there is only one result, which simply gets passed through as the terminating callback's second argument. This means that when we call the callback in f3 above, the terminating callback receives the list [1, 2, 3] as its second argument. If, we comment out f3, we will end up calling the callback in f4 which will end up invoking the terminating callback with a single result: 1, instead of [1].

In short, be mindful that there is not always a 1:1 correspondence between the terminating callback that you define, and the interstitial callback that gets called from the function.

forEachPipeline: invoke the same function on N inputs in series (and stop on failure)

Synopsis: forEachPipeline(args, callback)

This function is exactly like pipeline, except that the input is specified as a single function ("func") and a list of inputs ("inputs"). The function is invoked on each input in series.

This example is exactly equivalent to the one above:

console.log(mod_vasync.forEachPipeline({
    'func': mod_dns.resolve,
    'inputs': [ 'joyent.com', 'github.com', 'asdfaqsdfj.com' ]
}, function (err, results) {
    console.log('error: %s', err.message);
    console.log('results: %s', mod_util.inspect(results, null, 3));
}));

waterfall: invoke N functions in series, stop on failure, and propagate results

Synopsis: waterfall(funcs, callback)

This function works like pipeline except for argument passing.

Each function is passed any values emitted by the previous function (none for the first function), followed by the callback to invoke upon completion. This callback must be invoked exactly once, regardless of success or failure. As conventional in Node, the first argument to the callback indicates an error (if non-null). Subsequent arguments are passed to the next function in the "funcs" chain.

If any function fails (i.e., calls its callback with an Error), then the remaining functions are not invoked and "callback" is invoked with the error.

The only difference between waterfall() and pipeline() are the arguments passed to each function in the chain. pipeline() always passes the same argument followed by the callback, while waterfall() passes whatever values were emitted by the previous function followed by the callback.

Here's an example:

mod_vasync.waterfall([
    function func1(callback) {
 	setImmediate(function () {
		callback(null, 37);
	});
    },
    function func2(extra, callback) {
	console.log('func2 got "%s" from func1', extra);
	callback();
    }
], function () {
	console.log('done');
});

This prints:

func2 got "37" from func1
better stop early

filter/filterLimit/filterSeries: filter N inputs serially or concurrently

Synopsis: filter(inputs, filterFunc, callback)

Synopsis: filterSeries(inputs, filterFunc, callback)

Synopsis: filterLimit(inputs, limit, filterFunc, callback)

These functions take an array (of anything) and a function to call on each element of the array. The function must callback with a true or false value as the second argument or an error object as the first argument. False values will result in the element being filtered out of the results array. An error object passed as the first argument will cause the filter function to stop processing new elements and callback to the caller with the error immediately. Original input array order is maintained.

filter and filterSeries are analogous to calling filterLimit with a limit of Infinity and 1 respectively.

var inputs = [
    'joyent.com',
    'github.com',
    'asdfaqsdfj.com'
];
function filterFunc(input, cb) {
    mod_dns.resolve(input, function (err, results) {
        if (err) {
            cb(null, false);
        } else {
            cb(null, true);
        }
    }
}
mod_vasync.filter(inputs, filterFunc, function (err, results) {
    // err => undefined
    // results => ['joyent.com', 'github.com']
});

whilst: invoke a function repeatedly until a stopping condition is met

Synopsis: whilst(testFunc, iterateFunc, callback)

Repeatedly invoke iterateFunc while testFunc returns a true value. iterateFunc is an asychronous function that must call its callback (the first and only argument given to it) when it is finished with an optional error object as the first argument, and any other arbitrary arguments. If an error object is given as the first argument, whilst will finish and call callback with the error object. testFunc is a synchronous function that must return a value - if the value resolves to true whilst will invoke iterateFunc, if it resolves to false whilst will finish and invoke callback with the last set of arguments iterateFunc called back with.

whilst also returns an object suitable for introspecting the current state of the specific whilst invocation which contains the following properties:

  • finished: boolean if this invocation has finished or is in progress
  • iterations: number of iterations performed (calls to iterateFunc)

Compatible with async.whilst

var n = 0;

var w = mod_vasync.whilst(
    function testFunc() {
        return (n < 5);
    },
    function iterateFunc(cb) {
        n++;
        cb(null, {n: n});
    },
    function whilstDone(err, arg) {
        // err => undefined
        // arg => {n: 5}
        // w => {finished: true, iterations: 5}
    }
);

// w => {finished: false, iterations: 0}

barrier: coordinate multiple concurrent operations

Synopsis: barrier([args])

Returns a new barrier object. Like parallel, barriers are useful for coordinating several concurrent operations, but instead of specifying a list of functions to invoke, you just say how many (and optionally which ones) are outstanding, and this object emits 'drain' when they've all completed. This is syntactically lighter-weight, and more flexible.

  • Methods:

    • start(name): Indicates that the named operation began. The name must not match an operation which is already ongoing.
    • done(name): Indicates that the named operation ended.
  • Read-only public properties (for debugging):

    • pending: Set of pending operations. Keys are names passed to "start", and values are timestamps when the operation began.
    • recent: Array of recent completed operations. Each element is an object with a "name", "start", and "done" field. By default, 10 operations are remembered.
  • Options:

    • nrecent: number of recent operations to remember (for debugging)

Example: printing sizes of files in a directory

var mod_fs = require('fs');
var mod_path = require('path');
var mod_vasync = require('../lib/vasync');

var barrier = mod_vasync.barrier();

barrier.on('drain', function () {
  console.log('all files checked');
});

barrier.start('readdir');

mod_fs.readdir(__dirname, function (err, files) {
  barrier.done('readdir');

  if (err)
    throw (err);

  files.forEach(function (file) {
    barrier.start('stat ' + file);

    var path = mod_path.join(__dirname, file);

    mod_fs.stat(path, function (err2, stat) {
      barrier.done('stat ' + file);
      console.log('%s: %d bytes', file, stat['size']);
    });
  });
});

This emits:

barrier-readdir.js: 602 bytes
foreach-parallel.js: 358 bytes
barrier-basic.js: 552 bytes
nofail.js: 384 bytes
pipeline.js: 490 bytes
parallel.js: 481 bytes
queue-serializer.js: 441 bytes
queue-stat.js: 529 bytes
all files checked

queue/queuev: fixed-size worker queue

Synopsis: queue(worker, concurrency)

Synopsis: queuev(args)

This function returns an object that allows up to a fixed number of tasks to be dispatched at any given time. The interface is compatible with that provided by the "async" Node library, except that the returned object's fields represent a public interface you can use to introspect what's going on.

  • Arguments

    • worker: a function invoked as worker(task, callback), where task is a task dispatched to this queue and callback should be invoked when the task completes.
    • concurrency: a positive integer indicating the maximum number of tasks that may be dispatched at any time. With concurrency = 1, the queue serializes all operations.
  • Methods

    • push(task, [callback]): add a task (or array of tasks) to the queue, with an optional callback to be invoked when each task completes. If a list of tasks are added, the callback is invoked for each one.
    • length(): for compatibility with node-async.
    • close(): signal that no more tasks will be enqueued. Further attempts to enqueue tasks to this queue will throw. Once all pending and queued tasks are completed the object will emit the "end" event. The "end" event is the last event the queue will emit, and it will be emitted even if no tasks were ever enqueued.
    • kill(): clear enqueued tasks and implicitly close the queue. Several caveats apply when kill() is called:
      • The completion callback will not be called for items purged from the queue.
      • The drain handler is cleared (for node-async compatibility)
      • Subsequent calls to kill() or close() are no-ops.
      • As with close(), it is not legal to call push() after kill().
  • Read-only public properties (for debugging):

    • concurrency: for compatibility with node-async
    • worker: worker function, as passed into "queue"/"queuev"
    • worker_name: worker function's "name" field
    • npending: the number of tasks currently being processed
    • pending: an object (not an array) describing the tasks currently being processed
    • queued: array of tasks currently queued for processing
    • closed: true when close() has been called on the queue
    • ended: true when all tasks have completed processing, and no more processing will occur
    • killed: true when kill() has been called on the queue
  • Hooks (for compatibility with node-async):

    • saturated
    • empty
    • drain
  • Events

    • 'end': see close()

If the tasks are themselves simple objects, then the entire queue may be serialized (as via JSON.stringify) for debugging and monitoring tools. Using the above fields, you can see what this queue is doing (worker_name), which tasks are queued, which tasks are being processed, and so on.

Example 1: Stat several files

Here's an example demonstrating the queue:

var mod_fs = require('fs');
var mod_vasync = require('../lib/vasync');

var queue;

function doneOne()
{
  console.log('task completed; queue state:\n%s\n',
      JSON.stringify(queue, null, 4));
}

queue = mod_vasync.queue(mod_fs.stat, 2);

console.log('initial queue state:\n%s\n', JSON.stringify(queue, null, 4));

queue.push('/tmp/file1', doneOne);
queue.push('/tmp/file2', doneOne);
queue.push('/tmp/file3', doneOne);
queue.push('/tmp/file4', doneOne);

console.log('all tasks dispatched:\n%s\n', JSON.stringify(queue, null, 4));

The initial queue state looks like this:

initial queue state:
{
    "nextid": 0,
    "worker_name": "anon",
    "npending": 0,
    "pending": {},
    "queued": [],
    "concurrency": 2
}

After four tasks have been pushed, we see that two of them have been dispatched and the remaining two are queued up:

all tasks pushed:
{
    "nextid": 4,
    "worker_name": "anon",
    "npending": 2,
    "pending": {
        "1": {
            "id": 1,
            "task": "/tmp/file1"
        },
        "2": {
            "id": 2,
            "task": "/tmp/file2"
        }
    },
    "queued": [
        {
            "id": 3,
            "task": "/tmp/file3"
        },
        {
            "id": 4,
            "task": "/tmp/file4"
        }
    ],
    "concurrency": 2
}

As they complete, we see tasks moving from "queued" to "pending", and completed tasks disappear:

task completed; queue state:
{
    "nextid": 4,
    "worker_name": "anon",
    "npending": 1,
    "pending": {
        "3": {
            "id": 3,
            "task": "/tmp/file3"
        }
    },
    "queued": [
        {
            "id": 4,
            "task": "/tmp/file4"
        }
    ],
    "concurrency": 2
}

When all tasks have completed, the queue state looks like it started:

task completed; queue state:
{
    "nextid": 4,
    "worker_name": "anon",
    "npending": 0,
    "pending": {},
    "queued": [],
    "concurrency": 2
}

Example 2: A simple serializer

You can use a queue with concurrency 1 and where the tasks are themselves functions to ensure that an arbitrary asynchronous function never runs concurrently with another one, no matter what each one does. Since the tasks are the actual functions to be invoked, the worker function just invokes each one:

var mod_vasync = require('../lib/vasync');

var queue = mod_vasync.queue(
    function (task, callback) { task(callback); }, 1);

queue.push(function (callback) {
  console.log('first task begins');
  setTimeout(function () {
    console.log('first task ends');
    callback();
  }, 500);
});

queue.push(function (callback) {
  console.log('second task begins');
  process.nextTick(function () {
    console.log('second task ends');
    callback();
  });
});

This example outputs:

$ node examples/queue-serializer.js
first task begins
first task ends
second task begins
second task ends

More Repositories

1

libuv

Go to
C
3,271
star
2

smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: http://smartos.org/smartos-mailing-list/
C
1,437
star
3

triton

Joyent Triton DataCenter: a cloud management platform with first class support for containers.
Shell
1,202
star
4

node-verror

Rich JavaScript errors
JavaScript
1,125
star
5

containerpilot

A service for autodiscovery and configuration of applications running in containers
Go
1,104
star
6

manta

Manta is a scalable HTTP-based object store
Makefile
565
star
7

node-workflow

Task orchestration, creation and running using NodeJS
JavaScript
445
star
8

node-http-signature

Reference implementation of Joyent's HTTP Signature Scheme
JavaScript
392
star
9

node-stackvis

Stacktrace visualization tools
JavaScript
340
star
10

v8plus

Node.js native add-ons in C
C++
265
star
11

rfd

Requests for Discussion
Roff
251
star
12

mdb_v8

postmortem debugging for Node.js and other V8-based programs
C
235
star
13

manatee

Automated fault monitoring and leader-election system for strongly-consistent, highly-available writes to PostgreSQL (Joyent SDC, Manta).
JavaScript
228
star
14

statemap

Software for rendering statemaps
Rust
219
star
15

restdown

Pretty REST API docs authored in Markdown
Python
203
star
16

sdc-docker

Docker Engine for Triton
JavaScript
182
star
17

triton-kubernetes

Kubernetes on Triton
Go
174
star
18

node-sshpk

Parse, convert, fingerprint and use SSH keys in pure node.js
JavaScript
159
star
19

nodejs-advisory-board

Meeting Minutes and Working Group Discussions
158
star
20

nhttpsnoop

Trace Node.js HTTP server activity
Shell
138
star
21

pgsqlstat

report top-level postgres stats
Shell
129
star
22

node-panic

Postmortem debugging facility for Node.js
JavaScript
120
star
23

node-assert-plus

Extra assertions on top of node's assert module
JavaScript
119
star
24

illumos-kvm

KVM driver for illumos
C
117
star
25

node-snmpjs

SNMP toolkit for Node.js
JavaScript
111
star
26

node-ctype

Read and write binary structures with node
JavaScript
89
star
27

node-manta

Node.js SDK for Manta
JavaScript
75
star
28

node-bunyan-syslog

Syslog Stream for node-bunyan
JavaScript
68
star
29

illumos-kvm-cmd

qemu-kvm for illumos-kvm
C
65
star
30

node-watershed

Simple WebSockets Client/Server (RFC6455)
Makefile
65
star
31

node-smartdc

Client SDK and CLI for the Joyent SmartDataCenter API
JavaScript
63
star
32

mi-centos-7

Shell
63
star
33

node-asn1

Contains parsers and serializers for ASN.1 (currently BER only)
AGS Script
61
star
34

smartos_cookbooks

Chef Cookbooks for managing the SmartOS Global Zone
JavaScript
58
star
35

moray

Moray, the highly-available key/value store (Joyent Triton, Manta)
JavaScript
58
star
36

node-vstream

instrumented streams
JavaScript
56
star
37

node-triton

Triton client tool and node.js library
JavaScript
55
star
38

node-docker-registry-client

node.js client for the docker registry
JavaScript
55
star
39

kang

Introspection for distributed systems
JavaScript
49
star
40

smfgen

Generate SMF manifests from a JSON description
JavaScript
49
star
41

jsstyle

cstyle-based JavaScript style checker
Perl
49
star
42

node-debug-school

nodeschool curriculum for debugging Node.js
JavaScript
49
star
43

node-getopt

POSIX-style getopt() for Node.js
JavaScript
47
star
44

dtruss-osx

Shell
43
star
45

node-ip6addr

IPv6/IPv4 address parsing and manipulation for node.js
JavaScript
43
star
46

pg_prefaulter

Faults pages into PostgreSQL shared_buffers or filesystem caches in advance of WAL apply
Go
43
star
47

node-camp

Asynchronous IO ...camp
JavaScript
43
star
48

manatee-state-machine

design ideas for manatee
JavaScript
42
star
49

node-docker-file-parser

Parses a dockerfile contents string and returns the array of docker commands
JavaScript
42
star
50

smartos-vmtools

Shell
40
star
51

illumos-extra

Extra non-ON software required for Illumos
C
39
star
52

sdc-nfs

user-level NFS server written in node.js
JavaScript
35
star
53

node-extsprintf

Extended POSIX-style sprintf
JavaScript
34
star
54

node-kstat

A node.js addon for reading illumos kstats
Perl
32
star
55

node-jsprim

utilities for primitive JavaScript types
JavaScript
32
star
56

knife-joyent

Opscode Chef knife plug-in for Joyent CloudAPI
Ruby
32
star
57

eng

Joyent Engineering Guide
JavaScript
31
star
58

pkgsrc-joyent

Various pkgsrc packages used by Joyent, not committed upstream yet
Makefile
31
star
59

smartos-overlay

Overlay directory specific to open-source SmartOS
30
star
60

node-fast

streaming JSON RPC over TCP
JavaScript
29
star
61

convertvm

convert OVF vm packages to smartos compatible images
JavaScript
29
star
62

minecrab

Minecraft on Joyent's Cloud & Manta on Demand
Shell
28
star
63

cloud-perf-labs

Student labs for Cloud Performance training
C
28
star
64

node-consulite

Tiny consul Node.js module for client discovery
JavaScript
28
star
65

node-piloted

Service discovery in node using ContainerPilot
JavaScript
27
star
66

node-in-the-industry

This is the script that used to generate fresh "node in the industry" content. It is no longer being maintained. See: https://github.com/nodejs/nodejs.org.
HTML
27
star
67

mi-freebsd-10

Custom FreeBSD 10 ISO builder
Shell
26
star
68

javascriptlint

JavaScript Lint
C
25
star
69

binder

Triton/Manta DNS server over Apache Zookeeper
JavaScript
25
star
70

node-tracing

User definable tracing API
JavaScript
25
star
71

python-manta

Python SDK for Manta (community maintained)
Python
24
star
72

manufacturing

Manufacturing specifications
Python
24
star
73

pglockanalyze

analyze postgres locking behavior
Makefile
23
star
74

sdcboot

SDC FDUM environment
C
23
star
75

pkgsrc-wip

Conversion of the pkgsrc-wip CVS project
Makefile
23
star
76

conch-api

Datacenter build and management service
Perl
22
star
77

node-tab

Unix-style tables for command-line utilities
Makefile
22
star
78

triton-go

Go SDK for Joyent Triton (Compute) and Triton Object Storage (Manta)
Go
21
star
79

node-spawn-async

spawn child processes asynchronously
JavaScript
19
star
80

smartmachine_cookbooks

Chef Cookbooks for managing SmartOS SmartMachines
19
star
81

syslinux

replica of syslinux repo from git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git
C
19
star
82

manta-nfs

NFSv3 Manta Storage Server Gateway
JavaScript
19
star
83

daggr

filter and aggregate numeric data in plaintext or json form
JavaScript
18
star
84

mod_usdt

DTrace provider for Apache
D
18
star
85

freebsd-vpc

Control plane for `projects/VPC` branch of `joyent/freebsd`
Go
18
star
86

mibe

Machine Image Build Environment
PHP
17
star
87

node-zfs

Node.js library to interface with ZFS utilities
JavaScript
17
star
88

ruby-manta

Ruby interface for Joyent's Manta service
Ruby
17
star
89

pgstatsmon

Node.js service for shoveling Postgres stats into Prometheus
JavaScript
17
star
90

tsg-infrastructure

Shell
17
star
91

java-manta

Java Manta Client SDK
Java
16
star
92

manta-thoth

Thoth is a Manta-based system for core and crash dump management
JavaScript
16
star
93

node-nfs

Node.js SDK for writing Portmap/Mount/NFS (v3) servers
JavaScript
16
star
94

triton-terraform

16
star
95

java-http-signature

Library for performing RSA signed HTTP requests in Java
Java
16
star
96

summit-workshop

Node.js Summit - Day Zero Workshop
JavaScript
16
star
97

sdc-adminui

Operator portal for SmartDataCenter
JavaScript
15
star
98

sdc-headnode

Responsible for building and setting up the Triton (formerly SmartDataCenter) headnode.
JavaScript
15
star
99

openbsd-kvm-image-builder

Scripts to create a custom OpenBSD install ISO and a KVM image for use in SmartOS and Triton.
Shell
15
star
100

ipxe

C
14
star