
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.
wave-threaded-server
Advanced tools
Full-stack library combining wave-driven server concurrency with client-side routing
A wave-driven concurrency controller for Node.js using Express and worker threads. Designed to adaptively manage load using a configurable wave shape, backpressure, and automatic worker scaling.
Ideal for stateless task processing under fluctuating load using adaptive concurrency control.
npm install wave-threaded-server
const express = require('express');
const {
WaveController,
waveMiddleware,
runStatelessTask,
exposeMetrics,
exposeHealthCheck
} = require('wave-threaded-server');
const app = express();
const wave = new WaveController();
app.locals.taskFn = async (x) => {
// Simulate async computation
await new Promise(r => setTimeout(r, 50));
return x * 2;
};
app.use(waveMiddleware({ waveController: wave }));
// Stateless route (uses worker threads)
app.get('/compute', async (req, res, next) => next());
// Optional: Metrics and health endpoints
exposeMetrics(app);
exposeHealthCheck(app);
app.listen(3000, () => console.log('Server running on port 3000'));
curl http://localhost:3000/compute
WaveController(options)Adaptive concurrency controller.
options.period: Wave period in ms.options.amplitude: Maximum number of workers.options.offset: Phase offset in ms.options.shapeFn(phase): Custom wave shape (optional).waveMiddleware({ waveController, isStateless })Middleware that routes GET/POST differently and applies backpressure queueing.
runStatelessTask(data, waveController)Runs a task in a worker thread with retries and backoff.
await runStatelessTask({ value: 10 }, wave);
exposeMetrics(app, path?)Adds a /metrics route returning wave and worker stats.
exposeHealthCheck(app, path?)Adds a /health route returning a basic health status.
| Name | Description | Default |
|---|---|---|
WAVE_PERIOD | Wave period in ms | 10000 |
WAVE_AMPLITUDE | Max concurrency | CPU count |
WAVE_MIN_THREADS | Minimum concurrency | 1 |
WAVE_LATENCY_TARGET_MS | Target latency | 200 |
WAVE_QUEUE_MAX_SIZE | Max queue size | 1000 |
MIT
FAQs
Full-stack library combining wave-driven server concurrency with client-side routing
We found that wave-threaded-server demonstrated a healthy version release cadence and project activity because the last version was released less than 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.