When you join a room the room name is hashed and you join a WebTorrent swarm based on that hash. So it's a collection of WebRTC peers who are connected to eachother based upon the shared hash of the room name. Not every peer is connected to every other peer.
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.
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 details
The WebRTC signalling can take a long time (I've seen up to 2 minutes) because your browser has to find a way that other browsers can tunnel in to your network. Once you're connected messages seem to go through fairly quickly.
The 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.
I like it! You might consider reformatting the description to be more like /nick handle // sets handle because it's kind of confusing with the = for those that don't use irc much.
Thanks for your feedback! I agree, WhatsApp is an amazing piece of software with a great user interface & UX.
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!
[+] [-] yazr|7 years ago|reply
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.
[+] [-] chr15m|7 years ago|reply
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.
[+] [-] tomxor|7 years ago|reply
[+] [-] maeln|7 years ago|reply
I can send message on Chromium but the chatroom seem empty. EDIT: Work on Chromium :)
[+] [-] m-p-3|7 years ago|reply
[+] [-] chr15m|7 years ago|reply
The 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!
[+] [-] thatcat|7 years ago|reply
[+] [-] chr15m|7 years ago|reply
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] tribesman|7 years ago|reply
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.
[+] [-] veli_joza|7 years ago|reply
It's decent platform for simple sentences and trading emojis/memes I guess.
[+] [-] chr15m|7 years ago|reply
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!
[+] [-] askz|7 years ago|reply
[+] [-] nickik|7 years ago|reply
Even the non-p2p open source apps are less polished.
So really it has nothing to do with p2p at all.
[+] [-] boramalper|7 years ago|reply