Ämne:[dcdev] ADC already obsolete?
Från:Gustaf Räntilä <[email protected]>
While reading planet gnome, I saw an interesting article about peer to peer communication behind NATs. As I believe it's what's being used for games and applications such as Skype. The technique is easy but comes with a drastic drawback - it works only for UDP (as far as I know). I know that I need not to tell anybody here about the wonderful features of TCP, but as I see it, most of these features can be mimicked on UDP. It all comes down to agreeing upon a strategy and policy for how to guarantee the arrival, uniqueness, and order of the packets. This should not require very many hours, and the use of hashes as we are familiar with now, might be helpful. For those who don't know how p2p between two NAT:ed hosts works, here's an extract from the NAT RFC: /NATs should not change the number of UDP ports used by a stream of packets./ And the idea is: Let's say we have two NAT:ed peers, "P1" and "P2", and an ADC hub "H". P1 wants to connect to P2, and sends a UDP packet to P2. This packet will be "dropped" at P2's NAT, but P1's NAT now automatically accepts incoming UDP packets from P2 from now on. P1 also sends a (adc-tcp) request to the hub, which tells P2 to send a UDP packet back to P1, the same way P1 did. Now P2's NAT accept UDP packets from P1, and this latter packet sent by P2 to P1 will be received. From now on, the UDP packets sent between P1 and P2 will be received, as long as their NAT's don't mess around too much (this is not a _completely_ safe method, but is being widely used by many protocols if I've understood it correctly). Connections between two NAT:ed peers is a requirement for a protocol like ADC to not be obsolete upon its release, since this is the way to go, for today's protocols. What this will require from us is a layer above the UDP which gives us what TCP already has given us, as well as a new protocol message (besides CTM and RCM). I just wanted to raise this as a topic, wondering if anyone else is interested in it. I simply like the idea of anyone being able to connect to anyone else. Opera-- DC Developers mailinglist http://3jane.ashpool.org/cgi-bin/mailman/listinfo/dcdev