Circuit switching is the most appropriate technique for continuous transmission of data between source and destination. However, there are some drawbacks as listed below:
- • Source and destination must be available at the time of data transfer.
- • Nodes and links must be available in advance before the start of transmission and dedicated
- • Until the data transfer is completed.
When the source station does not have enough data to transmit continuously, resources are unnecessarily kept idle for the duration of time when there is no transfer of data. To avoid such situations, a different switching method called message switching is used. In this switching method, no dedicated physical path is established in advance. Instead, it is based on a technique called store and forward switching. When the source station has a message block to send, it is stored in the first switching node. Each node in the network is an electronic switching device. Nodes are equipped with enough buffers to hold the incoming message. As soon as a free channel is seized, the first node sends a copy of the stored message to the next node on the path through the communication channel, just seized. At each hop, the message is examined for errors. The message hops from one node to another node until it reaches the destination.
• A message is a logical unit of information and can be of any length.
• In message switching, if a station wishes to send a message to another station, it first adds the destination address to the message.
• Each message is treated as an independent unit.
• In message switching, each complete message is then transmitted from device to device through the internetwork i.e. message is transmitted from the source node to intermediate node.
• The intermediate node stores the complete message temporarily, inspects it for errors and transmits the message to the next node based on an available free channel and its routing information. Because of this reason message switched networks are called store and forward network as shown in fig.
• The actual path taken by the message to its destination is dynamic as the path is established as it travels along.
• When the message reaches a node, the channel on which it came is released for use by another message.
• As shown in Figure message Ml is transmitted from A to D and M2 is transmitted C to B. Message Ml follows the route A --> I --> II --> III --> D and M2 follows the route C --> IV --> II --> B depending upon the availability of free path at that particular moment.
• The first electromechanical telecommunication system used message switching for telegrams. The message was punched on paper tape off-line at the sending office and then read in and transmitted over a communication line to the next office along the way, where it was punched out on paper tape. An operator there tore the tape off and read it in on tape readers.
Advantages of Message Switching
The various advantages of message switching are:
• Efficiency is improved by sharing a single channel by many messages.
• Source and destination stations are not simultaneously required to be ready. The network can store the message in case the receiver is not ready.
• Message switching systems can transmit single message to several destinations; however, in circuit switching this facility is not permitted.
• Message transfer is possible even when the transfer rates of the source and destinations differ circuit switching does not support this feature.
• Storing or re-routing the message may be used to restore it from node or link failure occurring during data transfer.
The primary drawback of message switching is that it is not suitable for real time or interactive traffic. It is not suitable for voice transmission.
Disadvantages of Message Switching
The various disadvantages of message switching are:
1. As message length is unlimited, each switching node must have sufficient storage to buffer message.
2. Storing & forwarding facility introduces delay thus making message switching unsuitable for real time applications like voice and video.
Delay in message switching:
• A message switched network consists of store-and-forward switches interconnected by trunks. A single trunk is usually sufficient between a pair of switches.
• Multiple trunks can be provided to increase reliability. Each switch is equipped with a storage device wherein all incoming messages are temporarily stored for onward transmission.
• The basic operation of the store-and-forward service is similar to the telegram service. A message along with the destination address is sent from switch to switch till it reaches the destination.
• Let us say end system A wants to send a message to end system B as shown in Fig. A sends its message along with the address of the destination and its own address to entry switch 1. The addresses are included in the header of the message.
• Switch 1 accepts the message and analyzes the destination address. A routing table is maintained at each node.
• It contains entries indicating destination nodes and the corresponding outgoing trunks from the switch. There is a separate queue for each trunk.
• Since the destination node may be accessible via more than one route, decision to send the message to a particular next switch depends on the expected delay in its queue. Let us say, the message from A is put in the queue for node 2.
• The message received at switch 2 is again put in a queue of messages awaiting transmission to switch 4. When its turn comes, the message is sent to switch 4 which delivers it to the destination.
• Some of the basic features of store- and-forward message switching are:
• The store-and-forward service is unidirectional. After delivery of the message, the network does not send back any confirmation to the source. If end system B is required to send an acknowledgement to the message received from A, the acknowledgement is treated like any other message by the network and carries the addresses of the destination and the source.
• For switch -to- switch transfer of the message, the network may employ some error control mechanism. The message may be appended with error-checking bits and if any error is detected by the receiving switch, it may request the sending switch for retransmission of the message. Therefore, the sending switch is required to keep a copy of the message till an acknowledgement is received.
• Since the message is stored in a buffer at the switch at each stage of transmission, each switch-to-switch transfer is an independent operation. The trunks can operate at different data rates. Even the source and destination end systems can operate at different data rates.
• In message switching every message is treated as an independent entity by the network and, therefore, destination and source addresses are repeated on each message.
• Delay in Delivery. Fig shows the timing diagram for routing a message through a message switched network. The message passes through the entry switch, two transit switches and finally through the exit switch to arrive at the destination.
Message delivery time is the sum of the following components:
• Time required sending the message to the entry switch
• Switch delay
• Transmission time at each switch.
• The time required to send a message to the entry switch IS determined by the transmission data rate and the message size.
• Propagation time to the entry switch is usually negligible. Switch delay is due to two factors :
1. Message processing at each switch (time required for error checking, routing etc.)
2. Waiting time in the queues at each switch.
• The transmission time at each switch is determined by the transmission data rate and propagation p time for transmission across the trunk.
• The total time required to deliver the message is the linear sum of all these components of time as they occur in a sequential manner.
• The delivery time varies from message to message because of random waiting times in queues and alternate routes between the same pair of entry and exit switches.
• Therefore, time relationship of the messages and their sequence are not guaranteed in a message switched network.
• As traffic increases there is increase in message delivery time; because the queues get longer and there may be congestion on the route.