Files
modules/routing-advanced/hyper-p2p-sticky-session
Raven ScottandCursor 24a9fde231 Enrich module APIs with snapshot and batch helpers across categories.
Adds snapshot(), domain batch methods, and clearAll aliases on consensus, core, encoding, experimental, indexes, messaging, network, oracle, pear, routing, storage, supercomputer, and trust modules.

Co-authored-by: Cursor <[email protected]>
2026-05-21 03:53:48 -04:00
..
2026-05-20 23:36:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-20 22:56:32 -04:00
2026-05-21 00:07:44 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 21:57:50 -04:00
2026-05-20 22:56:32 -04:00

hyper-p2p-sticky-session

Session to peer bindings with gossip sync.

Protocol: sticky-session/v1

When to use

  • User/session affinity to a specific worker or storage peer.
  • Replicated binding tables on a Hyperswarm topic.

When not to use

  • Stateless round-robin (use load-spread).
  • Global leader election.

Quick start

const { HyperP2PStickySession } = require('hyper-p2p-sticky-session')
const ss = new HyperP2PStickySession({ topic: 'sessions' })
await ss.ready()
ss.bind('user-42', 'peer-7')
console.log(ss.resolve('user-42'))
await ss.close()

Docs

Test

npm install && npm test