{"id":13515312,"url":"https://github.com/javiergarmon/hermod","last_synced_at":"2026-01-10T08:05:59.904Z","repository":{"id":15228246,"uuid":"17956916","full_name":"javiergarmon/hermod","owner":"javiergarmon","description":"Blazing fast communication between Node.js processes","archived":false,"fork":false,"pushed_at":"2015-09-27T00:45:16.000Z","size":240,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-25T22:57:49.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"swoodford/linux","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javiergarmon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-20T20:11:19.000Z","updated_at":"2015-02-04T19:55:03.000Z","dependencies_parsed_at":"2022-09-26T20:30:30.338Z","dependency_job_id":null,"html_url":"https://github.com/javiergarmon/hermod","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiergarmon%2Fhermod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiergarmon%2Fhermod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiergarmon%2Fhermod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javiergarmon%2Fhermod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javiergarmon","download_url":"https://codeload.github.com/javiergarmon/hermod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246418657,"owners_count":20773934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:09.297Z","updated_at":"2025-03-31T04:36:50.451Z","avatar_url":"https://github.com/javiergarmon.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\n# hermod\n\nBlazing fast communication between Node.js processes\n\n## How to install hermod\nYou can install hermod using Node Package Manager (npm):\n```\nnpm install hermod\n```\n\n## Features\n* Supports Request/Reply communication.\n* Supports Send without Reply communication.\n* Supports multiple server using round robin.\n* Fault tolerant: clients will reconnect to servers even if server goes down and comes back later.\n* Extremely fast (disables TCP Nagle's algorithm).\n* Zero dependencies on other libraries.\n* Block non-desired IPs.\n\n## Examples\n### Request/Reply: Server with one client\n#### Server\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create server\n  var server = hermod.createServer( 8000 );\n\n// Listen petitions\n  server.on( 'hello', function( name, callback ){\n    callback( null, 'Hi ' + name + ', I am the server' );\n  });\n\n```\n#### Client\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create client\n  var client = hermod.createClient( 8000 );\n\n// Make a petition\n  client.request( 'hello', 'John', function( error, response ){\n    console.log( 'Server says', response );\n  });\n```\n\n### Request/Reply: 2 server with one client (Round robin)\n#### Server 1\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create server\n  var server = hermod.createServer( 8000 );\n\n// Listen petitions\n  server.on( 'hello', function( name, callback ){\n    callback( null, 'Hi ' + name + ', I am the server 1' );\n  });\n\n```\n#### Server 2\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create server\n  var server = hermod.createServer( 8001 );\n\n// Listen petitions\n  server.on( 'hello', function( name, callback ){\n    callback( null, 'Hi ' + name + ', I am the server 2' );\n  });\n\n```\n#### Client\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create client\n  var client = hermod.createClient( 8000, 8001 );\n\n// Make a petition\n  client.request( 'hello', 'John', function( error, response ){\n    console.log( 'Server says', response );\n  });\n```\n\n### Send: Server with one client\n#### Server\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create server\n  var server = hermod.createServer( 8000 );\n\n// Listen petitions\n  server.on( 'hello', function( name ){\n    console.log( 'I received a message from ' + name' );\n  });\n\n```\n#### Client\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create client\n  var client = hermod.createClient( 8000 );\n\n// Make a petition\n  client.send( 'hello', 'John' );\n```\n\n### Block non-desired connections from unknown IPs\n#### Server\n```js\n// Modules\n  var hermod = require('hermod');\n\n// Create server\n  var server = hermod.createServer(\n\n    8000,\n    null, // Host definition, use falsy values for autoconfiguration\n    [ '127.0.0.1', '192.168.1.42' ] // Accepted IPs. If it isn't defined all IPs are accepted.\n\n  );\n\n// Listen petitions\n  server.on( 'hello', function( name ){\n    console.log( 'I received a message from ' + name' );\n  });\n\n```\n\n## Benchmarks\nYou can see benchmark results in https://github.com/javiergarmon/hermod-benchmark\n\n## Changelog\n* 0.0.5 ( 2014/06/26 ): Limit connections for specific IPs. Support host definition in server.\n* 0.0.4 ( 2014/04/02 ): Optimized and `send()` method support.\n* 0.0.3 ( 2014/04/02 ): Optimized and better documentation.\n* 0.0.2 ( 2014/04/02 ): Optimized and prevent chuncked commands.\n* 0.0.1 ( 2014/03/20 ): First version.\n\n## To Do List\n* Support encrypted communications\n* `shout()` client method\n* `close()` client method\n* Authentication support\n* Middleware support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviergarmon%2Fhermod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaviergarmon%2Fhermod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaviergarmon%2Fhermod/lists"}