Sunday, March 27, 2011

Tutorial 3: Understanding the Internet

In this tutorial i will try to explain in simple way how the internet works.
You might wonder what happens in the background when everyday you use your browser to see your favorite web pages. What does it exactly happen when you press the enter button after writting the web page in the address bar?




First lets start with a little of terminology. It's easier to understand when we separate the components.
We have the hardware, this includes cables, routers, servers, satellites, etc..
The internet is always changing, it might add new members every day and disappear others, the backbone of the internet is usually this members that remain fairly static during time. We as users serve as end points of the internet, the term for this end points is clients. Machines that store the information we seek on the internet are called servers.

All this hardware would be useless without the second component: protocols. Protocols are like set of rules that computers follow to complete tasks. It is necessary for the internet that all machines have a common set of protocols, so that communication can happen. So the protocols provide a method and a common language for machines to interact and transfer data.

The protocol that we use the most is the http wich stands for hypertext transfer protocol. This is the one that we use when we use our web browser searching for web pages.

Moreover, the two most used protocols are TCP and IP. These two protocols set the rules on how information passes through the internet. Thanks to them, you don't need a direct connection with another computer to "talk" to it.

Furthermore, all machines connected to the internet have an IP address which follow the IP protocol.
As logical as it may sound this IP address helps you find other computers in the internet and makes you discoverable.

Going back to our example, when you press enter in the web browser, your computer sends this data that you typed using TCP/IP protocols to a DNS (Domain name server). The domain name server, as the name implies, is a server where it is stored the address of thousands or millions of web pages. When you type a name into the address bar, your computer don't know what that piece of text is, remember that machines have an IP address. So when your piece of text gets to the DNS, this server will find the IP address of the web page you typed, and then will request directly the data to the found IP address.

 Another important information i would like to talk in briefly is  packets. When your web browser requests a web page, the server of the web page won't send all the information at once, the data is divided in packets. This packets are little pieces of the whole. They will be send to you, traveling across the internet, packets might even take different paths to reach the destination. Each packets has a header and a footer, and when arrived to the destination all the data will be put together in the right order, like doing a puzzle, in this case it would make you see the web page you requested.

Your computer does the same when you send a file to a friend over MSN, the data is divided in packets and send separately.


Finally i want to talk a bit about VOIP. When you talk with someone over skype, your also sending packets of information which will contain a piece of the video or voice. Conversations don't need a perfect transmition. What i mean is that when your talking with someone over skype you don't mind if you see for a moment a distorted picture or you see a missing pixel, what you care is that the conversation is done effectively. The TCP protocol talked before is a connection oriented protocol, what this means is that it will try to send all the packets without missing any of them. If one gets damaged it will request it again till it arrives its destination. This is useful when downloading a game, you need all the data or it just wont get installed. But when doing conversations you dont care if a packet get lost in the way. That why Skype uses UDP which is a connectionless protocol. With this protocol you don't know if the data will arrive to the destination, its like fire and forget.





I hope that with this tutorial you got to understand the basic terms and somehow understand how the internet works!

 I would like to recommend you to watch this lecture of a Harvard course that helped me understand all this !

Lecture



Sources:


Source 1


Source 2

Source 3



Thanks to skullbox.net for the picture of UDP!

No comments:

Post a Comment