{"_id":"telegraft","_rev":"44-32695cf539b7130e6c709335efe027b8","name":"telegraft","description":"node.js ZEROMQ mesh network","dist-tags":{"latest":"0.5.7"},"versions":{"0.0.1":{"name":"telegraft","version":"0.0.1","description":"A remote worker who grafts hard on your servers","keywords":["deployment","ssh","configuration","remote"],"author":{"name":"JQuarry","email":"dig@jquarry.com"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"main":"./index","bin":{"telegraft":"./bin/telegraft"},"engines":{"node":">= 0.6.x"},"scripts":{"test":"make test"},"dependencies":{"async":"0.1.22","underscore":"1.3.3"},"devDependencies":{"mocha":"*","should":"*"},"readme":"[![Build Status](https://secure.travis-ci.org/binocarlos/telegraft.png)](http://travis-ci.org/binocarlos/telegraft)\r\n\r\n\r\n[![Telegraft Server Management](https://dl.dropbox.com/s/rs05ps3ipx5y3yt/telegraft.jpg?dl=1)](http://binocarlos.github.com/telegraft/)\r\n\r\n#telegraft\r\nTelegraft broadcasts configuration and setup tasks to drone servers.\r\n\r\nIt is heavily inspired by the likes of Puppet and Chef but leans much\r\nmore towards Ansible in terms of a serverless deployment mechanism.\r\n\r\n## Installation\r\n\r\n      npm install telegraft\r\n\r\n## Usage\r\nYou use telegraft by broadcasting to listeners.  The listeners are servers and the broadcasts are\r\na sequence of SSH/SCP commands.\r\n\r\nThe first thing we do in any telegraft project:\r\n\r\n\tvar telegraft = require('telegraft');\r\n\r\n### Recordings\r\nNow we want to make a **recording** which is a re-usable function that defines a certain action\r\nto be carried out on a server.  Recordings can use other recordings and because they are just\r\nfunctions, the composition is up to you (powertool!).\r\n\r\nEach recording function accepts a **broadcast** object and will use 2 main functions on it:\r\n\r\n* **record:** logs a command to be carried out on a server\r\n* **wait:** \twaits until the previous commands have finished on ALL servers\r\n\r\nHere is an example of a very basic recording that outputs 'Hello World' to a temp file, waits\r\nand then deletes it.\r\n\r\n\tvar recordingTest = function(broadcast) {\r\n\t\tbroadcast.record('echo \"Hello World\" > /tmp/telegraft.txt');\r\n\t\tbroadcast.wait();\r\n\t\tbroadcast.record('rm -f /tmp/telegraft.txt');\r\n\t};\r\n\r\nTo broadcast this recording to our localhost (it will just use the local shell):\r\n\r\n\ttelegraft(recordingTest).transmit('localhost')\r\n\r\nTo broadcast this recording to remote hosts (you must have SSH keys in place):\r\n\r\n\ttelegraft(recordingTest).transmit('remotehost')\r\n\r\n### Asynchronous Transmission\r\nThe above example is all nice and dandy but a bit pointless on one server - why are we calling wait() in the example above?\r\n\r\nThe power of telegraft comes when you wanted to do the above on 50 servers.\r\n\r\nImagine that it was ESSENTIAL that all 50 servers had written the test file before ANY of them\r\nstart deleting it (I know, it's a simple example but use your imagination for large compilcated\r\ndeployments):\r\n\r\n\ttelegraft(recordingTest).transmit([\r\n\t\t'server1.me.com',\r\n\t\t'server2.me.com',\r\n\t\t'server3.me.com',\r\n\t\t'...'\r\n\t])\r\n\r\nNow you have a wonderfully orchestrated 2 step process of adding then removing a file co-ordinated\r\nacross 50 servers simultenously!\r\n\r\nThe usage pattern that makes this powerful is to have a recording that 'prepares' servers, then waiting\r\nfor all servers to finish preparing and then trigger an update \r\n\r\n### Composition\r\nRecordings are just functions.  The idea is that you can organize recordings and include libraries\r\nof them in any manner you see fit.\r\n\r\nWhen you call broadcast.record - it will behave differently depending on the first argument:\r\n\r\n#### String\r\nThis is the most basic and low level type of recording, it basically represents a single SSH or SCP\r\ncommand.\r\n\r\n\t// send an SSH command down the wire\r\n\tbroadcast.record('ssh', 'uptime');\r\n\r\n\t// send an SCP command down the wire\r\n\tbroadcast.record('scp', '...');\r\n\r\n\t// assume an SSH command if none given\r\n\tbroadcast.record('uptime');\t\r\n\r\n#### Function\r\nThis function will be run and given a broadcast object just like any other recording.  This allows\r\nyou to group commands and include libraies.\r\n\r\n\tbroadcast.record(function(){\r\n\t\tbroadcast.record('echo \"Hello World\" > /tmp/telegraft.txt');\r\n\t\tbroadcast.wait();\r\n\t\tbroadcast.record('rm -f /tmp/telegraft.txt');\r\n\t})\r\n\r\n#### Array\r\nThis will be iterated and each item passed to record.\r\n\r\nThis example uses the 'service' recording from the archive to restart two services in order.\r\n\r\n\tbroadcast.record([\r\n\r\n\t\ttelegraft.archive.service({\r\n\t\t\tname:'httpd',\r\n\t\t\taction:'restart'\r\n\t\t}),\r\n\r\n\t\t// this lets us wait even in array trim\r\n\t\ttelegraft.wait(),\r\n\r\n\t\ttelegraft.archive.service({\r\n\t\t\tname:'myapp',\r\n\t\t\taction:'restart'\r\n\t\t})\r\n\r\n\t]);\r\n\r\n### Making Recordings Useful\r\nIt's always a good idea to have your recording functions wrapped in a closure - this lets you\r\nuse the same recording but with different data (this is how recordings from the archive work).\r\n\r\nTake our example above:\r\n\r\n\tvar recordingTest = function(broadcast) {\r\n\t\tbroadcast.record('echo \"Hello World\" > /tmp/telegraft.txt');\r\n\t\tbroadcast.wait();\r\n\t\tbroadcast.record('rm -f /tmp/telegraft.txt');\r\n\t};\r\n\r\nTo make this more useful:\r\n\r\n\tvar testFileCreation = function(path, content){\r\n\t\treturn function(broadcast){\r\n\t\t\tbroadcast.record('echo \"' + content + '\" > ' + path);\r\n\t\t\tbroadcast.wait();\r\n\t\t\tbroadcast.record('rm -f ' + path);\r\n\t\t}\r\n\t}\r\n\r\n\tbroadcast.record(testFileCreation('/tmp/telegraft.txt', 'Hello World'));\r\n\r\nA classic use case might be to make a recording that uploads some new virtual host config file and\r\nthen restarts apache.\r\n\r\nSo we make a closure that accepts the variables and returns the recording function.\r\n\r\n\t// a closure function that accepts a list of website configs and returns\r\n\t// a function that will record everything on the broadcast\r\n\tvar addVirtualHosts = function(websites) {\r\n\r\n\t\t// here is the return function that will be run by telegraft with a broadcast\r\n\t\treturn function(broadcast) {\r\n\r\n\t\t\t// we want to add the config files for each website\r\n\t\t\tfor(var i in websites) {\r\n\t\t\t\tvar website = websites[i];\r\n\r\n\t\t\t\tvar httpConfigDev = '/etc/httpd/sites-available/' + website.name;\r\n\t\t\t\tvar httpConfigLive = '/etc/httpd/sites-enabled/' + website.name;\r\n\r\n\t\t\t\t// use an archive recording to upload the virtual host config file for this website\r\n\t\t\t\tbroadcast.record(telegraft.archive.template({\r\n\t\t\t\t\tsource:'./templates/apacheVHost', \r\n\t\t\t\t\tdest:httpConfigDev,\r\n\t\t\t\t\tvars:{\r\n\t\t\t\t\t\thost:website.domain,\r\n\t\t\t\t\t\tdocument_root:'/home/' + website.name + '/website/www'\r\n\t\t\t\t\t}\r\n\t\t\t\t}));\r\n\r\n\t\t\t\t// symlink the virtual host file so it loads up\r\n\t\t\t\tbroadcast.record('ln -s ' + httpConfigDev + ' ' + httpConfigLive);\r\n\t\t\t}\r\n\r\n\t\t\t// we want to wait now for all of the configs to be prepared\r\n\t\t\tbroadcast.wait();\r\n\r\n\t\t\t// now we restart all the servers\r\n\t\t\tbroadcast.record(telegraft.archive.service({\r\n\t\t\t\tname:'httpd',\r\n\t\t\t\taction:'restart'\r\n\t\t\t});\r\n\r\n\t\t};\r\n\r\n\t}\r\n\r\nTo use this:\r\n\r\n\tbroadcast.record(addVirtualHosts([\r\n\t\t{\r\n\t\t\tname:\"bob\",\r\n\t\t\tdomain:\"bob.com\"\r\n\t\t},\r\n\t\t{\r\n\t\t\tname:\"dave\",\r\n\t\t\tdomain:\"dave.com\"\r\n\t\t}\r\n\r\n\t]));\r\n\r\n\r\n## Background\r\nTelegraft is a way of remotely configuring servers using SSH.\r\n\r\nIt is inspired heavily by [Ansible](http://ansible.github.com/)\r\n\r\n### Components\r\nComponents at play in a telegraft network:\r\n\r\n* **Transmitter**: the control server(s) that are broadcasting commands\r\n\r\n* **Receiver**: the servers that are recieving commands\r\n\r\n* **Recording**: some work to be done to a server\r\n\r\n* **Broadcast**: sending out a recording to a particular server\r\n\r\n### Usage Flow\r\n\r\n1. The Transmitter (**Tx**) is setup\r\n\r\n2. SSH access from the **Tx** to the Receivers (**Rx's**) is enabled\r\n\r\n3. Recordings are coded and then transmitted to certain Receivers\r\n\r\n4. This results in SSH & SCP commands being co-ordinated in sequence\r\n\r\n5. The broadcast can then summarize what happened\r\n\r\n\r\n## Credits\r\n[JQuarry](http://jquarry.com) follow jquarry on twitter [@quarryjs](http://twitter.com/quarryjs)\r\n\r\n## Licence\r\nLicenced under the [MIT License](http://opensource.org/licenses/mit)","_id":"telegraft@0.0.1","dist":{"shasum":"7aedc277ce45ac6968578bd9194ad4ed5d4d83bf","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.0.1.tgz","integrity":"sha512-l1nMCADHmZp0e7YxbD6uojn6BpGv7y6iXNIBusFyvE7IfJ/d0CHTAESiidF6on+H5NqBo7iCgDTqQmFBqtwBMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNQ3Dk+tkxEYfd3oQdotmQUitJsUl69EDLRtAT8gabwwIhAPUI2Af+7xAZtmHtVao7taYk4h73cl48YHCoeU87i2Lm"}]},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.0.3":{"name":"telegraft","version":"0.0.3","description":"A node.js orchestration framework","keywords":["deployment","ssh","configuration","remote"],"author":{"name":"JQuarry","email":"dig@jquarry.com"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"main":"./index","bin":{"telegraft":"./bin/telegraft"},"engines":{"node":">= 0.6.x"},"scripts":{"test":"make test"},"dependencies":{"async":"0.1.22","underscore":"1.3.3"},"devDependencies":{"mocha":"*","should":"*"},"readme":"# Telegraft\r\n\r\n[![Telegraft Orchestration Framework](https://dl.dropbox.com/s/rs05ps3ipx5y3yt/telegraft.jpg?dl=1)](http://binocarlos.github.com/telegraft/)\r\n\r\nMinimalistic orchestration manager for [node](http://nodejs.org). [![Build Status](https://secure.travis-ci.org/binocarlos/telegraft.png)](http://travis-ci.org/binocarlos/telegraft)\r\n\r\n```js\r\nvar telegraft = require('telegraft');\r\nvar broadcast = telegraft();\r\n\r\n// make our recording\r\nbroadcast.record(function(){\r\n\r\n\t// announce a scene\r\n\tbroadcast.announce('Getting uptime for all servers');\r\n\r\n\t// actually do something\r\n\tbroadcast.transmit(function(transmission){\r\n\t\ttransmission.modulate('ssh', 'uptime');\r\n\t});\r\n\r\n\t// wait for all servers to finish\r\n\tbroadcast.wait();\r\n\r\n\t// trigger another recording when ready\r\n\tbroadcast.record(telegraft.recordings.service({\r\n\t\tname:'httpd',\r\n\t\taction:'restart'\r\n\t});\r\n\r\n})\r\n\r\n// send out the above recording to some servers\r\nbroadcast.initiate([\r\n\t'server1.mydomain.com',\r\n\t'server2.mydomain.com',\r\n\t'...',\r\n\t'server297.mydomain.com'\r\n]);\r\n\r\n```\r\n\r\n## Installation\r\n\r\n    $ npm install telegraft\r\n\r\n## Features\r\n\r\n  * Manage simultenous sequences of commands across hundreds of servers\r\n  * Healthy library of recording functions (like user, service, file, package etc)\r\n  * Functional architecture - infrastructure as (JavaScript) code\r\n\r\n## Philosophy\r\n\r\n  Telegraft exists to orchestrate complicated sequences of commands that are sent to \r\n  multiple (simultenous) targets.\r\n\r\n  It exists to make the job of distributed server configruation simple.\r\n\r\n## Running Tests\r\n\r\nTo run the test suite first invoke the following command within the repo, installing the development dependencies:\r\n\r\n    $ npm install\r\n\r\nthen run the tests:\r\n\r\n    $ make test\r\n\r\n## License \r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2006-2012 jQuarry &lt;wtf@jquarry.com&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","_id":"telegraft@0.0.3","dist":{"shasum":"7fcac21ae63d38d28b3f8ffc362ca79915311c25","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.0.3.tgz","integrity":"sha512-gUP4er0+FkoqfaJiW2sul2DkrZ96J3cJAMermSNZ+suSFPwWlUjBFwuEhim/PoE/yTbfr+kXe06NBXNvmneTTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxZ6r/L90r6jxxe7FBAMyI7qkN1TqynxYXPWTONlGMTAiEA6cDbapVNnxNENAO0Np/5xupD7XZPLeMeio7TBiyPT7E="}]},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.0.4":{"name":"telegraft","version":"0.0.4","description":"node.js ZEROMQ mesh network","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","node-uuid":"~1.4.0","escape-html":"*","express":"3.x","jade":"*","getsetdeep":"~2.1.0","xtend":"~2.0.3","xmldom":"~0.1.15","css-selector-parser":"~1.0.3","q":"~0.9.3","eventemitter2":"~0.4.11","deck":"0.0.4"},"devDependencies":{"grunt":"~0.4.1","grunt-exec":"*","grunt-contrib-jshint":"~0.4.1","grunt-mocha-test":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-contrib-watch":"~0.3.1","chai":"*","mocha":"*"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, answer){\n\tanswer(new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer('hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nvar time = proxy.send('/api/time', '{arg:838}'');\nvar ping = proxy.send('/api/ping', '{arg:10}'');\n\n/*\n\n\tthe answers are promises\n\t\n*/\ntime.then(function(val){\n\tconsole.log('the time is: ' + val);\n})\n\nping.then(function(val){\n\tconsole.log('the ping says: ' + val);\n})\n\n```\n\n## Running Tests\n\n\tgrunt test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.0.4","dist":{"shasum":"6286d026ca9f36e83bf9b025581bb3cdbf4f542f","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.0.4.tgz","integrity":"sha512-ypp2B185OZPfN6kJCWpWqac6/ubOdoUv6vGDpAfwmRRiGa0y3cOjYoq51ljo2MH+eZBjpAi9u+589w2oLxgGSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKTeI7ZVsk3NojQQVchOqxBSPNIP0G4DV7Vidl3yZQTAIhAOoeKcfcrupLuDYIpgrj+OGrmmZjG18WKpe4UsGLVRS/"}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.0.5":{"name":"telegraft","version":"0.0.5","description":"node.js ZEROMQ mesh network","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","node-uuid":"~1.4.0","escape-html":"*","express":"3.x","jade":"*","getsetdeep":"~2.1.0","xtend":"~2.0.3","xmldom":"~0.1.15","css-selector-parser":"~1.0.3","q":"~0.9.3","eventemitter2":"~0.4.11","deck":"0.0.4"},"devDependencies":{"grunt":"~0.4.1","grunt-exec":"*","grunt-contrib-jshint":"~0.4.1","grunt-mocha-test":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-contrib-watch":"~0.3.1","chai":"*","mocha":"*"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, answer){\n\tanswer(new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer('hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nvar time = proxy.send('/api/time', '{arg:838}');\nvar ping = proxy.send('/api/ping', '{arg:10}');\n\n/*\n\n\tthe answers are promises\n\t\n*/\ntime.then(function(val){\n\tconsole.log('the time is: ' + val);\n})\n\nping.then(function(val){\n\tconsole.log('the ping says: ' + val);\n})\n\n```\n\n## Running Tests\n\n\tgrunt test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.0.5","dist":{"shasum":"a7c1adad8cb28c5505db37d73fc1cad4ad73a134","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.0.5.tgz","integrity":"sha512-/gu1YD/5MO8xxEcpb3PYvZx/AwZRDY8B8uJJl5rzw/EmILA2v3avTmb2mo7gOmDjomCaJoAAuDkIxzrED9aM0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCutqLrgnBZGCaJ0UEZBCHYJrqk//7HXMCkjgxe8AI2kAIgNPtnblQFkAGnDSvZNxJxh7Mwptv5mKBQiUqvMDhQzhY="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.0.6":{"name":"telegraft","version":"0.0.6","description":"node.js ZEROMQ mesh network","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","q":"~0.9.3","deck":"0.0.4","zmq":"2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, answer){\n\tanswer(new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer('hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nvar time = proxy.send('/api/time', '{arg:838}');\nvar ping = proxy.send('/api/ping', '{arg:10}');\n\n/*\n\n\tthe answers are promises\n\t\n*/\ntime.then(function(val){\n\tconsole.log('the time is: ' + val);\n})\n\nping.then(function(val){\n\tconsole.log('the ping says: ' + val);\n})\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","_id":"telegraft@0.0.6","dist":{"shasum":"96820929cb98c95519c02887fc161edf8343c1b2","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.0.6.tgz"},"_npmVersion":"1.1.71","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.0.8":{"name":"telegraft","version":"0.0.8","description":"node.js ZEROMQ mesh network","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","q":"~0.9.3","deck":"0.0.4","zmq":"2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, answer){\n\tanswer(new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer('hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nvar time = proxy.send('/api/time', '{arg:838}');\nvar ping = proxy.send('/api/ping', '{arg:10}');\n\n/*\n\n\tthe answers are promises\n\t\n*/\ntime.then(function(val){\n\tconsole.log('the time is: ' + val);\n})\n\nping.then(function(val){\n\tconsole.log('the ping says: ' + val);\n})\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.0.8","dist":{"shasum":"308222d1a187452e4da19801c8a916b020b5528b","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.0.8.tgz","integrity":"sha512-7ftUBks7AZlH9LpmQlJGdrtUfScPTe3X1v/eVtdu30Cw0eoIh3b1HcDcf1j6/eOF4vk04imRqFdwPUWjmx2k1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR911lAfClHaGzK4huwnzsTcYMvwWKYMdkOqIWeKWuZgIgUy3UFgTlfooJ3Lt1hRd1eVLL11pdGT/Hjn93jV+ZZGw="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.1.0":{"name":"telegraft","version":"0.1.0","description":"node.js ZEROMQ mesh network","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","q":"~0.9.3","deck":"0.0.4","zmq":"2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.1.0","dist":{"shasum":"7689586df99f5a8e8a1415dc38c2d8dcb94f5fb4","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.1.0.tgz","integrity":"sha512-FiWR1+52cswOe94Et8UJh1h37PN+ScShn8qB+GdywKP4EDzSvJMOPXehnTnU6mhSykiYlHNM7aLzUDCTx+2J6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcpAaVmFUgSHxP7nNOfUteMCr/HQT3fDfxKbD+7ENquAiEA5pslN5RyG8jKcbIYYv7xdnaRQ6r1tF6Oo+2FwS9t0OY="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.1.1":{"name":"telegraft","version":"0.1.1","description":"node.js ZEROMQ mesh network","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.1.1","dist":{"shasum":"5246d0da549e06bed313ef63e5fcfa0bf892d58e","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.1.1.tgz","integrity":"sha512-kprYENXxu7Zz95p7VODFBfyummKlGLHTuU+9GFaMuw4p3wGwG4s1CmwTDjlmYQCi3Ov5h+Nk7GvWOZ4tGNMDUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF01/BQCqBvSYSlUHCW8BOdPev933uGkDghxdx28vFiMAiABwFQLFvw4kXDPYet2an2HahCOGLB8YGsyR5UYCNrIMg=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.1.2":{"name":"telegraft","version":"0.1.2","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.1.2","dist":{"shasum":"361453a6dd50147c2a1a3f2ca2d7ec2a46bc1157","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.1.2.tgz","integrity":"sha512-Uh21sm1NGBVPFQlbj0dgeYD70dYlF46jxT9SxiviYQmcZoAdD/T62F9HgsONvNpi7ibGk4bsiPUojovnDOXDww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFPZPjtKBvWl6V1xUlSjS2MHbYs67Jn/NIGXBYpXMVvtAiEA57Arz5K1uyuECc8k7LK4PlwOtS/u9CSt6STNRqe2xiw="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.1.3":{"name":"telegraft","version":"0.1.3","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.1.3","dist":{"shasum":"d55d966aea5ffcfe2b63e8a57728d448a33b7fdf","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.1.3.tgz","integrity":"sha512-UjlW3BGeMpP0hx7NzJmj/iIhdVxsrqEyVa+4b3RAvMEAlkld00WSgppx8NowGz75M0CEVaj9Y3+yttLqj7/N/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3s+KIaiDa4WAB/qkjnZckZs3iLZApGNE4zEkSMbfKqwIhAMMho6BhpSR9AyKBp0+CPax1d0WWZdt4lZixwMFJ30hf"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.2.0":{"name":"telegraft","version":"0.2.0","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.2.0","dist":{"shasum":"0fa1f8d0fb71ca8eb3baac1b6a789347404880bf","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.2.0.tgz","integrity":"sha512-yU77GuLBm72knub63eN/0pVhjdnvWYAWJXOc6o5qOmLPSOzuEQzyn3Oz5jox3/uGIGGywm9PU0fHuOwoQmt+IA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCn8b3GuIo/tdw/GJ1aMX5F+weVKWvD6xN3tql59scZsgIgLojjPjS83EDRtAO798OlfIzQY75esz4exuuzYA4eQ34="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.2.1":{"name":"telegraft","version":"0.2.1","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.2.1","dist":{"shasum":"8ce5e99f467800d917e49e548a4a6296a10f8df6","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.2.1.tgz","integrity":"sha512-qblYl/ONw1TgHJcrH5lwjdkcf/1sCa5WtYWcARLOfGjCCoayMLuihLjuj69knICEAtZXasGVxQBCEXsn+pZ0oA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBIPRG/fyBlpb6z5e3lcRPFPPvpPS8OTSshj97cTxuEVAiEAssxTAAIb1xRcxJizK8NTGMEFBhYUUnomRgg3puSGsXE="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.3.0":{"name":"telegraft","version":"0.3.0","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.3.0","dist":{"shasum":"9971811c046b0e5ad78e121b4a3a780cdef6c233","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.3.0.tgz","integrity":"sha512-Cva62eY1Rx4dA2Qo8k/g8aaZ4CZaNqNhq+d/RcPv2qvEwffWrkT5lIwJsdEsiFFIpZiLsNawbNJMueiMHXKbhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIdJ1XxRzB2hHg8nq96YFZudxmN2nZlPtI9OwbHpCDwAIhAKkYA7Y0OV79MLf0DULHOZwzqcvnnlX0RV0Q423MZXwX"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.3.1":{"name":"telegraft","version":"0.3.1","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.3.1","dist":{"shasum":"4121ca2e7f7cfcb84221509115030c34be21d32f","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.3.1.tgz","integrity":"sha512-jRGp6GptlNt6z4HXJ8B5qX8i8z0tS+mrpA/xHCE5z2wmkPhNNZhV/l52c9Yw9QlnPMOqZEu4FhmA+noel8GbMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICjhU9tmK04SrO0HjiQXhZdRPccpCH1bbe+k52ZBPBs6AiEAyfIrEi0v0o8ohe99wiRs+MXA9zlEP1qRA0w3q/7TNwA="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.3.2":{"name":"telegraft","version":"0.3.2","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.3.2","dist":{"shasum":"7f25fd939cebd4388b2c838881f4107a61c7621d","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.3.2.tgz","integrity":"sha512-QI+Qbf6g5INprrmGsb69+D6Rzc5YR3UlIgwXu4pSOl9eijQvwqJw05CANf3bIc+O4hxM9R2dKYuLjRRssFhh4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIECqO4/bqTWPp0YMI+IOoR5EPRb6Fg6DmYeONfM7LadUAiBeNCwYJBQq5wXgDXh97z3wdTe203e+Qp9l8qrSHyRkGg=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.4.0":{"name":"telegraft","version":"0.4.0","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","bugs":{"url":"https://github.com/binocarlos/telegraft/issues"},"_id":"telegraft@0.4.0","dist":{"shasum":"15b0fb1e2187c6af449f75507b7e25ec032fd5c2","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.4.0.tgz","integrity":"sha512-WgINKMgXCtgTKmIbvImoixUryj/RiTTA6o7l2Qi79+CmsrK+DPdZ/ll1zLWszzbmsFzna3Y0wQXU4sTZBNg/Ig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDeDF+KEQXR3YEJirYmZSx664ulILnT4IAm/2/fnxDkvAiAjH6IZbB3LWWVtov4vv0mb4T1s6D/RetRoofM6upMnZw=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.5.3":{"name":"telegraft","version":"0.5.3","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","_id":"telegraft@0.5.3","dist":{"shasum":"933b6486c3f4a605384ae8f0d3ae6f8324d355c8","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.5.3.tgz","integrity":"sha512-M3ZSWjb71fFKi2JkV8KQ7JJf8cKc1xYuoOH6cFBf3QlHwSuok1aCyfyhqyleYleaToTTgbC7PM2Ra5g1zKLuDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4iIFCb6EijXymkQ5bY+AVa3cKCOYFMw3CN2Np7Z8JJQIhAPm/hwJbC4TXP56eBBqWxgoCDU21VqFw21WjzZJWEcYJ"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.5.5":{"name":"telegraft","version":"0.5.5","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","_id":"telegraft@0.5.5","dist":{"shasum":"2769bc00b978856b8269bd296a7dd7c1ee0e95fd","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.5.5.tgz","integrity":"sha512-SOXxdJD+hkxZ5b5iz/yQ8U8WXWTaPVPKXLCD5QyUDa6CM6RIlRZasl3AAgd0+sCVgmUcSmkQtm8E0fNycvMWyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWukccF2YPPlOpoj2OGKqBl7/IdN078UsD493a82otpgIhAJK/HDMiUZpagjITt+qhsYsTvmXFG6gL/n0rAB6bhtF6"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.5.6":{"name":"telegraft","version":"0.5.6","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","_id":"telegraft@0.5.6","dist":{"shasum":"39f8ce08202c7f156c429e49a940d2a7b9eb322e","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.5.6.tgz","integrity":"sha512-0di+7M7EbSGPQP7LDziu6LGXvKnbFkNGCYBGFRPw81eE+vykiVPi2ZFZch5s1St/6CLnipa6rsLRpNaG7PqJfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+ygMqZMLKWtXOFoWgGatzKKGzi/n458cdCJlRzIojtAiBm6aBovvqIeOZ0xl7my1Ce+8MV9gMYuq5IUU5G438POQ=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]},"0.5.7":{"name":"telegraft","version":"0.5.7","description":"node.js ZEROMQ mesh network","main":"src/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"keywords":["zeromq","rpc","mesh","network"],"dependencies":{"async":"~0.2.7","lodash":"~1.2.0","deck":"~0.0.4","zmq":"~2.4.0","eventemitter2":"~0.4.12"},"devDependencies":{"mocha":"~1.12.0","should":"~1.2.2"},"author":{"name":"Kai Davenport"},"license":"MIT","readmeFilename":"README.md","gitHead":"63625404004489a0a5b0abf6410d4caef629f04d","readme":"telegraft\n=========\nTelegraft is a ZeroMQ and node.js framework which manages sockets to worker processes.\n\n## Installation\n\nYou need to have ZeroMQ on your system:\n\nFor Ubuntu:\n\n\tsudo apt-get libzmq3 libzmq3-dev\n\nThen:\n\n\tnpm install telegraft\n\nNote - if you still get errors installing try:\n\n\tsudo apt-get build-essential\n\n## Usage\n\nFirst - the HQ service that runs the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\ntelegraft.server(endpoints);\n```\n\nThen - a worker process somewhere else on the network:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar timeserver = graft.rpcserver({\n\tid:4548,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56493'\n})\n\ntimeserver.on('request', function (req, reply){\n\n\t// reply is a standard node callback function - error, result\n\treply(null, new Date().getTime());\n})\n\ntimeserver.bind('/api/time');\n```\n\nAnd a different worker process on another server and mounted on a different path:\n\n```js\n\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\nvar pingserver = graft.rpcserver({\n\tid:4549,\n\tprotocol:'rpc',\n\taddress:'tcp://127.0.0.1:56495'\n})\n\npingserver.on('request', function (req, answer){\n\tanswer(null, 'hello world');\n})\n\ntimeserver.bind('/api/ping');\n```\n\nCool - we now have our network running - time to make a client and speak to it (somewhere else on the network):\n\n```js\nvar telegraft = require('telegraft');\n\nvar endpoints = {\n\tserver:'tcp://127.0.0.1:5678',\n\tradio:'tcp://127.0.0.1:5679'\n}\n\nvar graft = telegraft.client(endpoints);\n\n/*\n\n\ta proxy will automatically route based on the path we provide\n\t\n*/\nvar proxy = graft.rpcproxy();\n\n/*\n\n\targs are strings\n\t\n*/\nproxy.send('/api/time', '{arg:838}', function(error, val){\n\tconsole.log('the time is: ' + val);\n});\n\nproxy.send('/api/ping', '{arg:10}', function(error, val){\n\tconsole.log('the ping says: ' + val);\n});\n\n```\n\n## Running Tests\n\n\tmake test\n\n## Licence\nMIT\n","_id":"telegraft@0.5.7","dist":{"shasum":"56c56fa3aa344f53b4cb81ecb11adf42d0bee592","tarball":"https://registry.npmjs.org/telegraft/-/telegraft-0.5.7.tgz","integrity":"sha512-yNCnQrHBy0hySBo9vil4LB8VVMEKEWFoHiwMdAc6UgoCphmb1r7hS31lLmchJiywft66N7zI5ffTgNahlfduvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi8khgduU3dBDT4kw1oaGCi7QW63u76Q7M0hkgrKFw0QIgEbT28MKJgrTs3Nbz5LvLGhvy6MsMj53A7YnZTeLjCkI="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"binocarlos","email":"kaiyadavenport@gmail.com"},"maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}]}},"readme":"[![Build Status](https://secure.travis-ci.org/binocarlos/telegraft.png)](http://travis-ci.org/binocarlos/telegraft)\r\n\r\n\r\n[![Telegraft Server Management](https://dl.dropbox.com/s/rs05ps3ipx5y3yt/telegraft.jpg?dl=1)](http://binocarlos.github.com/telegraft/)\r\n\r\n#telegraft\r\nTelegraft broadcasts configuration and setup tasks to drone servers.\r\n\r\nIt is heavily inspired by the likes of Puppet and Chef but leans much\r\nmore towards Ansible in terms of a serverless deployment mechanism.\r\n\r\n## Installation\r\n\r\n      npm install telegraft\r\n\r\n## Usage\r\nYou use telegraft by broadcasting to listeners.  The listeners are servers and the broadcasts are\r\na sequence of SSH/SCP commands.\r\n\r\nThe first thing we do in any telegraft project:\r\n\r\n\tvar telegraft = require('telegraft');\r\n\r\n### Recordings\r\nNow we want to make a **recording** which is a re-usable function that defines a certain action\r\nto be carried out on a server.  Recordings can use other recordings and because they are just\r\nfunctions, the composition is up to you (powertool!).\r\n\r\nEach recording function accepts a **broadcast** object and will use 2 main functions on it:\r\n\r\n* **record:** logs a command to be carried out on a server\r\n* **wait:** \twaits until the previous commands have finished on ALL servers\r\n\r\nHere is an example of a very basic recording that outputs 'Hello World' to a temp file, waits\r\nand then deletes it.\r\n\r\n\tvar recordingTest = function(broadcast) {\r\n\t\tbroadcast.record('echo \"Hello World\" > /tmp/telegraft.txt');\r\n\t\tbroadcast.wait();\r\n\t\tbroadcast.record('rm -f /tmp/telegraft.txt');\r\n\t};\r\n\r\nTo broadcast this recording to our localhost (it will just use the local shell):\r\n\r\n\ttelegraft(recordingTest).transmit('localhost')\r\n\r\nTo broadcast this recording to remote hosts (you must have SSH keys in place):\r\n\r\n\ttelegraft(recordingTest).transmit('remotehost')\r\n\r\n### Asynchronous Transmission\r\nThe above example is all nice and dandy but a bit pointless on one server - why are we calling wait() in the example above?\r\n\r\nThe power of telegraft comes when you wanted to do the above on 50 servers.\r\n\r\nImagine that it was ESSENTIAL that all 50 servers had written the test file before ANY of them\r\nstart deleting it (I know, it's a simple example but use your imagination for large compilcated\r\ndeployments):\r\n\r\n\ttelegraft(recordingTest).transmit([\r\n\t\t'server1.me.com',\r\n\t\t'server2.me.com',\r\n\t\t'server3.me.com',\r\n\t\t'...'\r\n\t])\r\n\r\nNow you have a wonderfully orchestrated 2 step process of adding then removing a file co-ordinated\r\nacross 50 servers simultenously!\r\n\r\nThe usage pattern that makes this powerful is to have a recording that 'prepares' servers, then waiting\r\nfor all servers to finish preparing and then trigger an update \r\n\r\n### Composition\r\nRecordings are just functions.  The idea is that you can organize recordings and include libraries\r\nof them in any manner you see fit.\r\n\r\nWhen you call broadcast.record - it will behave differently depending on the first argument:\r\n\r\n#### String\r\nThis is the most basic and low level type of recording, it basically represents a single SSH or SCP\r\ncommand.\r\n\r\n\t// send an SSH command down the wire\r\n\tbroadcast.record('ssh', 'uptime');\r\n\r\n\t// send an SCP command down the wire\r\n\tbroadcast.record('scp', '...');\r\n\r\n\t// assume an SSH command if none given\r\n\tbroadcast.record('uptime');\t\r\n\r\n#### Function\r\nThis function will be run and given a broadcast object just like any other recording.  This allows\r\nyou to group commands and include libraies.\r\n\r\n\tbroadcast.record(function(){\r\n\t\tbroadcast.record('echo \"Hello World\" > /tmp/telegraft.txt');\r\n\t\tbroadcast.wait();\r\n\t\tbroadcast.record('rm -f /tmp/telegraft.txt');\r\n\t})\r\n\r\n#### Array\r\nThis will be iterated and each item passed to record.\r\n\r\nThis example uses the 'service' recording from the archive to restart two services in order.\r\n\r\n\tbroadcast.record([\r\n\r\n\t\ttelegraft.archive.service({\r\n\t\t\tname:'httpd',\r\n\t\t\taction:'restart'\r\n\t\t}),\r\n\r\n\t\t// this lets us wait even in array trim\r\n\t\ttelegraft.wait(),\r\n\r\n\t\ttelegraft.archive.service({\r\n\t\t\tname:'myapp',\r\n\t\t\taction:'restart'\r\n\t\t})\r\n\r\n\t]);\r\n\r\n### Making Recordings Useful\r\nIt's always a good idea to have your recording functions wrapped in a closure - this lets you\r\nuse the same recording but with different data (this is how recordings from the archive work).\r\n\r\nTake our example above:\r\n\r\n\tvar recordingTest = function(broadcast) {\r\n\t\tbroadcast.record('echo \"Hello World\" > /tmp/telegraft.txt');\r\n\t\tbroadcast.wait();\r\n\t\tbroadcast.record('rm -f /tmp/telegraft.txt');\r\n\t};\r\n\r\nTo make this more useful:\r\n\r\n\tvar testFileCreation = function(path, content){\r\n\t\treturn function(broadcast){\r\n\t\t\tbroadcast.record('echo \"' + content + '\" > ' + path);\r\n\t\t\tbroadcast.wait();\r\n\t\t\tbroadcast.record('rm -f ' + path);\r\n\t\t}\r\n\t}\r\n\r\n\tbroadcast.record(testFileCreation('/tmp/telegraft.txt', 'Hello World'));\r\n\r\nA classic use case might be to make a recording that uploads some new virtual host config file and\r\nthen restarts apache.\r\n\r\nSo we make a closure that accepts the variables and returns the recording function.\r\n\r\n\t// a closure function that accepts a list of website configs and returns\r\n\t// a function that will record everything on the broadcast\r\n\tvar addVirtualHosts = function(websites) {\r\n\r\n\t\t// here is the return function that will be run by telegraft with a broadcast\r\n\t\treturn function(broadcast) {\r\n\r\n\t\t\t// we want to add the config files for each website\r\n\t\t\tfor(var i in websites) {\r\n\t\t\t\tvar website = websites[i];\r\n\r\n\t\t\t\tvar httpConfigDev = '/etc/httpd/sites-available/' + website.name;\r\n\t\t\t\tvar httpConfigLive = '/etc/httpd/sites-enabled/' + website.name;\r\n\r\n\t\t\t\t// use an archive recording to upload the virtual host config file for this website\r\n\t\t\t\tbroadcast.record(telegraft.archive.template({\r\n\t\t\t\t\tsource:'./templates/apacheVHost', \r\n\t\t\t\t\tdest:httpConfigDev,\r\n\t\t\t\t\tvars:{\r\n\t\t\t\t\t\thost:website.domain,\r\n\t\t\t\t\t\tdocument_root:'/home/' + website.name + '/website/www'\r\n\t\t\t\t\t}\r\n\t\t\t\t}));\r\n\r\n\t\t\t\t// symlink the virtual host file so it loads up\r\n\t\t\t\tbroadcast.record('ln -s ' + httpConfigDev + ' ' + httpConfigLive);\r\n\t\t\t}\r\n\r\n\t\t\t// we want to wait now for all of the configs to be prepared\r\n\t\t\tbroadcast.wait();\r\n\r\n\t\t\t// now we restart all the servers\r\n\t\t\tbroadcast.record(telegraft.archive.service({\r\n\t\t\t\tname:'httpd',\r\n\t\t\t\taction:'restart'\r\n\t\t\t});\r\n\r\n\t\t};\r\n\r\n\t}\r\n\r\nTo use this:\r\n\r\n\tbroadcast.record(addVirtualHosts([\r\n\t\t{\r\n\t\t\tname:\"bob\",\r\n\t\t\tdomain:\"bob.com\"\r\n\t\t},\r\n\t\t{\r\n\t\t\tname:\"dave\",\r\n\t\t\tdomain:\"dave.com\"\r\n\t\t}\r\n\r\n\t]));\r\n\r\n\r\n## Background\r\nTelegraft is a way of remotely configuring servers using SSH.\r\n\r\nIt is inspired heavily by [Ansible](http://ansible.github.com/)\r\n\r\n### Components\r\nComponents at play in a telegraft network:\r\n\r\n* **Transmitter**: the control server(s) that are broadcasting commands\r\n\r\n* **Receiver**: the servers that are recieving commands\r\n\r\n* **Recording**: some work to be done to a server\r\n\r\n* **Broadcast**: sending out a recording to a particular server\r\n\r\n### Usage Flow\r\n\r\n1. The Transmitter (**Tx**) is setup\r\n\r\n2. SSH access from the **Tx** to the Receivers (**Rx's**) is enabled\r\n\r\n3. Recordings are coded and then transmitted to certain Receivers\r\n\r\n4. This results in SSH & SCP commands being co-ordinated in sequence\r\n\r\n5. The broadcast can then summarize what happened\r\n\r\n\r\n## Credits\r\n[JQuarry](http://jquarry.com) follow jquarry on twitter [@quarryjs](http://twitter.com/quarryjs)\r\n\r\n## Licence\r\nLicenced under the [MIT License](http://opensource.org/licenses/mit)","maintainers":[{"name":"binocarlos","email":"bino.carlos@gmail.com"}],"time":{"modified":"2022-07-13T15:58:43.802Z","created":"2012-07-14T15:45:49.017Z","0.0.1":"2012-07-14T15:45:56.944Z","0.0.3":"2012-07-20T12:47:06.606Z","0.0.4":"2013-07-03T08:17:24.053Z","0.0.5":"2013-07-03T08:19:16.406Z","0.0.6":"2013-08-06T11:44:46.331Z","0.0.8":"2013-08-06T12:17:18.985Z","0.1.0":"2013-08-26T10:56:20.861Z","0.1.1":"2013-08-26T10:57:33.766Z","0.1.2":"2013-08-26T16:08:34.571Z","0.1.3":"2013-08-26T18:38:08.575Z","0.2.0":"2013-08-27T09:18:39.110Z","0.2.1":"2013-08-27T10:18:23.333Z","0.3.0":"2013-08-30T20:36:47.292Z","0.3.1":"2013-08-30T20:46:15.043Z","0.3.2":"2013-08-30T21:01:42.806Z","0.4.0":"2013-08-30T21:35:05.225Z","0.5.3":"2013-09-02T10:47:25.603Z","0.5.5":"2013-09-02T13:34:03.008Z","0.5.6":"2013-09-05T22:51:14.755Z","0.5.7":"2013-09-08T17:35:57.873Z"},"author":{"name":"Kai Davenport"},"repository":{"type":"git","url":"https://github.com/binocarlos/telegraft.git"},"users":{"goliatone":true}}