{"id":32233499,"url":"https://github.com/dhavalw/octopus","last_synced_at":"2026-02-21T03:33:20.968Z","repository":{"id":57313411,"uuid":"145162250","full_name":"DhavalW/octopus","owner":"DhavalW","description":"Lightweight, bi-directional RPC, for Node JS \u0026 browser - with namespaces, and swappable, arbitrary mix of transports !","archived":false,"fork":false,"pushed_at":"2019-03-19T10:32:28.000Z","size":193,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-21T22:44:35.456Z","etag":null,"topics":["bidirectional","browser","javascript","lightweight","microservices","nodejs","rpc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DhavalW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE_MIT","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-17T20:09:31.000Z","updated_at":"2024-02-01T05:55:51.000Z","dependencies_parsed_at":"2022-08-31T00:00:55.036Z","dependency_job_id":null,"html_url":"https://github.com/DhavalW/octopus","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/DhavalW/octopus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DhavalW%2Foctopus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DhavalW%2Foctopus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DhavalW%2Foctopus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DhavalW%2Foctopus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DhavalW","download_url":"https://codeload.github.com/DhavalW/octopus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DhavalW%2Foctopus/sbom","scorecard":{"id":40170,"data":{"date":"2025-08-11","repo":{"name":"github.com/DhavalW/octopus","commit":"72e8031d1fe1bba6e190f02905b03c4ceb22c941"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE_MIT:0","Info: FSF or OSI recognized license: MIT License: LICENSE_MIT:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"50 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-hc9w-4p87-j549","Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h","Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T21:18:48.674Z","repository_id":57313411,"created_at":"2025-08-14T21:18:48.674Z","updated_at":"2025-08-14T21:18:48.674Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280434365,"owners_count":26330348,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bidirectional","browser","javascript","lightweight","microservices","nodejs","rpc"],"created_at":"2025-10-22T12:25:19.897Z","updated_at":"2025-10-22T12:25:25.567Z","avatar_url":"https://github.com/DhavalW.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![octopus image][logo]\n\n[logo]:https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Phantom_Open_Emoji_1f419.svg/240px-Phantom_Open_Emoji_1f419.svg.png\n\n# Octopus RPC\nSuper easy bi-directional RPCs, for Node JS \u0026 the browser, that just work !\n1. Handles an arbitrary mix of transports, including \u003cb\u003esocket.io, Node forked (child) processes, websockets\u003c/b\u003e.\n2. Pluggable architecture, so you can easily add your own custom transports.\n3. RPC Calls are **namespaced** [debug](https://github.com/visionmedia/debug) style ! ( ie \u003cb\u003e\u003ci\u003elocal:child:*\u003c/i\u003e\u003c/b\u003e )\n4. Namespaces can be set dynamically from either end of the connection (calling or providing), at any time.\n\n# In use @ :\n[St8Flo](http://www.st8flo.com)\n\n# Install\nUse below commmand for Node. Browserify can be used to bundle for the browser.\n```\nnpm install octopus-rpc --save\n```\n\n\n# Demo\nSee demo folder for an example - simple microservice style usage with node child process.\n\n1. Clone the repo\n2. Run demo/index.js using Node\n\n# Usage\n#### 1. Create a new RPC endpoint on each participating node\nEach node should add itself under a unique namespace. The namespaces are dynamic, and can be changed from either side of the rpc (ie, calling or providing )\n```javascript\nconst octopus = require('octopus-rpc');\nvar rpc = octopus('local:parent:parent1');\n```\n\n\n\n#### 2. Add RPC commands \u0026 providers.\nProviders are optional.\n\u003cbr\u003eThey are automatically set up across all transports, previously added to the RPC instance.\n```javascript\nconst octopus = require('octopus-rpc');\nvar rpc = octopus('local:parent:parent1');\n\nvar hello = rpc.command('hello');\nhello.provide((data, prev, transportName)=\u003e {\n  // some action here\n });\n```\n\n#### 3. Add transports \u0026 call RPCs with 'debug' like namespace filters !\u003cbr\u003e\nTransports are a standard, direct connection (socket), between 2 participating entities. (for eg: client to server socket).\nCurrently supported transports are \u003cb\u003esocket.io, node forked (child) processes, websockets\u003c/b\u003e.\n\u003cbr\u003e\u003cbr\u003eOctopus expects a ready socket connection and does not handle connection/reconnections. That is left to the user to implement.\n```javascript\nconst octopus = require('octopus-rpc');\nvar rpc = octopus('local:parent:parent1');\n\nvar hello = rpc.command('hello');\nhello.provide((data, prev, transportName)=\u003e {\n  // some action here\n });\n\nconst { fork } = require('child_process');\nconst child1 = fork('child1.js');\nconst child2 = fork('child2.js');\n\nvar tasks = [];\ntasks.push(rpc.over(child1, 'processRemote'));\ntasks.push(rpc.over(child2, 'processRemote'));\n\nPromise.all(tasks)\n.then(()=\u003e{\n  hello.call('local:*', 'aloha')\n    .then((res)=\u003econsole.log(res));\n});\n```\nTransport type | String identifier\n--- | ---\nchild process | 'processRemote'\nSocket.io | 'socketio'\nWebsocket | 'websocket'\n\n\n\n# Full example\nCopied from the demo folder\n\n#### index.js\n```javascript\n\nconst { fork } = require('child_process');\nconst octopus = require('octopus-rpc');\nconst child1 = fork('child1.js');\nconst child2 = fork('child2.js');\n\nvar rpc = octopus('local:parent:parent1');\n\nvar hello = rpc.command('hello');\n\nhello.provide(function (data, prev, transportName) {\n  return 'Parent :- Hey there ! ' + data.from;\n});\n\nvar tasks = [];\ntasks.push(rpc.over(child1, 'processRemote'));\ntasks.push(rpc.over(child2, 'processRemote'));\n\nPromise.all(tasks)\n.then(()=\u003e{\n\n// Data passed to a call can be a value, or a function. If function, it is evaluated for every transport that matches the filter, and the return value of the function is used as data.\n\n  hello.call('local:child:child1',{from:'Parent'})\n    .then((resp) =\u003e console.log('\\n\\nGot \"hello local:child:child1\" response as :\\n',resp));\n\n  hello.call('local:child:child2',{from:'Parent'})\n    .then((resp) =\u003e console.log('\\n\\nGot \"hello local:child:child2\" response as :\\n',resp));\n\n  hello.call('local:child:*',{from:'Parent'})\n    .then((resp) =\u003e console.log('\\n\\nGot \"hello local:child:*\" response as :\\n',resp));\n\n\n});\n\n```\n#### child1.js\n```javascript\nconst octopus = require('octopus-rpc');\nvar rpc = octopus('local:child:child1');\n\nrpc.over(process, 'processRemote');\nvar hello = rpc.command('hello');\n\nhello.provide(function (data, prev, transportName) {\n  return 'child1 :- Hey there ! ' + data.from;\n});\n```\n#### child2.js\n```javascript\nconst octopus = require('octopus-rpc');\nvar rpc = octopus('local:child:child2');\n\nrpc.over(process, 'processRemote');\nvar hello = rpc.command('hello');\n\nhello.provide(function (data, prev, transportName) {\n  return 'child2 :- Hey there ! ' + data.from;\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhavalw%2Foctopus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhavalw%2Foctopus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhavalw%2Foctopus/lists"}