
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
hydra-plugin-rpc
Advanced tools
Create and consume remote procedure calls in hydra with ease.
$ npm i --save hydra-plugin-rpc
Two methods are added to the hydra instance to add or consume methods
// hydra.methods(obj: Object);
// Object has keys of method names and values of functions.
hydra.methods({
methodName: (arg1, arg2, arg3) => arg1 + arg2; // return value or Promise
});
// hydra.call(methodName: String, ...arguments) => Promise
// First argument is method name.
// Remaining arguments are sent to method (must be serializable).
// Returns a promise with the result.
hydra.call('methodName', arg1, arg2, arg3).then(...);
// Service1.js
const hydra = require('hydra');
const HydraRPC = require('hydra-plugin-rpc');
const Promise = require('bluebird');
hydra.use(new HydraRPC());
hydra.init({...}).then(() => {
hydra.methods({
ping: () => 'pong',
sleepPing: delay => Promise.resolve('pong').delay(delay) // optionally return promises
});
});
// Service2.js (even works on separate machines!)
const hydra = require('hydra');
const HydraRPC = require('hydra-plugin-rpc');
hydra.use(new HydraRPC());
hydra.init({...}).then(() => {
hydra.call('ping').then(result => console.log(result)); // Logs "pong"!
hydra.call('sleepPing', 1000).then(result => console.log(result)); // Result comes back after 1000 ms!
});
FAQs
simple distributed RPC using Hydra
We found that hydra-plugin-rpc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.