Massive Supercomputer pass: mesh factory, compute-shard, fabric depth
Turn the category into a production-ready unified virtual supercomputer. New: - _shared/supercomputer-mesh.js — createSupercomputerMesh() wires all 14 modules - hyper-p2p-compute-shard — round-robin workload sharding across cluster peers cluster-fabric: - canFit, broadcastSnapshot, completeClusterRun - cluster-snapshot gossip; fix RAM lend on publishNode Pool modules — introspection helpers: - capacity-registry: meetsRequirements, exportClusterView, listPeerIds - cpu-share: totalPool, hasBalance - ram-pool: lendMb, listLenders, availableBytes, listLeases - disk-stripe: reassemble, clusterDiskBytes - job-dispatcher: listJobs, runningCount, cancelJob - gpu-slot: reserveCount, clusterGpuSlots - bandwidth-share: clusterMbps - net-gateway: bestGateway, totalCapacityBytes - thermal-guard: throttledPeerIds, healthyPeerIds - cluster-affinity: bestPeer - work-stealer: totalPending, stealFromBusiest - cache-farm: has, keys Docs: SUPERCOMPUTER_LAYERS, category README, cluster-fabric api.md Examples: demo-supercomputer-mesh uses createSupercomputerMesh Registry: 166 modules (14 supercomputer) Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -67,6 +67,20 @@ class HyperP2PGpuSlot extends EventEmitter {
|
||||
|
||||
freeSlots () { return this.listSlots().filter((s) => s.state === 'free') }
|
||||
|
||||
reserveCount (n, peerId = null) {
|
||||
const out = []
|
||||
for (const slot of this.freeSlots()) {
|
||||
if (out.length >= n) break
|
||||
const r = this.reserve(slot.slotId, peerId)
|
||||
if (r) out.push(r)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
clusterGpuSlots () {
|
||||
return { total: this._slots.size, free: this.freeSlots().length, reserved: this._slots.size - this.freeSlots().length }
|
||||
}
|
||||
|
||||
async ready () {
|
||||
if (this.swarm || !this.topic) return this
|
||||
await initModuleSwarm(this, {
|
||||
|
||||
Reference in New Issue
Block a user