3 ms·
Neither this project, nor its predecessor are p2p. In essence both are centralized WebRTC signaling servers/services. Sadly both WebRTC and WebSockets seem to
by lostmsu 3y ago
Neither this project, nor its predecessor are p2p. In essence both are centralized WebRTC signaling servers/services.
Sadly both WebRTC and WebSockets seem to have been designed in such a way that excludes pure peer-to-peer operation.
- gfodor 3y agoAuthor here, obviously not. The goal of the project isn't to try to solve a problem that can't be solved, it's to reduce the effort needed to set up a WebRTC signaling server. The "P2P" here is referring to the peer network that is established via the signaling.
- junon 3y agoI had this exact idea a few months back and wondered if anyone had done this. Nice job :)
- LargeTomato 3y agoThank you for your very clear, no nonsense response.
- at0mic22 3y agoPure P2P node discovery is practically impossible. You can use DHT till some extent, but initial discovery will be done using some traditional peer tracker
- lostmsu 3y agoYou could do scanning and/or broadcasting.
- at0mic22 3y agoYou'd have to know the subnet at least
- lostmsu 3y agoYou will know your subnet if you are allowed to use STUN servers. Although it also hints to my original complaint about WebRTC being designed in a way that makes p2p hard for no good reason.
- timmattison 3y agoYou knowing your subnet is not the issue. The other party needs to know it. WebRTC needs info about where to try to connect. It doesn’t specify the signaling method which is how you get that information and share it. If you’re already on the same subnet, use mDNS. If you’re on different subnets it requires some kind of way to share the subnet info. If you’re on different networks behind NAT then scanning isn’t very helpful. You’d need to scan IPs and ports because NAT randomizes the outbound ports. That’s what STUN helps you figure out. Once you’ve got that info and you build the session description structure you can send that to the other party however you want. Public, free STUN servers exist. And people use them for all kinds of WebRTC stuff. Neither WebRTC nor WebSockets prevent pure P2P. It sounds like your bigger issue is with NAT. IPv6 isn’t going to fix it though since the IP space will be too large to scan for peers.
- lostmsu 3y ago> You knowing your subnet is not the issue. The other party needs to know it. You misunderstood, knowing subnet is an option for discovery of nearby peers. If you know your subnet you can scan it in reasonable amount of time. Otherwise you'd have to scan the whole IPv4 space (or worse IPv6 space). > WebRTC needs info about where to try to connect. It doesn’t specify the signaling method which is how you get that information and share it. Yes. > If you’re already on the same subnet, use mDNS. You can't - you are in the browser. > If you’re on different subnets it requires some kind of way to share the subnet info. Yes, that's how connections are established with an intermediary signaling service. The p2p question is about possibility of establishing WebRTC connection without a signaling service that runs over something else and/or requires a centralized server.
- 3y ago
- jzm2k 3y ago>Sadly both WebRTC and WebSockets seem to have been designed in such a way that excludes pure peer-to-peer operation. What do you mean by pure peer-to-peer operation?
- lostmsu 3y agoWhen there's no need for a central server(s) to establish connection.
- jzm2k 3y agoIs there any P2P network that fits that criteria? The first time you connect, you need to know at least one publicly reachable node but I fail to see how that relates to WebSocket/WebRTC. I think central server is somewhat ambiguous because the bootnode could be any node on the network you have prior knowledge of.
- lostmsu 3y agoAs I mentioned in the sibling, there's multicast/broadcast (classic multiplayer games used it) and you could do IP scanning.
- jzm2k 3y agoI still don't understand what this has to do with WebRTC/WebSocket. You can combine, e.g., mDNS with WebRTC and build a pure peer-to-peer network.
- lostmsu 3y agoYou can't use mDNS in the browser. The standards are carefully defined in a way that creates server dependency. WebSocket outright does not allow connections to other browsers directly. WebRTC does, but you are extremely limited in how you could do discovery. I think both are intentional.