ViralJS
ViralJS copied to clipboard
Improve P2P stability
Currently there is a big chance that establishing connection with P2P will fail because of network cnfiguration.
The issue is to research ways of how stability could be improved. Just getting a 100% stable connection on desktop + android phone from another network (wifi / 3g) is a step forward.
You may be interested in disabling forceDIrect which guarantees direct HTTP delivery if there is a timeout on P2P. Try to increase a timeout to 20 000 https://github.com/PixelsCommander/ViralJS/blob/master/src/client-scripts-templates/thin-client-template.js#L13
One more idea of possible improvement is WebRTC layer which is Socket.IO P2P for now. It could be improved, upgraded or changed.
What about using https://github.com/feross/webtorrent ?
WebTorrent is an amazing piece of engineering however made on other purpose and have longer time before actual transfer and larger footprint.