Message switching is a method of communication where messages are transmitted from the sender to the receiver through a series of intermediate nodes or switching centers. Unlike circuit switching, there is no need to establish a dedicated path before communication can occur. Instead, each message is treated as an independent entity and routed through the network based on available paths.
1. Definition and Key Concepts
- Store-and-Forward: Each intermediate node stores the entire message before forwarding it to the next node.
- No Dedicated Path: Messages do not require a dedicated path; they can take different routes to reach the destination.
- Variable Delay: Delay can occur due to the time spent storing and processing messages at each node.
2. How Message Switching Works
Message switching involves the following steps:
a. Message Creation
- The sender composes a complete message, which includes both the data and the destination address.
b. Message Transmission
- The sender transmits the message to the first intermediate node.
- The intermediate node stores the entire message temporarily.
- The node examines the destination address and determines the next node to forward the message to.
- This process repeats until the message reaches the final destination.
c. Message Delivery
- Upon reaching the destination node, the message is delivered to the recipient.
3. Characteristics of Message Switching
- Store-and-Forward: Messages are temporarily stored at each intermediate node.
- Dynamic Routing: Paths are determined dynamically based on network conditions and node availability.
- Variable Latency: Delays can occur due to storage and processing at intermediate nodes.
4. Advantages and Disadvantages
Advantages
- Efficient Use of Resources: Network resources are used only when needed, as there is no dedicated path.
- Flexibility: Messages can be rerouted around network failures or congestion.
- No Call Setup: There is no need for an initial connection setup, reducing the overhead.
Disadvantages
- High Latency: Delays can be significant due to the time spent storing and forwarding messages at each node.
- Complexity: Intermediate nodes require sufficient storage and processing power to handle large messages.
- Unpredictable Delivery Times: Delivery times can vary greatly, which can be problematic for time-sensitive applications.
5. Example of Message Switching
Consider the case of sending an email using a network that employs message switching:
Step-by-Step Example
- Email Composition:
- Alice writes an email to Bob using her email client.
- The email includes both the message content and Bob’s email address as the destination.
- Initial Transmission:
- Alice’s email client sends the complete email to her email server.
- The email server acts as the first intermediate node.
- Store-and-Forward:
- The email server stores Alice’s email temporarily.
- The server processes the email and determines the next hop based on Bob’s email address.
- The email is forwarded to the next intermediate email server along the route to Bob.
- Routing Through Network:
- Each intermediate email server receives the email, stores it temporarily, processes it, and forwards it to the next server.
- This process continues through several servers (nodes) until the email reaches Bob’s email server.
- Final Delivery:
- Bob’s email server receives the email and stores it in Bob’s inbox.
- Bob can now access the email by logging into his email client and retrieving the message from his server.
Analysis of the Example:
- Store-and-Forward: Each email server stores and processes the email before forwarding it.
- Dynamic Routing: The path taken by the email may vary depending on the availability and condition of intermediate servers.
- Variable Latency: Delay can occur at each server, leading to variable delivery times.
6. Applications of Message Switching
- Email: As shown in the example, email systems often use message switching.
- Telegraphy: Historical telegraph systems used message switching to transmit messages between distant locations.
- Data Transfer: Some file transfer protocols and systems use message switching for efficient and flexible data transmission.
7. Comparison with Other Switching Techniques
vs. Circuit Switching:
- Resource Utilization: Message switching uses resources more efficiently by not reserving a dedicated path.
- Latency: Circuit switching provides lower and more predictable latency due to the dedicated path.
- Setup Time: Circuit switching requires an initial setup time, whereas message switching does not.
vs. Packet Switching:
- Granularity: Packet switching divides data into smaller packets, while message switching handles complete messages.
- Efficiency: Packet switching can be more efficient in handling network congestion and errors.
- Latency: Packet switching generally offers lower latency compared to message switching due to smaller units of data being transmitted.
Conclusion
Message switching is a versatile and flexible communication method that efficiently uses network resources by employing a store-and-forward approach. However, it can suffer from higher latency and unpredictable delivery times, making it less suitable for real-time applications. Understanding the principles and applications of message switching helps in designing and managing networks to meet specific communication needs, particularly in scenarios where flexibility and efficient resource utilization are paramount.