skiff-dispatcher

0.2.3 • Public • Published

Skiff dispatcher

Cluster that is connected together, has shared in-memory state, allows queued tasks on the leader and then passes control to followers that requested to perform the operation, or any other peer for that matter.

This module contains only basic structure and needs to be extended to suit your needs. By itself it's pretty much useless

Cluster state is persisted to redis, each node has it's own copy of cluster's metadata that is eventually synced.

npm install skiff-dispatcher -S

Usage

 
var Dispatcher = require('skiff-dispatcher');
var _ = require('lodash');
 
 
Dispatcher.attachRemoteCall('methodName', function rpcEnabledCall(resourceId, resourceType, arg1, arg2, ..., next) {
    // func
});
 

Dependencies (6)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i skiff-dispatcher

    Weekly Downloads

    0

    Version

    0.2.3

    License

    MIT

    Last publish

    Collaborators

    • avvs