Introduction to message switching
Message switching is a data-transfer method in which the complete message is the routing unit. An intermediate node receives the message, stores it in a buffer, selects the next hop from the destination address, and forwards the complete unit only after that.
A message crosses a sequence of nodes without reserving a fixed end-to-end path. Each node keeps the complete unit until its outgoing link is available, so delay depends on the number of hops and queueing time. The model suits services that tolerate deferred delivery; it does not provide the delay required by interactive voice or video.
Store-and-forward mechanism
The message-switching mechanism is . Each intermediate node performs the following sequence of actions:
- Receive: The node receives the entire message from the preceding node.
- Store: The complete message is placed in memory or persistent storage, depending on the system requirements.
- Inspect and select a route: The node reads the message header and destination address, then selects the next hop from available routes and link state.
- Forward: The node waits for the outbound link to the next hop to become available. Once the link is free, it transmits the complete message onward.
This process is repeated at every node along the path until the message reaches its final destination.
Advantages and disadvantages
Advantages
- Shared links: Communication links are shared among many messages rather than dedicated to one session. A link is occupied for the message transmission time and can then serve another queued unit. This differs from .
- Traffic handling: Buffering can absorb short traffic bursts and postpone transmission until an outgoing link is available. Buffers are finite, so sustained congestion increases queueing delay and can cause messages to be discarded.
- Message prioritization: Storing complete messages lets an implementation place them in priority queues when that feature is provided. An urgent message can then be sent before less urgent messages.
Disadvantages
- Delay: At every hop, the complete message must be received and stored before forwarding begins. Transmission time grows with message length, hop count, and queueing, so the method does not suit voice calls or videoconferences.
- Variable delivery time ():The time a message spends in each node's buffer depends on traffic and queue order. Different messages can therefore arrive with different end-to-end delays.
- Storage requirements: An intermediate node needs memory or persistent storage for each complete message in its queue. Large files occupy more space and reduce the number of units that can be held simultaneously.
Historical context and current use
Message switching was used in early telegraph networks and telegram systems. An operator or node received a complete dispatch, stored it, and transmitted it over the next link. A related store-and-forward model appeared in early computer mail systems, including networks using UUCP (Unix-to-Unix Copy).
General IP networks use a packet-switched model that divides application data into smaller units. A node can forward a packet before receiving the rest of the message, reducing per-hop storage and the wait for a complete message. Asynchronous services such as electronic mail still queue and relay complete messages. With packet switching, the wait for a complete message is replaced by per-packet processing, while buffer demand depends on packet size, queue depth, and traffic. Interactive services can use this model, but quality depends on queueing, loss, and the transport protocol.