A webserver built on top of express, passport, and ZMQ
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
.npmignore
README.md
package.json
yuidoc.json

README.md

sigil - empower your webserver with ZMQ routing

A webserver built on top of express, passport, and ZMQ

Quickstart

Router Connector

Consumer: FALSE Producer: FALSE

var http, sigil, server, router;

http   = require('http');
sigil  = require('sigil');
router = sigil.router({
    maxpool  : 10,
    minpool  : 1,
    flexible : true
});

router.app({
    id       : 'user',
    type     : 'client',
    incoming : 'tcp://127.0.0.1:13371', 
    outgoing : 'tcp://127.0.0.1:13372'
});

router.app({
    id       : 'log',
    type     : 'collector',
    incoming : 'tcp://127.0.0.1:13373'
});

server = http.createServer(function (req, res) {
    router.send('user', 'user-login', 'Hello World', function (err, rep) {
        res.send(rep);
    });
});

Service Connector

Consumer: FALSE Producer: TRUE

var sigil, service;

sigil   = require('sigil');
service = sigil.service({
    incoming : 'tcp://127.0.0.1:13371', 
    outgoing : 'tcp://127.0.0.1:13372'
});

service.handle('user-login', function (data, cb) {
    cb(null, data);
});

service.bind();

Collector Connector (Log)

Consumer: TRUE Producer: FALSE

var sigil, collector;

sigil     = require('sigil');
collector = sigil.collector({
    incoming : 'tcp://127.0.0.1:13373'
});

collector.bind();

Broadcast Connector

Consumer: FALSE Producer: TRUE

var sigil, broadcast;

sigil = require('sigil');
broadcast = sigil.broadcast({
    outgoing : 'tcp://127.0.0.1:13374'
});