IRC Protocol Services and Architecture

This blog discusses about the IRC Protocol Services and its Architecture

IRC Protocol Services

The main services provides by the IRC Protocol are:

  1. Client Locator
  2. Message Relaying
  3. Channel Hosting and Management
Figure: IRC primary Services

1. Client Locator

To be able to exchange messages, two clients must be able to locate each other. Upon connecting to a server, a client registers using a nick and user-name which is then used by other servers and clients to know where the client is located.

2. Message Relaying

All the messages are relayed through the server(s) in their way. This is explained with examples in the Architecture section below.

3. Channel Hosting and Management

Channels are hosted and managed by the servers like: ChanServ is a server responsible for all kind of channel related services. The things like channel modes and access control, channel operators and other users, channel creation and deletion etc. are all done by the servers.

IRC protocol Architecture

An IRC network is defined by a group of servers connected to each other. A single server forms the simplest IRC network. The overall network of IRC servers and their clients look like a spanning tree where each server acts as a central node for the rest of the network it sees.

Figure: Simple spanning Tree of the IRC Network

Message Relaying Concept

The message relaying through IRC network can be classified in the following three ways:

  1. One-to-One Communication (Unicast)

Example 1 : A message between clients 1 and 2 is only seen by the server A, which sends it straight to the client 2.

Example 2 : A message sent between clients 2 and 4 is seen by the servers A, B, C, D and client 4 only.

Figure: Unicast, Multicast and Broadcast

2. One-to-Many Communication (Multi-cast)

  • To a single Channel
  • To a list of Channels

3. One-to- All Communication (Broadcast)

  • Client to Server
  • Server to Server
Thanks for Reading!