Friday, December 4, 2009

Application Protocools

The chapter I'm currently reading discusses common *clears throat Application Protocols! I could list all of the ones I learned but that would be a very long post as the last one and it wouldn't benefit anyone. So here's the ones that I didn't know about before. So TCP and UDP both carry data around. I never understood the difference until now. So when you send data across a network using TCP the data is broken into segments and numbered so when the other application recieves the data it can piece it back together. The nice thing is TCP is reliable since it waits for confirmation from the recieving application on the arrival on a packet and retransimits if there isn't a confirmation. The problem with TCP is since it is complicated with all of it's checks it requires more resources than UDP.

UDP also is used for data transmission but unlike TCP it is basically a bare bones version of it. UDP doesn't segment data or follow through to see if the data arrived. This of course makes UDP less reliable but it uses less resources than TCP. One reason you would want to use UDP vs TCP is in multiplayer video games. A lot of games use UDP for their games and this is probably why. In video games data is constantly being updated. Everything is done in real time. There isn't any time to check if my bullet blew that guys head off. The instant I press that button that guy has to be dead. Another reason is the server handling the game would have to work more handling TCP connections from multiple players all sending information that would be irrelevant in less than a second.

That's it for now.

Tune in next week for the amazingly long and boring blog posts by Steve! the Network Admin (in learning).

2 comments:

  1. Great post! It is also true that many applications (I'm not sure about your game) do their own validation checking instead of using TCP to do it, so they use UDP.

    Streaming media uses UDP for obvious reasons. When listening to a phone call or watching a video, it doesn't matter much if you frame or bit of sound gets dropped, but pauses would be intolerable. I'm still not sure how bad if a bullet to the head just disappeared, however ;-)

    ReplyDelete
  2. Honestly I'm not all that sure if all games UDP for their games and if TCP is really resource intensive but I just thought it would be a somewhat good example. Actually your example is the same one used in the book. Copycat.

    ReplyDelete