Wednesday, June 24, 2009

UDP is Important

UDP (User Datagram Protocol) is a protocol which allows systems to send information. UDP is the quick and dirty way to transfer information, it does not use hand shakes (like TCP), it simply fires-and-forgets. Messages send by UDP are said to be transaction oriented, meaning that delivery and duplication protection are not guaranteed. This means that by using UDP to send a message anywhere from 0 to infinite amount of the same message maybe received by the receiver.

Often it is taught in school to think of UDP as junk mail, a junk mailer normally does not care if a piece of junk mail arrives at a home, instead the junk mailer cares about getting out a lot of mail at low costs. I prefer to think of UDP as an elderly man that does not have a good memory, often times this man will tell stories not knowing that they he has already told this story to the listener. The old man wants to convey some type of message (we hope), and to do this he tells a story. A young man listens to the story and normally will be polite (we hope) and allow the old man to tell the story even if he has already heard it. The old man could be thought of as UDP and the story as the packet being delivered. In this example the stories can be told to the young man 0 to infinite amount of times (we hope not infinite).

So, what good is UDP and why is it important? Well sometimes in order to save bandwidth and time a system will opt to use UDP over other protocols (like TCP) in order to transfer information. This is often used in application where a lot of data is being sent but if packets are lost or duplicated it is no big deal. Streaming media is an example of an application that would use UDP, most user are willing to accept a few blups in their Dramatic Chipmunk streaming video or their streaming "Beat It" by Michael Jackson on Grooveshark.

So why is UDP important? Well UDP is the protocol used by DNS (Domain Name System). So why is DNS important, well DNS is what allows you to use the internet. DNS translate the URL http://comp-phil.blogspot.com/ into 74.125.95.191 which is the IP address of comp-phil.blogspot.com. If it wasn't for DNS you would have to type in 72.21.210.250 every time you wanted to buy a book from Amazon. So you can say that UDP is important because DNS is import and DNS uses UDP.