Message switching is a network communication technique in which data is transmitted in discrete units called messages. Each message is a self-contained entity with a header containing the source, destination, and other routing information. Unlike circuit switching, which establishes a dedicated end-to-end path, and packet switching, which breaks data into smaller units, message switching employs a "store-and-forward" approach at each intermediate node.
How It Works
In a message-switched network, when a sender wishes to transmit data, it compiles the entire data into a single message. This message is then sent to the nearest intermediate node (or switch).
- Store: The intermediate node receives the entire message and stores it completely in its memory (buffer).
- Inspect: Once the message is fully received and stored, the node inspects the destination address in the message header.
- Route: Using its routing table, the node determines the next hop for the message towards its destination.
- Forward: The entire message is then transmitted to the next appropriate intermediate node.
This process repeats until the message reaches its final destination. No dedicated physical path is established, and the path taken by a message can be dynamic, varying based on network conditions.
Characteristics
- Store-and-Forward: This is the defining characteristic. Each intermediate switch must receive, store, and then retransmit the entire message.
- No Dedicated Path: Messages do not require a pre-established connection; each message is routed independently.
- Variable Message Size: Messages can be of arbitrary length, limited only by the buffer capacity of the switches.
- Dynamic Routing: Switches can make routing decisions on a message-by-message basis, allowing for adaptability to network congestion or failures.
- Delay: Due to the store-and-forward nature and potentially large message sizes, there can be significant delays at each hop.
- Buffering Requirements: Intermediate nodes require large buffer capacities to temporarily store entire messages.
Advantages
- Efficient Bandwidth Utilization: Multiple messages can share the same communication links, as links are not reserved for a single connection. This allows for statistical multiplexing.
- Network Robustness: Dynamic routing provides resilience against network failures; if one path is down, messages can be rerouted through alternative paths.
- Traffic Prioritization: Messages can be prioritized based on their content or destination.
- Protocol Conversion: Intermediate nodes can perform protocol or data format conversions, allowing heterogeneous networks to communicate.
- No Call Setup Time: Unlike circuit switching, there is no overhead for establishing a dedicated circuit.
Disadvantages
- Significant Delays: The store-and-forward mechanism, especially with long messages, introduces considerable end-to-end delay, making it unsuitable for real-time applications (e.g., voice, video).
- Large Storage Requirements: Each intermediate node must have sufficient memory to store entire messages, which can be substantial if messages are long.
- Congestion: If multiple messages arrive at a node faster than they can be processed and forwarded, buffers can overflow, leading to message loss.
- Not Suitable for Interactive Applications: The inherent delays prevent effective interactive communication.
Comparison with Other Switching Techniques
- Circuit Switching: Establishes a dedicated, continuous physical path between sender and receiver for the duration of the communication. Offers guaranteed bandwidth and low delay once the circuit is established, but is inefficient if the circuit is idle, and requires call setup time. Message switching does not require a dedicated path.
- Packet Switching: Breaks messages into smaller, fixed-size or variable-size "packets." Each packet is routed independently, and packets belonging to the same message might take different paths. Packet switching also uses store-and-forward but for smaller units, leading to much lower delays and more efficient resource utilization than message switching. Packet switching largely superseded message switching for modern data communication. Message switching can be seen as a precursor to packet switching.
Historical Context and Applications
Message switching was a prominent technique in early telecommunication networks, particularly in the telegraph and telex systems. It was well-suited for non-real-time communication where delays were acceptable, and efficient use of expensive transmission lines was paramount. Examples include early military communication systems and the ARPANET before it fully adopted packet switching. Today, message switching has been largely replaced by packet switching for most data communication, but the store-and-forward concept remains fundamental in various forms (e.g., email systems, where a server stores a message until the recipient retrieves it).