Show HN: P2p IRC-inspired browser chat on WebTorrent
chr15m.github.io
chr15m.github.io
Presumably, when a new room is created, this has to be broadcast to all users.
Also, i guess every chat line is kind of broadcast to everyone in the room. So how do announce a new line is available?
Many thanks.
So "when a new room is created, this has to be broadcast to all users" is not quite right. A new swarm is created when a user joins a room-hash for the first time and anybody who joins that same room-hash will be introduced to the same swarm. People who have not joined the room-hash will not be part of the p2p swarm.
Currently the hash-based WebRTC signalling that WebTorrent does to introduce peers is quite centralized but the actual communication channels are decentralized. The communication layer is implemented as a WebTorrent "extension protocol" extension. This is the same model dreamtime: https://github.com/chr15m/dreamtime
You are correct that every chat line is broadcast to everyone in the same swarm. In fact, every message is re-broadcast multiple times redundantly by every peer who receives it for the first time, because the WebRTC swarm can be fragmented. Not every peer can directly see every other peer so we must re-broadcast everything to make sure everyone sees each line.
So basically for each room you have a set of peers (browsers) connected together loosely with WebRTC data links and messages between them are sent multiple times redundantly.
Thank you very much for your interest and for trying it out.
I can send message on Chromium but the chatroom seem empty. EDIT: Work on Chromium :)
Waiting for other participants...
On Firefox 61.0.2 Firefox can’t establish a connection to the server at wss://tracker.fastcast.nz/. app.js:15:233483
ICE failed, add a TURN server and see about:webrtc for more detailsThe fastcast.nz error is because that signalling server is down and has been for a while but you can safely ignore it.
The "ICE failed" error might be because you are behind a very restrictive firewall.
Thanks for trying it out!
All people on this site brag of p2p and their technical prowness, yet no one has managed to build a killer p2p chat app. Disgusting!
Probably, they are still debating what programing language to use.
Even the non-p2p open source apps are less polished.
So really it has nothing to do with p2p at all.
It's decent platform for simple sentences and trading emojis/memes I guess.
There are significant computer science challenges when building peer-to-peer software that are much easier to solve when building a centralized system. This may be the reason that people seem to "brag" when they create something p2p - because it is difficult to do - and it may also be the reason why there has not been in your opinion "a killer p2p chat app" yet.
One great thing about WebTorrent is that it makes building p2p software for the web much easier. They have done a great job!