Understanding the basics of Internet communications
| Line 77: | Line 77: | ||
All this computers are sharing the same medium and channel of communication, this means that the information that is send by one computer is received by the rest of the computers, if PC1 need to send a message to PC2 the Ethernet protocols tell to the computer that it only can transmit if the network is in total silence (no ongoing transmissions), when the silence is detected PC1 waits a small random amount of time and transmit the information to PC2, actually when the silence is detected in the network all the computers who need to send information wait a small random time to avoid the possibility to transmit the same time, but eventually with hundred of transmissions per second collisions happens, then any computer of the network who detects this collision floods the network with a collision detected signal which is something like a continuous coach whistle until every body makes silence, then all the computers are forced to go silence and waits a small random time to try to transmit the information again. | All this computers are sharing the same medium and channel of communication, this means that the information that is send by one computer is received by the rest of the computers, if PC1 need to send a message to PC2 the Ethernet protocols tell to the computer that it only can transmit if the network is in total silence (no ongoing transmissions), when the silence is detected PC1 waits a small random amount of time and transmit the information to PC2, actually when the silence is detected in the network all the computers who need to send information wait a small random time to avoid the possibility to transmit the same time, but eventually with hundred of transmissions per second collisions happens, then any computer of the network who detects this collision floods the network with a collision detected signal which is something like a continuous coach whistle until every body makes silence, then all the computers are forced to go silence and waits a small random time to try to transmit the information again. | ||
| − | + | Network hubs are old network devices who receive a message in one port and re-transmit this information to all the other ports, this devices got replaced by network switches who don't re-transmit the information to the all the other port, instead the network switch determiner what is the correct port that needs that information and send the information only there, this small detail makes the network dramatically faster and almost free of collisions. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
[[Image:Communication_problems_meme_20120922.png|thumb|c|Wi-Fi routers have to deal with communication collisions all the time]] | [[Image:Communication_problems_meme_20120922.png|thumb|c|Wi-Fi routers have to deal with communication collisions all the time]] | ||
| − | + | Computers networks based in Wi-Fi technology can also suffer of collisions because they use as transmission medium electromagnetic waves, some people think that Wi-Fi router uses the air as a medium which is wrong, anyone can transmit a Wi-Fi signals here on earth or the space which have no air at all, electromagnetic waves travel by their own. Wi-Fi devices uses advanced algorithms and methods to avoid and solve collisions as much as possible, Wi-Fi is a technology who uses several ranges of electromagnetic waves frequencies to transmit information this allow communication between several devices using separated channels, but sometimes 2 or more devices tries to use the same channel an a collision happen, the recovery algorithm detect that the received information is corrupted and issues a re-transmission order. Wi-Fi networks normally works good under several circumstances and a considerable amount of connected devices but the problems arrives when several Wi-Fi networks are too close to others, in this case the network users could experience a degradation in the network speed among other problems. | |
| − | + | ||
[[Category:Tutorials]] | [[Category:Tutorials]] | ||
[[Category:Development]] | [[Category:Development]] | ||
Revision as of 00:19, 23 October 2012
Contents |
Introduction
When a person browse a webpage with it web browser, this person don't care how Internets actually works, how the computers manages to connect to Internet, or how the browsers manages to display all that text and images of taht webpage, all this details are "transparent" for the user (he don't care or notes a difference) as long as everything works the way it should, but any developer have to learn some basic concepts and principles about how computers communicates trough Internet to be able to troubleshot any common communication problem that any web developer will face every day.
Concepts about computer communications
Let review the following concepts before address some theory about computer communications
Transparent
In the context of computers communications the term "transparent" means that one systems is "unaware" of other systems, for example, Internet is a data service that perfectly runs on a cable connection or wireless connection, the cable connection uses a communication protocol called "ethernet" and the wireless connection could run in several wireless protocols such as wi-fi, wi-max, bluetooth, etc, but at the end the Internet service is the same and it information is not altered by any of those protocols. In this order of ideas we can say that the communication protocol is transparent for the Internet service and vice versa.
Parts of the communication process
Any communication process have few basic elements that need to be present to be able to send a message from one point to another, this parts are:
- Message: Is the information that should travel from one point to another.
- Transmitter: Is the starting point element who wants to send a message.
- Receiver: Is the ending point element who receives the message.
- Channel: Is the transmission method used on a specific medium
- Medium: Is the material, substance or electromagnetic wave used to transmit the information
In the computer communication context, the message is the binary information that needs to transmitted, the transmitter and receivers could be any of the computers connected to the network, the medium of transmission could be a cable, optic fiber, infrared light and electromagnetic waves (radio transmissions), and the channel is the transmission method implemented on that specific medium.
The concept of "communication channel" and "communication medium" could be tricky because they depend on the context and some people confuse them as the same thing, for example a FM radio broadcasts uses electromagnetic waves as a "medium" but the "channel" are those electromagnetic waves at a specific frequency (transmission method), in the context of human voice communications we use the voice to transmit messages (channel) and the air is our medium, with no air voice waves can't travel.
In a more specific and scientific level we can say that voice waves are changes in the pressure of the air, this changes of pressure are actually energy propagating in a substance, in our case this substance is the air which is normally composed by a mixture of gases such as oxygen and hydrogen. knowing this we can say now that voice communications uses energy propagation as communication channel and gases as communication medium.
Communication and transmission modes
Some transmission mediums are able to handle communications in several directions and also handle several communications channels same time, for example:
- The Optic fiber called "mono mode" who only allows data transmission light in only one way, this mode of communication is called unidirectional communications and the transmission mode is called unidirectional transmission.
- Ethernet cooper cables are able to handle tow way communications using 4 cooper cables, this mode of communications is called bidirectional communications and the transmission mode is called bidirectional transmission.
- A Wi-Fi router uses microwaves to transmit information to one or more devices using several ranges of microwave frequencies and the devices can send information back to the router using microwaves at a specific frequency each, the medium is electromagnetic waves and the channels are the electromagnetic waves at different frequencies, this kind of communications are called bidirectional communications and the transmission mode is called omnidirectional transmission because electromagnetic waves can travel in all directions.
- FM radio stations uses omnidirectional radio antennas to broadcast to any device in the range, this kind of communications are called unidirectional communications and the transmission mode is called omnidirectional transmission because electromagnetic waves can travel in all directions.
- Some companies got directional microwave antennas to transmit information between only 2 buildings, this kind of communications are called bidirectional communications and the transmission mode is called Directional transmission because electromagnetic waves are focused to one point and direction.
Resuming we got:
- Unidirectional communications = 1 message can be transmitted at a time.
- Bidirectional communications = 2 messages can be transmitted at the same time.
- Unidirectional transmission = Energy can propagate in one direction.
- Bidirectional transmission = Energy can propagate in 2 directions.
- Omnidirectional transmission = Energy can propagate in all directions.
- Directional transmission = Energy is focused in one particular point and direction.
Communication protocol
A protocols is a set of rules to keep order and control, well educated people learn at school basic rules for communication, if 2 people speak the same time none of them will understand to each other, this is called a communication problem, that is why one person speaks and the other listen, then the other person waits for it turn to speak back. This same concept is applied by computers.
Computer communications protocols defines the step and methods to follow to achieve a successful communications between 2 or more computers, this protocols also include algorithms to recover the communication process from several kinds of fault states after any communication problem.
Communication collisions
This is a common problem that happens when the computers shares the same medium and channel of communication and try to transmit information the same time, when this occur the information got corrupted and all transmissions are automatically stopped until the problem is solved by the protocols algorithms.
For example, 5 computers are connected to a Ethernet network using Ethernet cables connected to a network hub, as indicated in the following figure:
+-----+ +-----+ +-----+ +-----+ +-----+
| PC1 | | PC2 | | PC3 | | PC4 | | PC5 |
+-----+ +-----+ +-----+ +-----+ +-----+
| | | | |
| | | | |
| *---* | *---* |
| | | | |
*--------* | | | *--------*
| | | | |
| | | | |
+--------------------+
| HUB |
+--------------------+
All this computers are sharing the same medium and channel of communication, this means that the information that is send by one computer is received by the rest of the computers, if PC1 need to send a message to PC2 the Ethernet protocols tell to the computer that it only can transmit if the network is in total silence (no ongoing transmissions), when the silence is detected PC1 waits a small random amount of time and transmit the information to PC2, actually when the silence is detected in the network all the computers who need to send information wait a small random time to avoid the possibility to transmit the same time, but eventually with hundred of transmissions per second collisions happens, then any computer of the network who detects this collision floods the network with a collision detected signal which is something like a continuous coach whistle until every body makes silence, then all the computers are forced to go silence and waits a small random time to try to transmit the information again.
Network hubs are old network devices who receive a message in one port and re-transmit this information to all the other ports, this devices got replaced by network switches who don't re-transmit the information to the all the other port, instead the network switch determiner what is the correct port that needs that information and send the information only there, this small detail makes the network dramatically faster and almost free of collisions.
Computers networks based in Wi-Fi technology can also suffer of collisions because they use as transmission medium electromagnetic waves, some people think that Wi-Fi router uses the air as a medium which is wrong, anyone can transmit a Wi-Fi signals here on earth or the space which have no air at all, electromagnetic waves travel by their own. Wi-Fi devices uses advanced algorithms and methods to avoid and solve collisions as much as possible, Wi-Fi is a technology who uses several ranges of electromagnetic waves frequencies to transmit information this allow communication between several devices using separated channels, but sometimes 2 or more devices tries to use the same channel an a collision happen, the recovery algorithm detect that the received information is corrupted and issues a re-transmission order. Wi-Fi networks normally works good under several circumstances and a considerable amount of connected devices but the problems arrives when several Wi-Fi networks are too close to others, in this case the network users could experience a degradation in the network speed among other problems.
