Instant Messengers – Behind the scenes

Saturday, July 25, 2015 Science

A look at how Instant Messengers work

Instant messaging has given a whole new meaning to the term long distance relationships - whether its your dad staying abroad or your girlfriend in a different city. Thanks to IMs you can still be in close proximity even if they are separated by vast distances. If you have ever wondered about the technology that makes this marvelous form of communication possible, then you should not navigate from this page for next few minutes.

So how exactly is your message reaching your beloved ones through the servers spread across the world?

The message is sent via copper and fiber connectors across the world at 2/3rd the speed of light. In effect, the users find no difference in the delay that occurs due to the transmission of messages across servers.


Breaking down the chat system


1) Protocol

For us to communicate with our friends effectively, we need a common language. Similarly, for two programs to communicate with each other they need to connect through a common convention. This is called a protocol.



2) Authentication

In this case in simple terms, the user logon on process is called as authentication.


When you enter your username and password in the instant messaging client and try to login, the server searches its vast database for the username and password combination that you keyed in. If the search is successful, the server lets you know that you have been successfully connected.

Post successful authentication, a connection is established with a communication server by sending your IP and port number.


3) Instant messaging

This is when you click an icon of a friend and start chatting.



Your IP and port details are with the communication server. This server maintains a directory of users along with their IP + Port details. Once you key in a message to your friend and hit the send button, your message is handed over to the chat client. The client identifies the address of the user from the directory on the communication server and routes it to the end user. This entire process happens in 2/3rd speed of light as I mentioned above. This is the underlying principle of how you can send a message within seconds.


4) Notifications

This is when you see notifications when your friend sign in or initiate a chat session with you.



The client frequently sends packets of information to the server inquiring about the status of your buddies and when one of them signs in or goes offline or changes his status, your client is informed with an appropriate signal from the server. Hence you receive notifications of the same.


5) File transfers



When you try to send a picture to your friend, a file transfer is initiated. If the file is with in size limits, the file is uploaded to the communication server. The end user receives a notification about the file upon which he/she can initiate the download from the communication server. Some IMs open a peer-to-peer connection, means you are directly connected to your friend. So this method does not require intervention of a communication server.


6) Call or video chat


The underlying principle behind call or video chat is buffering. Once you press the call button, the request is sent through communication server to your friend. Upon receiving his consent to start the call session, a multimedia communication channel is initiated between both of you. Depending on the speed of the internet connection, the quality of communication (refresh quality, buffer rate) is decided. Then the voice/video data is seamlessly relayed to the communication server which buffers and sends it to the receiver. Since the speed and quality is decided in advance, you do not experience a lag.

 

So now you have an idea of how the complex system works. Happy reading guys!



written by
Arjun M




Feedback