Add Supercomputer category: 12 P2P resource-sharing modules (164 total)

Introduce a new production category for distributed system resource pooling
over Hyperswarm — CPU, RAM, GPU, bandwidth, disk, jobs, cache, and egress.

New modules (supercomputer/):
- hyper-p2p-capacity-registry — gossip CPU/RAM/GPU/disk/bandwidth ads
- hyper-p2p-cpu-share — CPU millisecond credit pool
- hyper-p2p-ram-pool — RAM byte lend/claim/release
- hyper-p2p-gpu-slot — GPU slot register/reserve
- hyper-p2p-bandwidth-share — shared up/down Mbps
- hyper-p2p-disk-stripe — striped block shards
- hyper-p2p-job-dispatcher — submit/claim/complete jobs
- hyper-p2p-thermal-guard — load/temperature throttle signals
- hyper-p2p-cache-farm — distributed LRU cache
- hyper-p2p-net-gateway — peer internet egress routing
- hyper-p2p-cluster-affinity — hardware tag placement scoring
- hyper-p2p-work-stealer — shard queues + work stealing

Each package: index.js, tests, README, api/architecture docs, examples/basic.js.
Shared layering guide: _shared/SUPERCOMPUTER_LAYERS.md.
Registry, module-paths, MODULE_CATEGORIES, and workspace README updated to 164.

Parent workspace also adds docs/supercomputer hub and demo-supercomputer-mesh
(outside this repo).

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 00:38:53 -04:00
co-authored by Cursor
parent 70119888cd
commit 693385bd7c
114 changed files with 24378 additions and 6 deletions
@@ -0,0 +1,23 @@
require('bare-process/global')
const test = require('brittle')
const { HyperP2PWorkStealer } = require('../index.js')
test('work-stealer: push steal', async (t) => {
const w = new HyperP2PWorkStealer()
w.push('shard-a', { op: 'compute' })
const task = w.steal('worker-1', 'shard-a')
t.ok(task)
t.is(w.depth('shard-a'), 0)
await w.close()
})
test('work-stealer: validation', async (t) => {
const w = new HyperP2PWorkStealer()
try {
w.push('s', null)
t.fail('expected throw')
} catch (e) {
t.ok(e instanceof Error)
}
await w.close()
})