p2p-lobby
v0.1.1
Published
A type safe lobby system built on IPFS
Downloads
17
Readme
P2P Lobby (Demo)
A type safe lobby system built on IPFS.
Install
$ npm i p2p-lobby
Use in the browser
Bundle with browserify
$ npm run build:dev
or use the CDN
<!-- Development Build ~9MB -->
<script src="https://unpkg.com/p2p-lobby/umd/bundle.js"></script>
<!-- Production Build ~1.3MB :'( -->
<script src="https://unpkg.com/p2p-lobby/umd/bundle.min.js"></script>
Everything will be exposed under the global variable p2p
.
To be fixed
- No guarentee that all the peers are ready once the host ready's up
- Peers may still be introducing themselves to one another.
- When a
peer
that is waiting innode
's room leavesnode.peers
won't have access thepeer
's name- Since
node.allPeers
still has the name, butpeer
is no longer onnode.allRooms.get(LOBBY)
- Add a way to grab peers in current room!
- Safe Ready Up
- Ensure all the hashes are good when everyone ready's up and wait 2 poll interval cycles if not
Roadmap
- Reduce bundled file size
- Remove redundant deps
- Build for multiple targets
- Use as a libp2p package instead of ipfs wrapper
- Use Proto instead of msgpack.
- Upgrade to a smaller async emitter
- Use UInt8Array over Buffers
- joinPeer should require confirmation from them host
- use a namespace instead of an instance since it should be a singleton tbh
Publishing
$ npm run release -- patch