Implementing PseudoTcp in Java
Back when protocols for real-time communication were invented, everyone was supposed to communicate directly. If Bob wants to call Alice, they just exchange their IP addresses and the fun could start. Well … that was then. Things are a bit different now because, in the mean time, NATs arrived. Now we all have fake IP addresses and rely on our home gateways to translate them into actual IP addresses.
While most of the time using NATs, they make it rather complicated to establish a direct connection with peers that are also behind NATs of their own. Of course complicated does not mean tricky and people have set out on inventing a bunch of NAT traversal mechanisms such as ICE, STUN, TURN, UPnP, JingleNodes and many others. The thing is that most of these are quite easier to use with UDP rather than TCP.
Well, luckily, most audio/video communication today happens over UDP so that may not seem like a very big deal. However, one service where this is not true is file sharing. When exchanging files with others, you’d normally want for the entire file to reach its destination without losing a single bit. Obviously plain UDP doesn’t fit here.
So! This is where it gets interesting and this is what this project is about. In order to guarantee reliability but still benefit from UDP’s easy NAT traversal, the GoogleTalk developers came up with a tiny TCP variant that works on top of UDP. That protocol is called PseudoTcp and it is part of Google’s “libjingle”.
To sum it all up: the PseudoTcp protocol adds a thin layer on top of UDP in order to guarantee packet reliability.
We would like to make this protocol usable in Java and we would like to add it to our ice4j library.
You like the thought of that? Looking forward to reading your application then!
Contact
[email protected]
Subscribe | View archive
References:
libjingle: Google Talk Voice and P2P Interoperability Library
http://code.google.com/p/libjingle/
Other Jitsi GSoC Projects
http://jitsi.org/index.php/Development/GSoC-XMPP
Other XMPP GSoC Projects
http://wiki.xmpp.org/web/Summer_of_Code_2012
Jitsi Developer Documentation
http://www.jitsi.org/index.php/Documentation/DeveloperDocumentation
The official Jitsi website
http://www.jitsi.org