• 沒有找到結果。

NC-Based Multipath File Transfer Protocol

Multipath File Transfer Protocol

4.3 NC-Based Multipath File Transfer Protocol

Files are divided into equal-length data blocks, and a certain number of data blocks are grouped together and transmitted in a batch. Each group of data blocks is called a coding set. A linear combination of data blocks in a coding set is called a coded (data) block.

In the random linear network coding scheme, the coefficients for encoding data blocks are generated randomly. Instead of the native data blocks, the coded blocks as well as the encoding coefficients are transmitted. Due to the linear independency of random vectors, in most cases, the data blocks in a coding set can be decoded if the same number of coded blocks as of the native data blocks are received no matter how many packets or which packets are lost. In some sense, random linear network coding provides the functionality of forward error correction, and this is why coded blocks can be transmitted via lossy UDP channels.

However, UDP does not provide the functionality of data integrity and flow control.

Just like UFTP, additional mechanisms are needed to guarantee data integrity and provide flow control. Data integrity is guaranteed by the forward error correction of random linear network coding, and flow control is provided by a sliding window mechanism and a packet dispatching mechanism. In addition, an adaptive waiting heuristic is used at the receiver side. The proposed protocol is called NC-based File Transfer Protocol or NCFTP in short.

Details are given below.

Let csSIZE denote the size of coding sets, i.e. the number of data blocks in a coding set. IT Tk, called the Inter Transmission Time of the k-th channel, is the minimal waiting time between two successive packets added into the buffer of the the k-th channel. IT Tk is

a variable parameter for flow control. The receiver needs csSIZE coded blocks to decode a code set and 1 more coded block for checking integrity. Since UDP channels are lossy, more than csSIZE coded blocks will be added into channel buffers. Let pk be the probability of successful transmission of the k-th channel, and Nk be the number of data packets added into the k-th channel. Then, PK

k=1pkNk ≥ csSIZE is the condition to stop adding data packets into the buffers. Note that besides the UDP data channels, a TCP control channel is maintained for exchanging commands and control messages, transmitting lost data packets, etc.

After adding enough number of coded blocks into the buffers, the sender will wait a reply from the receiver. At the receiver side, the receiver sets a countdown timer to W T for receiving coded blocks. As the time is up, the receiver tries to decode received coded blocks by applying Gaussian elimination. If the coding set can be decoded, an ACK is replied;

otherwise, a NAK is sent back to indicate which data blocks are needed. If a NAK is received, the sender will transmit the indicated data block via the TCP connection. Therefore, the coding set can be decoded and verified, and the receiver send and an ACK back. After the sender receives an ACK from the receiver, the transmission of the coding set is completed.

At the same time, the receiver also does statistics to adjust the waiting time W T and inter transmission time IT Tk.

1. If the packet lost rate during the last half of the waiting time is significantly higher than the rate during the first half of the waiting time, W T will be increased. On the other hand, if most packets are received earlier than the timeout of W T , W T will be

decreased.

2. If the packet loss rate of the k-th channel is above a threshold and not due to the insufficiency of waiting time, IT Tk will be increased. On the other hand, if the packet loss rate is below a threshold, IT Tk will be decreased.

At the same time, to prevent wasting bandwidth on waiting the NAK, the sender keeps going to send the following coding sets. On the other hand, to prevent network congestion, the number of ongoing coding sets must be controlled. Therefore, a sliding window like the one used in TCP is adopted for limiting the number of ongoing code sets. Let minW IN , maxW IN , and W IN , respectively, denote the minimum sliding window size, maximum sliding window size , and current sliding windows. W IN is the maximal number of ongoing coding set before receiving an ACK. When the last unACKed coding set is ACKed, the coding set window advances. W IN increases as network conditions become better, and decrease as network conditions become worse.

The sender part of NCFTP is depicted in ALGO 3, and the receiver part is in ALGO 4.

ALGO 3 NCFTP for the sender

Add a coded packet of CSi to the buffer of the k-th channel every IT Tk seconds.

Nk = Nk+ 1

Send the requested native data blocks to the receiver by a TCP channel.

end if

until ACK = N

ALGO 4 NCFTP for the receiver N: the total number of coding sets.

repeat

if a coded packet P is received then

Assume P belongs to the coding set CSi.

if P is the first received coded packet of CSi then Set the count down timer Ti = W T .

end if Decode CSi.

if CSi is completely decoded. then

Send ACKi, clear timer Ti, and update W T . end if

end if

if a timer T j is up then

Send NAKj with a list of requested native data blocks.

Clear time Tj, and update W T . end if

until All coding sets are received.

Chapter 5

Implementations and Empirical

相關文件