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]>
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