# CoFi: Coding-Assisted File Distribution over a Wireless LAN
## 2 Related Work  
Since the pioneering work by [PERSON] et al. [17], randomized network coding has shifted from the information theory domain to practical wireless networking systems. This trend has been marked by the COPE protocol [18], which employs the simplest form of network coding (i.e., XOR coding) for multi-session unicast in wireless mesh networks. COPE allows intermediate forwarders to opportunistically XOR code incoming packets heading towards different next-hops, based on a prior knowledge of the decodability at the intended downstream nodes. The encoding nodes broadcast the coded packets to all down streams, thereby reducing the number of transmissions compared with traditional routing. The MAC-independent opportunistic routing & encoding (MORE) protocol [19] goes one step further by combining random linear network coding with opportunistic multipath routing. Owing to the resilience of random linear network coding to packet losses, MORE achieves 70% higher throughput on average over a traditional best-path routing protocol. Due to the problem that the stopping and waiting \"ACK\" policy degrades throughput in MORE, [PERSON] et al. addressed the problem [20] by allowing the coexistence of different data segments. In the proposed method, called code opportunistic routing (CodeOR), the source node transmits W (window size) concurrent segments. When the source node receives end-to-end feedback from the destination node, the node adds a new segment to the current window. [PERSON] et al. [21] proposed a novel scattered random network coding (S-RNC) scheme, which takes the advantage of error position diversity to improve the throughput performance in multiple hops wireless networks. The RNC blocks can be classified into different groups according to different bit positions (i.e., error probability), and the lower ones are protected. The sender and relays scatter the bits of these protected coded blocks on \"good\" bit positions and the rest on \"bad\" bit positions. [PERSON] et al. [22] investigated the throughput gain of inter-flow network coding over a non-coding scheme on multicast sessions in multi-hop wireless networks. They also defined a new metric, network unbalance ratio, which identifies the amount of unbalance instability among nodes. Despite the wide interest on the satiation throughput of network coding based protocols, little attention has been paid to its delay performance. In addition, randomized network coding has mostly been applied to improving the performance of a single network flow. When multiple unicast sessions are running concurrently, it is unknown whether network coding can still provide benefits, given its aggressive transmission strategy. In Reference [23], the delay performance gains of network coding are quantified using theoretical analysis, assuming an ideal time division multiple access (TDMA) based cellular network. In designing the CoFi protocol, we focused on the performance of network coding in realistic carrier sense multiple access (CSMA) based wireless LANs. Another deficiency of existing randomized network coding protocol is that they are mostly applied to routing in static mesh networks. For example, MORE [19] requires the extensive measurement of all link conditions in a mesh network, and then runs a centralized algorithm to determine the number of packets sent over each link based on its average quality. In CoFi, we used signal strength as the metric for the selection of relays, which can be realized without any measurement overhead, and which is more adaptable to a mobile scenario. The idea of opportunistically caching packets is not new. It has been applied in wireless mesh networks in order to reduce the routing overhead [5] and to save redundant transmissions [6]. However, these schemes strongly depend on the underlying scheduling algorithm that determines \"which packets to cache\" and \"which cached packets to transmit\".