Hello Alexey,
 
2 and 3 is quite doable using domains, and 1st could be achievable with v8 debugger.
 
It's a hack, but nevertheless it's possible, if all your processes follow some rules and don't mess with each other. But I'm afraid that an infinite loop in a service will screw the whole process anyway.
--
// alex
 
 
13.10.2012, 13:29, "Alexey Guskov" <[email protected]>:
Hello everybody. I'm a huge fan of node.js and ve're actively using it in our project for creating various services.
Recently we've faced a problem of significant ram overhead required to run each node.js instance (about 40Mb). This is an issue since we are running a number of different node.js services on one machine, and the memory is limited.
So what we trying to use is run multiple services in single node.js process using vm.runInNewContext(), but compared this approach is missing some functionality:
1) We cannot monitor amount of memory allocated by each subprocess.
2) We cannot cancel all setTimeouts and process.nextTicks for given process to effectively stop its execution.
3) We cannot get a list of open sockets and file descriptors for given process.
With this functionality we could use node.js similar to erlang - run a number of processes inside a single vm - and use some erlang features (like 'let it fail') that would certanly lead us to world domination ;)
So, is there any projects targeted to solve similar problem?

 

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to