[Standards-JIG] File sharing JEP

Scott Ludwig scottlu at google.com
Sat Apr 8 08:09:09 UTC 2006


> I think there is one big problem with file transfers and Jingle - Jingle is
> UDP. You need to have your own* way to take care of lost packets, flow
> control and everything. You are unable to optimize the size of one packet to
> the maximum nonfragmenting size on the whole way, since you can not operate
> with most packet flags as a normal user. TCP does this all, but the problem
> is, it can not be STUNed and must be relayed trough the proxy. However, I
> think it is a bad approach to the situation using UDP for file transfers, we
> should instead want IPv6 and direct connection access for everyone.
>
> *) Well, I count libraries here as well, since it is something that act's like
> the application's code. The TCP layer is the system itself and is a lot
> easier to use that some weird library. What you need to do when you use TCP:
> optain a socket, connect it and start sending data, without any need to care
> about how they will get there. With the library, you need to cary it with the
> application or check, if it is installed. You need to negotiate with the
> library and everything.

Given two peers each behind a firewall or NAT, UDP can be used to
create a direct non-relayed connection between them a high percentage
of the time. This is valuable because:

(1) the peers can transmit at the bandwidth available to them without
being limited by relay thottling.
(2) the infrastructure and bandwith costs of relaying is reduced
because the relay service only needs to handle the small percentage of
cases left over where a direct connection cannot be established.
(3) the direct connection means less latency (compared to relay) for
real time data.

In the case of file transfer, #1 and #2 are valuable properties of the
UDP approach. The reliability can be handled by a TCP like layer on
top of UDP. For reference, there is code in libjingle that does this.



More information about the Standards mailing list