Permalink
Browse files

initial

  • Loading branch information...
0 parents commit 7fc6a91bd142ff9833aec64e62159a65081d810e @dvv committed Mar 14, 2011
Showing with 900 additions and 0 deletions.
  1. +22 −0 LICENSE
  2. +9 −0 Makefile
  3. +53 −0 Readme.md
  4. +446 −0 index.coffee
  5. +357 −0 index.js
  6. +13 −0 package.json
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2011 Vladimir Dronnikov <dronnikov@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,9 @@
+all: build
+
+build: index.coffee
+ @coffee -bc index.coffee
+
+clean:
+ rm -f index.js
+
+.PHONY: all build clean
@@ -0,0 +1,53 @@
+
+# Stereo
+
+ [Stereo](https://github.com/dvv/stereo) is a simple multi-core server manager for [node.js](http://nodejs.org).
+ Inspired by multi-node/spark/cluster.
+
+## Example
+
+server.js:
+
+ var server = require('stereo')({
+ port: 3000,
+ repl: true,
+ workers: 4
+ });
+ if (server) { // worker process
+ // HTTP(S) server instance for further tuning
+ server.on('request', function(req, res){...});
+ // inter-workers message arrives
+ process.on('message', function(message){...});
+ } else { // master process
+ // broadcast a message
+ process.publish({sos: 'to all, all, all'});
+ }
+
+## Authors
+
+ * Vladimir Dronnikov
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2011 Vladimir Dronnikov &lt;dronnikov@gmail.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Oops, something went wrong.

0 comments on commit 7fc6a91

Please sign in to comment.