src/
├── components/
│ ├── ui/ # Reusable UI components
│ └── features/ # Feature-specific components
The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)
It does not balance, it leaves it to the kernel.
In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)
- http://nodejs.org/api/cluster.html
- Simple cluster example:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SimpleDotProject | |
// @namespace http://simpledotproject.essembeh.org | |
// @include http://dotproject*/dotproject/*?m=timecard&tab=1&* | |
// @grant none | |
// ==/UserScript== | |
function fireEvent (element, eventName) { | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent(eventName, false, true); |