UDP file transfers (Was: Re: [dcc2] Other comments)
Craig Edwards
brain at winbot.co.uk
Wed Jun 30 02:33:07 EDT 2004
i agree on this,
after trying for months to write a udp based *reliable* network protocol for another application we resorted to udp. Reliability of UDP is too bad for this kind of work. What happens for example if you not only lose a packet but also lose the acknowledgement of that packet too? :)
Craig
>Jeremy Iverson wrote:
>> If we're talking about allowing UDP at the connection-negotiation
>> level, I think that would be a good thing. Although it is unreliable,
>> there are some applications where this doesn't matter (and hence, why
>> UDP exists).
>
>I agree... Especially for video/audio etc.
>
>myndzi wrote:
>> I don't think UDP is needed but it is available so I use it in
>> examples. It wouldn't be hard to number all the UDP packets, assemble
>> them in the file out-of-order, and check a hash or something I
>> suppose. In a file transfer getting the packets in order is NOT a
>> concern. [..]
>
>I really think *file transfers* over UDP is a bad idea.
>Besides:
>- I doubt it would be actually used
>- I doubt it will be implemented by people
>
>There are also some "real arguments" (which semi-result in the 2
>points mentioned above).
>
>When I think of UDP I think about streams/games/..: realtime data
>communication where data may be lost and most of the time (but not all
>the time) should not be retransmitted (think: games - player/object
>positions, realtime video/sound, etc). In this case it's actually better
>than TCP because useless retransmits would only delay the rest of the
>data stream.
>
>Now for file transfers where obviously the file would need to be
>received 100% correct it makes no sense to use UDP.
>
>- UDP packets can be send out-of-order, lost, etc, thus it would
> require _another_ protocol on top of UDP which basically redoes TCP.
> - This is a lot of work
> - You are semi-guaranteed to miss things
> - There's quite a big potential for (security) bugs
>- It really makes more sense to use a stateful protocol here that has
> been in use and has proven to be functioning fine for over >20 years.
>
>The only argument I heard pro- UDP filetransfers is that on some networks
>UDP transfers would be possible but not TCP... I doubt this is often the
>case. But furthermore, I don't believe this argument is so enormous more
>valid than all the concerns I just mentioned. Note that it's not always
>"the more options, the better".
>
>Basically, based on the arguments I heard and thought of, I think
>implementing UDP filetransfers is a waste of time and is guaranteed
>to fail.
>
>Regards,
>
> Syzop.
>
>PS: Obviously I'm not writing this just to flame people to death,
> rather I try to share my views and experience here hoping to
> prevent certain (design) "mistakes". Then again, why would
> anyone think otherwise? ;)
>
>_______________________________________________
>dcc2 mailing list
>dcc2 at dcc2.org
>http://six.pairlist.net/mailman/listinfo/dcc2
>
More information about the dcc2
mailing list