(Disclaimer: Thes are not my thoughts but was told by Amarnath Raja ,InApp CEO to us during network class...I found it so good that I am writing it down)
IP is an unreliable protocol .It takes its best effort to take the packets to wherever its destined to ...that's it..
We could compare IP to Indian postal system.We send a post mail and we hopes it will reach the receiver (let's assume the postal system takes its best efforts to take it to the receiver).And the postal system works because its unreliable.Lets say tomorrow government decides to make the Indian postal system reliable..Then ,if I have to send a postal mail...I won't be putting the mail in the mail box, but I will be handing over to a person and he should give a receipt of receival for it,then the same procedure has to be followed in each point of transfer of the mail..and there would be at least 5 points where the mail information has to be logged.Think of our postal employees doing the same for the huge no: of mails each day. The system will fail miserable. Just the same way if IP protocol had to made sure reliability in each point of its transfer it would have been a failure.
Now we can see how reliability is attained by using TCP over unreliable IP protocol. Consider I am writing a book consisting of 25 chapters (wow! I am writing a book with 25 chapters..really funny) .I find a publisher and he agrees to print it. We agrees that the content will be sent chapter by chapter over post. I wrote the 1st chapter sends it by post writes the second sends it and does the same for 3,4,5,6 and the publisher receives it (put he doesn't tell me he have got it..why to waste money ). Now something mysterious happens to the 7th packet. I completes the 7th chapter and send to the publisher, but he doesn't receives it.The publisher who is well aware of Indian postal system ignores it and doesn't bother to inform me. While I kept on sending 8th,9th,10th chapters.The publisher receives all these chapters and also receives the missing 7th chapter which he happily keeps it in the correct position .If he had called me for informing the missing of 7th packet he would have wasted a phone call and extra effort of resending the chapter. Now the procedure continues in which 14th chapters gets missed again. The publisher ignores it as usual and continues to recieve other chapters till 20th, now the publisher feels that chapter 14 might have vanished to the black hole of Indian postal system. So he calls me up and tells to send chapter 14 again and sends it. During these time he receives rest of the chapters .When he recieves chapter 14 he puts it in his position . Thus a reliable system of transfer is attained over unreliable postal system. TCP does the same thing. It makes sure the transfer of IP packets in an end to end basis.Inshort it does'nt care about the whareabout of each packets when they are send, but at the end of the session (and even inbetween) checks for missing packets and acts according to it.
Friday, August 29, 2008
emacs:spellcheck
to check for spelling in emacs.press ctrl-space and drag to select the area to be spell checked then give ispell command(M-x ispell).
emacs: preview html page in browser
If you want to preview an html page editing in emacs press
ctrl-c ctrl-v
ctrl-c ctrl-v
Subscribe to:
Posts (Atom)
