Implementation Issues
The preceding chapter was left intentionally vague in certain ways. In particular, no explicit description of the use of a timer or timers within an IRTP module was given, nor was there a description of how timer events should relate to "retransmission events". This was done to separate the syntactic and operational requirements of the protocol from the performance characteristics of its implementation.
It is believed that the protocol is robust. That is, any implementation which strictly conforms to Chapter 4 should provide reliable synchronization of two hosts and reliable sequenced transfer of transaction data between them. However, different ways of defining the notion of a retransmission event can have potentially significant impact on the performance of the protocol in terms of throughput and in terms of the load it places on the network. It is up to the implementor to take into account overall requirements of the network environment and the intended use of the protocol, if possible, to optimize overall characteristics of the implementation. Several such issues will be discussed in this chapter.
5.1 Retransmission Strategies
The IRTP requires that a timer mechanism exists to somehow trigger retransmissions and requires that the packet with sequence number snd_una be the one retransmitted. It is not required that retransmission be performed on every timer event, though this is one "retransmission strategy". A possible alternative strategy is to perform a retransmission on a timer event only if no ACKs have been received since the last event.
Additionally, the interval of the timer can affect the performance of the strategies, as can the value of MYRCV and the lossiness of the network environment.
It is not within the scope of this document to recommend a retransmission strategy, only to point out that different strategies have different consequences. It might be desirable to allow using processes to "specify" a strategy when a port is claimed in order to tailor the service of the protocol to the needs of a particular application.
5.2 Pinging
It is important to make explicit that IRTP modules ping by definition. That is, as long as a remote internet address is known, and is in use (that is, either synchronization or data transfer is being attempted), the protocol requires "periodic retransmission" of packets. Note that this is true even if the IRTP module has determined that the remote address is currently unreachable.
It is suggested that this situation can be made more sensible by adding two fields to the connection table. These are:
num_retries (number of times current packet has been sent)
time_out (current retransmission timeout)
These fields are to be used as follows. It is assumed that there is some default initial value for time_out called DEFTIME, some (relatively long) value for time_out called PINGTIME and some value MAX_TRIES. The exact values of these constants are implementation dependent. The value of DEFTIME may also be retransmission strategy dependent.
At the time that a connection table is initialized, num_retries is set to zero, and time_out is set to DEFTIME. Whenever a retransmission event occurs (this will either be a retransmission of a SYNCH packet or of the packet with sequence number snd_una), num_retries is incremented by one unless it is equal to MAX_TRIES. If a destination is determined to be unreachable, either via an ICMP message or a Destination Host Dead message, num_retries is set to MAX_TRIES. Whenever num_retries transitions to MAX_TRIES, either by being incremented or as above, the destination is is presumed unreachable and user processes are notified. At this point, time_out is set to PINGTIME, the state of the connection does not change and retransmissions occur at PINGTIME intervals until the destination becomes reachable.
Conversely, whenever a SYNCH_ACK is received (in synch_wait state), or an (implicit or explicit) acknowledgment of sequence number snd_una is received (in data transfer state), time_out is set to DEFTIME and num_retries is reset to zero. If time_out was already set to PINGTIME, user processes are notified that the destination is now reachable.
The effect of this system is obvious. The implementation still pings as required, but at presumably very infrequent intervals. Alternative solutions, which might place the decision to ping on using processes, are considered undesirable because
- IRTP itself becomes more complicated in terms of states of the connection table
- the user interface becomes both more complicated and more rigid
- such solutions might be deadlock prone in some instances
- it seems appropriate that the host to host protocol should be the place to determine destination reachability, if the overall application requires that such information be known (as it does in the environments intended for IRTP.)
5.3 Deleting Connection Tables
The protocol as defined does not allow connection tables to be deleted (or for a connection state to transition to out_of_synch from any other state). It might be appropriate to delete a connection table if it is known that the destination internet address is no longer one which this host wants to communicate with. (The only danger there is that if the destination does not know this, it could ping this host forever.) It is dangerous to delete a connection table or to go into out_of_synch state to avoid pinging when a destination does not appear to be there. Two hosts with the same such strategy could potentially deadlock and fail to resynchronize.
Author's Address
Trudy Miller
Advanced Computer Communications
720 Santa Barbara Street
Santa Barbara, CA 93101
(805) 963-9431