How Instant Messaging Works Behind the Screen

IM clients aren't as simple as they appear

Instant messaging (IM) programs like WhatsApp and Facebook Messenger deliver billions of messages to people each day. While sending these messages seems instantaneous and seamless, there's much more to it than meets the eye.

While the terms instant messaging and chat are often used interchangeably, they're actually two different things. Instant messaging allows people who know each other to send text-based messages back and forth, while chat takes place in specified "locations" online where people who typically don't know each other can discuss (also using text-based messages) topics of mutual interest.

Choosing an IM Client

How Instant Messaging Works
Brandon De Hoyos

When you first set out to join an IM network, you must choose a client, or program, which creates a connection between your computer and a network server. There are several types of IM clients, including those listed below:

  • Single-protocol - based on a single application
  • Multiprotocol - connects many IM accounts into one interface
  • Web-based - used with an internet browser
  • Enterprise - designed for business use
  • Mobile app - designed for use on a mobile device

Verifying Your Account

How Instant Messaging Works
Brandon De Hoyos

No matter which IM client you use, the steps to connect you to your account and contact list are the same; they typically occur within seconds:

  1. Using your internet connection, the IM client communicates with the network server.

  2. Once the two are connected, you enter your user ID and password to log into the network (you typically create the user ID when you first sign up to join the IM service).

  3. The user ID and password information are sent to the server, which checks to ensure the login information is correct and the account is in good standing.

Viewing Your Account

How Instant Messaging Works
Brandon De Hoyos

After you've signed in, you receive information from the IM client server. Again, all of the following steps happen within seconds:

  1. The server gathers your contact list data, including notifications of which contacts are signed in and available to message.

  2. The server sends the data to your device in multiple units called packets, which are small bits of information.

  3. Your IM client collects, organizes, and presents as live and offline friends on your contact list.

  4. From this point, the collection and distribution of information between your computer and the network's server are continuous and instantaneous, making the speed and convenience of messaging possible.

Sending and Receiving IMs

How Instant Messaging Works
Brandon De Hoyos

With the contact list now open and ready for a communication session, sending an IM is a breeze:

  1. When you double-click a contact name, the client produces a window in which you can communicate with that user. To do so, you type your message in a text field and select or press Enter.

  2. The client breaks your message into packets, which are delivered directly to the recipient's device. As you send messages back and forth, they appear within a split second of being sent.

    In addition to text-based messages, you can transmit video, audio, image, and text files quickly and directly.

  3. If you have IM logging enabled, a history of the conversation is created and stored either directly on your computer or on the network server.

Signing Out

How Instant Messaging Works
Brandon De Hoyos

When you've completed your conversation, you may sign out of your IM client. When you do, it takes steps to ensure you no longer receive messages from contacts:

  1. When you close the IM client, it directs the network server to end your connection.

  2. The server stops any further messages from contacts from being transmitted to your computer or device.

  3. The network also updates your availability to "offline" for your contacts.

  4. Incoming messages are stored as offline messages and you receive them when you sign back into the service.