0.2.3 • Published 9 years ago

skiff-dispatcher v0.2.3

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

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
});