Reliable UDP
-
HI!! i am developing a download manager utility... that allows us to download files even if the connection is broken... the incomplete files are stored in a tmp file and downloading is resumed after the connection is established...i will have to use reliable udp to ensure that packets are not lost and are deliv'rd in proper order.... i need help regarding implemntation of Reliable UDP... im having RFCS... any article or source code for implemting it will do...thanks! V.G
-
HI!! i am developing a download manager utility... that allows us to download files even if the connection is broken... the incomplete files are stored in a tmp file and downloading is resumed after the connection is established...i will have to use reliable udp to ensure that packets are not lost and are deliv'rd in proper order.... i need help regarding implemntation of Reliable UDP... im having RFCS... any article or source code for implemting it will do...thanks! V.G
There's no such thing. UDP specifies that packets are NOT guaranteed to reach their destination at all let alone in the correct order. What you're specifying is what TCP is for. You could try and implement this all you want in your code, but since the intervening routers and switches won't be implementing your Reliable UDP, you can't possibly make it work. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 15:06 Wednesday 28th September, 2005
-
There's no such thing. UDP specifies that packets are NOT guaranteed to reach their destination at all let alone in the correct order. What you're specifying is what TCP is for. You could try and implement this all you want in your code, but since the intervening routers and switches won't be implementing your Reliable UDP, you can't possibly make it work. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 15:06 Wednesday 28th September, 2005
Dave, I must disagree with you on this. Reliable UDP (Both as a specification, and as a concept) has for quite some time been used in various specialty applications. I've gotten the opportunity to work with UDP reliability extensively in developing a Server-Site Workflow management system. Our version uses ACKs, but there are many different options available in this area. Allow me to quote an excerpt from the following article: http://stackoverflow.com/questions/1200901/why-is-udp-a-software-reliable-ordering-system-faster-than-tcp[^]
"TCP is a stream-oriented protocol, whereas UDP is a message-oriented protocol.
Hence TCP does more than just reliability and ordering.
See this post (http://www.sharpprogrammer.com/networking/comparison-tcp-and-udp-protocol/)
for more details. Basically, the RakNet developers added the reliability and ordering
while still keeping it as a message-oriented protocol, and so the result was more
lightweight than TCP (which has to do more)."If your project is lightweight and doesn't need the bandwidth and CPU associated with multiple TCP connections, then I would suggest using Reliable UDP. However, if your purpose is simply to pass large (1kb+) amounts of data over a steady connection, then TCP is the right way to go.
modified on Friday, October 16, 2009 1:53 PM
-
Dave, I must disagree with you on this. Reliable UDP (Both as a specification, and as a concept) has for quite some time been used in various specialty applications. I've gotten the opportunity to work with UDP reliability extensively in developing a Server-Site Workflow management system. Our version uses ACKs, but there are many different options available in this area. Allow me to quote an excerpt from the following article: http://stackoverflow.com/questions/1200901/why-is-udp-a-software-reliable-ordering-system-faster-than-tcp[^]
"TCP is a stream-oriented protocol, whereas UDP is a message-oriented protocol.
Hence TCP does more than just reliability and ordering.
See this post (http://www.sharpprogrammer.com/networking/comparison-tcp-and-udp-protocol/)
for more details. Basically, the RakNet developers added the reliability and ordering
while still keeping it as a message-oriented protocol, and so the result was more
lightweight than TCP (which has to do more)."If your project is lightweight and doesn't need the bandwidth and CPU associated with multiple TCP connections, then I would suggest using Reliable UDP. However, if your purpose is simply to pass large (1kb+) amounts of data over a steady connection, then TCP is the right way to go.
modified on Friday, October 16, 2009 1:53 PM
You reply to this 4 years later? OK... Yes, it's possible to do, but since UPD doesn't natively support reliability features at the network level they have to be implemented at the application level. In regard to the original poster, he didn't sound like anyone with even a remote grasp of how to implement Sliding Window, or any other app-level protocol for that matter.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...