setthase / division Goto Github PK
View Code? Open in Web Editor NEWSimple yet powerful wrapper over node.js cluster API.
License: MIT License
Simple yet powerful wrapper over node.js cluster API.
License: MIT License
While in debug mode (node.exe --debug-brk=50429 --nolazy WEBS.js )
process shutdown with 'close' and 'restart' as well, does not work
So when you trying to shutdown, with 'close' and startup new one or ('restart') with 'watch' its just make more processes)
I think its some nodejs issue;
p.s. i dont think its really problem, its just is;
p.p.s in normal mode there is no this problem;
Found in win8.1, nodejs 4.2.6, debug with webstorm 11.0
Hi, I've been 0.4.5 for quite some time, but it doesn't seem to work well with iojs. Are you planning on publishing 1.0 anytime soon? Thanks!
Ideally this:
cluster.use('watch', paths, {extensions: '*.*'})
The broadcast by the master works but there is no place for us to add a
process.on('message', function(msg){});
for a worker.
Hi, i trying to setup multiple clusters ( http and websocket servers ) in one app, but after running second instance of division (new division()) the first one becomes my second configuration..
its a bug or its not possible to make few cluster configuration in one app?
To easy check that just need to shutdown one process of first cluster instance.. and app reload cluster from second one..
Os: win8.1
nodejs version: 4.2.6
var async= require("async");`
var division= require('division');
// cluster global config
var clusterSize= require('os').cpus().length / 2;
async.series([
function( callback ){
var http = new division( { path: 'cluster/http.js', size: clusterSize } );
// Configuration for development environment
http.configure('development', () => {
http.use('debug');
});
// Configuration for production environment
http.configure('production', () => {
http.enable('silent');
});
http.set('args', ['--http']);
// Start your application as a cluster!
http.run( () => callback() );
},
function( callback ){
var ws = new division( { path: 'cluster/webs.js', size: 0 } );
// Configuration for development environment
ws.configure('development', () => {
ws.use('debug');
});
// Configuration for production environment
ws.configure('production', () => {
ws.enable('silent');
});
ws.set('args', ['--websocket']);
// Start your application as a cluster!
ws.run( () => callback() );
}
], ( e ) => {
if( e )
return console.error( e );
console.log( "init" );
});
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.