New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mushroom

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mushroom

Mushroom sprouts a never-ending set of child processes which can report statistics back to the host. Like multi-process forever.

latest
npmnpm
Version
0.0.4
Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

Mushroom

Manages multiple Node processes better than forever+cluster

** Alpha, use at your own risk **

Mushroom is like forever combined with cluster. It succinctly provides the ability to launch a Node process to serve on a port and restart it when it crashes, while providing a simple way for child processes to report performance data to the master.

Mushroom offers:

  • The means to keep one or more Node instances alive even when they crash
  • Performance and health tracking of instances

Child processes report back to the master over HTTP (intentionally not IPC or a pipe) with status information, like memory used and a tally of performance events. Child process stdout and stderr are also consumed and aggregated by the master. Mushroom is intended for scenarios where a load balancer (e.g. nginx or hardware) balances to one or many servers, each with a Mushroom master which controls many processes ("spores") on known ports. It is possible to make the master act as the load balancer but Mushroom was designed for an external one for reasons of performance, low latency and scalability.

Installation

npm install mushroom

Usage

** Master (e.g. master.js) **

var shroom = require("mushroom").shroom;

shroom.spawn(["main.js"], 2000);
shroom.spawn(["main.js"], 2001);
shroom.spawn(["main.js"], 2002);

** Spore (e.g. main.js) **

var spore = require("mushroom").spore();
var http = require("http");

http.createServer(function(request, response)
{
	spore.tally("hit", 1, {url: request.url});
	
}).listen(spore.port);

Keywords

mushroom

FAQs

Package last updated on 07 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts