0.1.1 • Published 7 years ago
p2p-lobby v0.1.1
P2P Lobby (Demo)
A type safe lobby system built on IPFS.
Install
$ npm i p2p-lobbyUse in the browser
Bundle with browserify
$ npm run build:devor 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
peerthat is waiting innode's room leavesnode.peerswon't have access thepeer's name- Since
node.allPeersstill has the name, butpeeris 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