Packet Switching vs. Message Switching: Key Differences Explained
Advertisement
This article delves into the differences between packet switching and message switching. We’ll also touch upon the differences between circuit switching and packet switching. Before diving in, it’s recommended to familiarize yourself with the basics of circuit switching vs. packet switching.
Let’s imagine data communication between a source machine and a destination machine, connected by three routers. (The number of routers can vary in real-world scenarios.)
Message Switching
Figure 1 illustrates the operation of message switching.
Figure 1: Message Switching
As you can see, each router waits to receive the entire message before forwarding it to the next link. This process repeats at each router along the path.
In message switching:
Total Transmission Time =
Where:
- = Number of Hops
- = Propagation delay per hop
- = Number of packets representing each message
- = Time for transmitting each packet
- = Time for transmitting the complete message =
Packet Switching
Packet switching can be considered a specialized form of message switching. It emerged with the advancement of computer communication and networking. In packet switching, the message is broken down into smaller units called packets.
This allows each router to begin transmission as soon as the first packet arrives, saving a significant amount of time, especially when the number of hops between source and destination is high and therefore the propagation delay is more significant.
Figure 2 shows how packet switching works.
Figure 2: Packet Switching
In packet switching:
Total Transmission Time =
Packet Switching vs. Message Switching: A Detailed Comparison
Let’s summarize the key differences between packet switching and message switching.
Figure 3: Packet Switching vs. Message Switching
-
Overhead: Message switching generally has lower overhead compared to packet switching. In message switching, a single datagram is transmitted, with a header appended to the entire message. In packet switching, the message is divided into smaller packets, and each packet has its own header.
Overhead in message switching =
Overhead in packet switching = , where
-
Reliability and Complexity: Message switching typically offers higher reliability and lower complexity. In message switching, a single datagram is either received or lost, following a single network path. Packet switching, on the other hand, allows packets from the same source and destination to take different paths. This means packets might arrive out of order, requiring sequencing based on sequence numbers embedded in the header. While packet switching may lose or corrupt only a subset of the message (instead of discarding the entire message like message switching), it introduces complexity in reassembling the original message. Based on the integrity of the overall received (possibly corrupt) message, an effort can be made to “interpret” what the original message should have been. Due to this characteristic, message switching may not be suitable for real-time scenarios like voice communication.
-
Time Efficiency: As explained earlier, message switching generally takes more time than packet switching. This is because the entire message must be stored at each hop point until it’s completely received before being forwarded.