A Novel Repairable Fountain Codes Scheme Based on Partial Duplication Technique

Distributed storage system (DSS) is an emerging paradigm which provides reliable storage services for various source data. As the fault-tolerance scheme for DSS, erasure codes are required to provide redundancy service with high fault-tolerance and low cost.However, the existing coding scheme cannot provide these requirements well. Thus, it becomes an important yet challenging issue to find a code for storing various source data with high fault-tolerance and low cost. In this paper, a novel construction of repairable fountain codes with unequal locality is proposed by combining with partial duplication technique, namely the PD-ULRFC scheme. We construct a multi-tier heterogeneous storage network, where data core, processing units and storage nodes collaboratively store and transmit data. Moreover, the proposed PD-ULRFC scheme can reduce the repair and download cost by sacrificing a little extra storage occupation. Furthermore, the expressions of the repair cost and download cost are derived to analyze the performance of PD-ULRFC scheme. The simulation results demonstrate that the PD-ULRFC scheme significantly outperforms other redundant schemes in communication cost saving.


Introduction
With the ever-increasing amount of multimedia data, data traffic has exponentially increased recently. The distributed storage systems (DSSs) have gained increasing attention in various fields due to its potential to meet the storage requirements of massive data. However, the stored data cannot keep permanent stability in DSSs because of the failures of storage devices. It is worth to tackle the problem of reconstructing the lost data when storage nodes fail. Currently, the replications and erasure codes are two common redundancy technologies which are employed to ensure the reliability of DSSs [1]. Unfortunately, the two techniques cannot deal with the problem of storage space-bandwidth overhead tradeoff well. Especially for the erasure codes, although it occupies less storage space, it needs to transfer a large amount of data to reconstruct the source file. Therefore, it is critical to develop a new redundancy scheme to achieve low storage space while consuming low bandwidth resources.
Conventional Reed-Solomon codes are a best fault tolerance codes because of their maximum distance separable (MDS) structure. However, they still have some drawback, e.g., inefficient repair and high implementation complexity [2,3]. To improve the repair efficiency, the concept of repair locality is proposed and attracted research focus [4]. The repair locality is the number of drives that will need to be contacted in order to recover a lost encoded symbol. There are some locality-aware code constructions suggested and even implemented in production environments [5,6]. However, these code construction is start with a base MDS code, then still possess the disadvantage in terms of high encoding and decoding complexities.
As a subclass of erasure codes with several attractive properties, fountain codes [7][8][9] have attracted an increasing attention of scholars. For a given set of k message blocks, a fountain code generates a potentially limitless steam of coded symbols, each created independently of others as a random combination of message blocks according to a given degree distribution. Ideally, the original k message blocks can be reconstructed by selecting randomly (1 + )k coded symbols in a high probability, where > 0 . The design of fountain code makes it possess low encoding and decoding complexity.
Therefore, fountain codes have been recognized as repair codes for DSSs to maintain the reliability of stored data [10][11][12][13][14][15][16][17][18][19]. Early work introducing fountain codes to DSSs provided the high efficiency of data transmission and the low latency of data retrieval [10][11][12][13]. However, conventional fountain codes, such as LT or Raptor codes [7,8], these codes are not systematic and the low degree of the encoded symbols does not imply low locality. Thus, it requires more communication cost of transmitting data for repairing lost data in DSSs. For DSS, it expects that the repair code scheme is systematic form and has low locality, where the locality is defined as the number of symbols that are required to contact to recover a lost symbol. it Recently, the problem of fountain code has been considered in [14][15][16][17][18][19]. In [14], a novel family of fountain codes, namely repairable fountain code (RFC) was proposed, which has two properties, i.e., systematic form and low locality. The former enables the reading of source data without decoding and the latter can decrease the recovery cost of reconstructing a single lost symbol by local repair. In [15], the author analyzed the repair complexity of LT code and Raptor code and introduced systematic fountain code for DSSs. However, the results shown that there is still a large decoding overhead. The [16] investigated the locality of systematic fountain code under a given degree distribution. However, it could not obtain small decoding overhead because of the BP decoding scheme. With the consideration of systematic fountain codes with BP decoding, the authors in [17] proposed truncated Poisson distribution to decrease the decoding overhead. Furthermore, Y. Wang et al. [18] proposed an improve repairable fountain codes with unequal repair locality, termed URL-RFC, which reduced the cost of repairing and downloading in multitier heterogeneous mobile edge caching networks. In [19], J. Baik et al. proposed a new systematic fountain codes with reduced locality, which is called locality-improved repairable fountain codes (LIRFC). Although the above schemes perform well in reducing the amount of data transmission, it still has the disadvantages of high repair cost compared with the replica technology.
In this work, to further decrease the cost, we propose a novel RFC scheme with unequal locality (UL) by combining with partial duplication technique (PD-ULRFC). Our main contribution is to suggest the use of partial duplication technique, which can increase the chances of repairing and downloading files through the links between storage nodes, thereby reducing the repair cost and download cost. Also, the closed-form expressions of repair cost and download cost are derived to analyze the performance of the PD-ULRFC. By comparing to other redundant schemes, we show that significant gains can be achieved in the reduction of repair cost and download cost.
The organization of the rest of this work is as follows. A brief background on the system network model and the repairable fountain codes are presented in Sect. 2. Afterwards, the detail encoding scheme of PD-ULRFC and the repair and download mechanism is provided in Sect. 3. In Sect. 4, we verify the significant improvements of the proposed scheme by simulation. Finally, we conclude our work in Sect. 5.

Background and Network Model
In this section, we present the heterogeneous storage network model and the background of repairable fountain codes.

The Heterogeneous Storage Network Model
As shown in Fig. 1, we consider a heterogeneous multi-tier storage network, including a data core, Processing Units (PUs), and storage nodes. The data core is responsible for storing all the original data and distributing it to each PUs. In addition, the PUs set is divided into M units, i.e., PU 1 , PU 2 , ..., PU M , which are responsible for providing service coverage for all storage nodes. Furthermore, the whole coverage area is partitioned into M areas, i.e., Area 1 , Area 2 , … , Area M , where each of them is serviced by a PU. Moreover, those nodes in the same area can communicate with each other using wireless links. As a result, a multitier storage network architecture is formed. In the meantime, it is noted that the data repair and download processes can be cooperatively implemented by PUs and storage nodes.
In the network model, the storage nodes' failure follows a Poisson process. Therefore, the lifespan of a live node in system can be modeled by an exponentially distributed random variable with parameter N m m which denotes the expected survival rate of a node in Area m , where N m is supposed as the expected number of nodes in mth area, m ∈ {1, 2, … , M} and t is the time. Thus, the probability density function (PDF) of the lifespan T lm is as follows. (1) Similarly, we can also model the nodes repair time T rm as an exponentially distributed random variable with parameter m . And the PDF of T rm is as follows.
where m denotes the repair rate of a node in Area m . In Area m , the number of storage nodes n m satisfies n m ≪ N m , which indicates the probability that the number of nodes is smaller than n m is negligible.
In addition, denote by PU m and m the energy cost of transmitting 1-bit information from the mth PU and the nodes in Area m , respectively. According to the different path losses, i.e., a larger distance will incur a greater cost, we assume that PU m > m on average. For simplicity, we mainly focus on storing and distribution of one general file of size F bits. The file is divided into multiple blocks and these blocks can be stored in the PUs. Furthermore, in Area m , the nodes randomly request the file at a rate m with independent identically distributed random interval time T dm with PDF The requester node can retrieve the whole file via the links between nodes in Area m and PUs links cooperatively.
In the network model, the file is divided into M unequal blocks and stored into PUs. For any Area m , the F m bits data stored in PU m are divided into k m blocks to generate n m encoded blocks, while one encoded block is stored in a storage node. Under these conditions, we consider uniform allocation, where each node in Area m stores m bits data.
Data repairing and downloading with cooperative policy in this network architecture comprises the following two components: Data Repairing When a storage node failure from the network, the data stored in the node will be lost. The lost data have to be recovered in time and stored on a new available node. The transmitted cost generated by accessing available node for repairing the lost data is called repair cost. If there are enough available node in Area m , the lost data can be repaired The heterogeneous storage network model by links between storage nodes. The amount of data transmitted through node links is d m m , where d m is the repair locality. If the number of available node is insufficient, the lost data can only be reconstructed by the PU m , and the amount of transmitted data is m . Data Downloading When node requests a file, the whole file can be transmitted from different storage nodes through wireless links or from PUs directly. The transfer cost incurred by download file is called download cost. The amount of data transmitted through the links between storage nodes is h m m ≥ F m , where h m is download locality. It means that the links between storage nodes are available if h m or more nodes still alive in Area m . If the number of nodes is smaller than h m , F m bits are downloaded from the PU m .

The Repairable Fountain Codes
As described in [14], the RFC encoding process can be simplified as follows. We represent k message symbols as U = (u 1 , u 2 ,..., u k ) in GF(q p ) , where q is a prime and p is a positive integer, and denote by V = (v 1 , v 2 ,..., v n ) the sequence of n encoded symbols generated by U. The encoded symbols contain a non-coded copy of the k message symbols. It means that the first k symbols of V are equal to U. The parity symbols v j , j = k + 1, k + 2,..., n are constructed in the following three-step processes.

1) d(k) message symbols are sequentially chosen independently and uniformly at random
with replacement from k message symbols, where d(k) = c ⋅ log(k) , and c is constant. 2) For each message symbol chose in 1), a coefficient is uniformly selected from GF(q p ) 3) Each parity symbol can be generated from the linear combination of the message symbols selected in 1), weighted with the coefficients chosen in 2).
Therefore, the rest of the parity symbols can be obtained by repeating steps 1)-3). As the jth encoded symbol, the v j can be calculated as follows.
where G(j) is the jth column of the generator matrix G, u i is the ith original message symbol, and ij is the probability of the jth encoded symbol choosing the ith original message symbol. From the encoding process, each parity symbol is the weighted sum of at most d(k) message blocks. We call a parity symbol and its choosing d(k) message blocks as a local group of d(k) + 1 cardinality. This means that the repairing of a single failed node can be achieved by downloading at most d(k) symbols from its local group. Therefore, the RFCs scheme get a low locality, d(k).
Furthermore, the summary of mentioned symbols in this paper is listed in Table 1.

The Construction and Analysis of PD-ULRFC Scheme
We consider that original data is stored in different areas of the heterogeneous storage network. The failure/request rates of storage nodes, the energy cost of storage nodes and PUs are different in M areas, which brings about different repairing and downloading constraints to the fault-tolerant coding scheme design. Therefore, to further decrease the repair cost and download cost, we design a PD-ULRFC scheme in this section.

The Construction of PD-ULRFC
In this subsection, we present the construction of PD-ULRFC for heterogeneous storage network. The proposed PD-ULRFC are obtained by combining the RFC and the partial duplication technique. Assume that the number of input symbols in Area m is k m . Denote by U m = {u m,1 , u m,2 ,..., u m,k m } the vector of input symbols in Area m . The encoding algorithm of PD-ULRFC is shown as Algorithm 1.   The repairing Locality in Area m .
The pdf of repair time T rm .
The pdf of interval time T dm .

Algorithm 1 The encoding process of PD-ULRFC
Step 5: Finally, (n m + k m ) encoded symbols will be obtained, and the encoding parameters of PD-ULRFC scheme are indicated as (n m + k m , k m , d(k m )).
The generator matrix G of the proposed PD-ULRFC when M = 3 is shown in Fig. 2. The identity group part confers the systematic form, which is composed of 2k 1 + 2k 2 + 2k 3 columns. P 1 , P 2 and P 3 are random matrix whose columns are sparse, each bearing at most d(k 1 ) , d(k 2 ) and d(k 3 ) nonzero elements, respectively. It is worth noting that the length of k 1 , k 2 and k 3 are unequal, resulting in the unequal lengths of n 1 , n 2 and n 3 .
As can be seen from the bipartite graph in Fig. 3, the encoded symbols of Area m include double replicas of input symbols as the systematic form and a set of parity symbols with locality d(k m ) generated by input symbols. We can also calculate the vector of the mth group of symbols as follows.
where I m = [I � k m I k m ] denotes the identity matrix group. Assume that v m,l is denoted as the lth encoded symbol in V m , the m,ij is denoted as the probability of the jth encoded symbol in V m chooses the ith input symbol from U m . The G(l) indicates the lth column of the generator matrix. Therefore, we can calculate the encoded symbol v m,l as follows.
In the following theorem, we prove that the proposed PD-ULRFC scheme has the high full rank probability and the low repair locality in any k m × n m sub-matrix formed by the corresponding columns of the matrix G.  One input symbol is covered if and only if it is adjacent to at least one coded symbol. The lower bound of the probability of decoding failure is defined as the probability that an uncovered input node exist in bipartite graph G m . According to classical problem of throwing balls into bins, O(k m log(k m )) balls are randomly throw to k m bins to ensure that no bin is empty. Therefore, the decoding failure probability is arbitrarily small, since (1 + )k m > k m . ◻ From the notation (n m + k m , k m , d(k m )) of PD-ULRFC, we can see that the parameter n m + k m is referred to as the number of storage nodes in Area m , while the parameter d(k m ) is the number of storage nodes connected for repairing a failed node. Taking (9+3,3,2) PD-ULRFC scheme in Area 1 as an example to illustrate the storage and repair processes as shown in Fig. 4. Primarily, the file of size F 1 is divided into k 1 = 3 blocks of size 1 = F 1 ∕k 1 with encoding them into n 1 + k 1 = 9 + 3 coded symbols through PD-ULRFC scheme, where the number of the systematic symbols (i.e., {v 1,1 , v 1,2 , v 1,3 } ) and their replicas (i.e., {v � 1,1 , v � 1,2 , v � 1,3 } ) is 6. Then, storing the 12 coded symbols into 12 storage nodes. In the case that any one of the systematic symbols is lost, it can be repaired by its replica symbol and obviously the size of transmitted data is 1 . However, when two systematic nodes with the same data are failed, we must use RFC scheme to repair a node and then repair the other by replica. Accordingly, the total size of transmitted data is 3 1 . In addition, any one of the parity symbols is lost, it must be repair through RFC scheme and the size of transmitted data is 2 1 . Moreover, the request node can retrieve the original file by connecting any (1 + )k 1 nodes.

The Analysis of PD-ULRFC
We will investigate the performance of the PD-ULRFC and derive the closed-form expressions for the repair cost and download cost in the following subsection.
Repair Cost During the repair process, the proposed scheme has three repairing methods, replication repair, RFC repair and PUs repair. Indicated by p rep im , p RFC im , and p PU im the probabilities of the above repair methods when there are i node failures in Area m , respectively. The The number of failed nodes in Area m is indicated as i m = i ms + i mp , where i ms denotes the number of failed systematic nodes and i mp denotes the number of failed parity nodes. Denote by S min and S max as the minimum and maximum of systematic node pairs stored the same data in the failed nodes, respectively. The RFC repair is possible if a pair of systematic nodes that have the identical data are failed. S max can be calculated that S max = ⌊ i m 2 ⌋ . In the situation of i ms ≤ k m , there are at least zero node pairs among the i ms failed systematic nodes storing the identical data. If i ms > k m , there are k m failed systematic nodes that contain different data and the rest are stored identical data. Therefore, the size of S min can be calculated as follows.
Assume that the p i m j is denoted as the probability that j node pairs store the identical data among i ms failed systematic nodes, and ∑ S max j=S min p i m j = 1 . If j systematic node pairs are failed, there will have n m − j storage nodes containing different data in Area m . When n m − j > d(k m ) , the system can repair the failed nodes by using replication repair and RFC repair, and there are i ms − 2j failed systematic nodes repaired by replication repair. Thus, the probability of replication repair p rep i m is as follows. In the meantime, the probability of using RFC repair is denoted as follows.
It is noted that for a pair of equivalent failed nodes with the same data, the RFC repair is first used to repair one node, and then the other can be repaired by replica repair. Therefore, the cost of repairing two equivalent nodes in Area m is ( RFC m + rep m ).
When n m − j < d(k m ) , the system must recovery the lost data by using PUs repair, and the probability of PUs repair is as follows.
We indicate the repair cost of i m failed nodes by C ri m , and calculate the expression of C ri m as follows.
According to the previous knowledge, there are (n m + k m ) storage nodes in Area m . Denote by p m as the probability of single node staying in Area m within repair period T, i.e., p m = e − m T . b i (n m + k m , p m ) is the probability mass function (pmf) of the Bernoulli distribution with the number of storage nodes n m + k m and the node available probability p m .
If i < d(k m ) , it must recover the lost data by using PUs repair, otherwise by using other repair ways. Thus, we can get Therefore, the total average repair cost of the system is the sum of the repair cost of M edge areas, i.e., Download Cost According to the decoding rules of the RFC, the whole file can be download by the links between nodes if there are at least (1 + )k m different available nodes in Area m , where > 0 , otherwise from PUs. In addition, there must be (1 + )k m different available nodes when there are more than 2(1 + )k m − 2 nodes available in Area m . Therefore, it is necessary to consider the scenario whether there are (1 + )k m different nodes in Area m when the number of available nodes is (1 + )k m + 1 , When the number of available nodes is i m in Area m , the number of failed nodes can be denoted as (n m + k m − i m ) . Thus, the probability of (1 + )k m different available nodes is Therefore, for the case that i m is equals to (1 + )k m + 1 , (1 + )k m + 2 , … , 2(1 + )k m − 2 , the download cost is During a repair period T, the number of available nodes in Area m can be described by a Poisson birth-death process [20]. Thus, the probability of more than i m available nodes in Area m is The total average download cost of the system is the sum of the download costs of M edge areas, i.e., Therefore, the total communication cost is defined as the sum of the average repair cost and the download cost, i.e., (15)

The Availability Analysis of Links Between Storage Nodes in Area m
The proposed PD-ULRFC scheme can improve the possibility of using the links between storage nodes. For PD-ULRFC scheme, the repair and download can be achieved by using the links between storage nodes or the PUs links. The P SN r m and P PU r m are denoted as the successful repair probability by using the links between storage nodes and PUs links, respectively. Similarly, the P SN d m and P PU d m are denoted as the successful download probability by through the links between storage nodes and PUs links, respectively. For the (n m + k m , k m , d(k m )) PD-ULRFC scheme, we can calculate the above probability as follows.

Numerical Results
We evaluate the communication of the PD-ULRFC scheme by simulations. At first, we compare the communication cost of RFC scheme and PD-ULRFC scheme in one area. We take the Area 1 as the example. We set 1 = 1 , 1 = 0.02 , F 1 = 1 , N 1 = 50 , and Under different coding parameters, the cost of RFC and PD-ULRFC is shown as Fig. 5. Figure 5 shows the comparison of repair cost for RFC and PD-ULRFC. Apparently, the PD-ULRFC scheme is superior to the RFC scheme when T less than or equals a certain value. Moreover, the PD-ULRFC scheme's cost is at the same level with the RFC scheme after a certain value. This is the reason why double systematic nodes can decrease the average number of nodes repaired by PUs. Figure 6 shows the change of downloading cost about PD-ULRFC scheme and RFC scheme. Significantly, the downloading cost of the PD-ULRFC scheme is smaller than the RFC scheme. This is because the PD-ULRFC scheme raises the probability of downloading stored files by using the links between nodes when fixed repair period T, thereby decreasing the downloading cost. Figure 7 illustrates how the repair period T affects the total communication cost for the PD-ULRFC scheme and RFC scheme. The total communication cost of PD-ULRFC scheme is always lower than RFC scheme at any value of repair period, which shows that the design of PD-ULRFC The comparison of the average repair cost for the PD-ULRFC scheme and RFC scheme Fig. 6 The comparison of the average download cost for the PD-ULRFC scheme and RFC scheme scheme for distributed storage systems can significantly decrease the total communication cost while the cost of downloading occupies the central part. Figure 8 shows the successful repair probability of RFC scheme and PD-ULRFC scheme. We choose (20,8,4) RFC and (20+8,8,4) PD-ULRFC for analysis. The blue curve denotes the probability of repairing data by using the links between storage nodes and the red curve denotes through the PUs links. It can be seen that the probability of repairing by using the links between storage nodes becomes smaller as the repair period T increases, and the probability equals almost 0 when T > 3.5 , i.e., the data can only be repaired through PUs links. In addition, we can see that the probability that PD-ULRFC repairs lost data through the links between storage nodes is higher than the RFC at same T, which indicates the cost of the PD-ULRFC scheme is less than the RFC scheme when the T is small. From  Fig. 9, we can see that the proposed PD-ULRFC scheme significantly improves the successful download probability through the links between storage nodes. Since the amount of transmitted data during the RFC scheme and PD-ULRFC scheme download is F 1 in Area 1 , there is a conclusion that the greater the probability of downloading by using the links between storage nodes, the smaller the download cost at the same repair period.
Then, we compare the communication cost of PD-ULRFC with other redundancy schemes in a heterogeneous network. In order to accurately evaluate the performance, we set different parameters to construct a heterogeneous network, including different failure rate m , different request rate m , different unit cost of data transmission and different encode parameters. In additions, some systematic parameters are given as F = 1 , M = 3 , N m = 100 . Other parameters are given in Table 2.
As shown in Fig. 10, we compare the cost overhead of the proposed PD-ULRFC scheme and other redundancy schemes. It can be observed that the PD-ULRFC scheme Fig. 7 The comparison of the average total communication cost for the PD-ULRFC scheme and RFC scheme 1 3 Fig. 8 The analysis of successful repair probability Fig. 9 The analysis of successful download probability obtains a lower repair cost than the 3-Replication while the T ranges from 0.2 to 6. However, the 3-Replecation achieves better performance in the near-instantaneous repair duration (i.e., T < 0.15 ). As can be seen from Fig. 11, the download cost of the PD-ULRFC is lower than the URL-RFC and the MDS. This is because the proposed scheme increases the chances of downloading files by utilizing the links between nodes in areas, thereby reducing download cost. From Fig. 12, we can see that the PD-ULRFC scheme is superior to the MDS code and the URL-RFC at any value of T in the simulations, which shows that the PD-ULRFC can effectively decrease the communication cost in heterogeneous storage systems.

Conclusion
In this paper, a novel construction of the RFC scheme was proposed, namely PD-ULRFC scheme, for heterogeneous distributed storage network. The proposed scheme could enhance the availability of links between storage nodes and decrease the repair cost and download cost. In addition, we derived the closed-form expressions of repair cost and download cost of the proposed scheme. Finally, the proposed scheme was compared with other redundancy schemes in terms of repair cost, download cost and total communication cost. Simulation results shown that, the PD-ULRFC scheme was promising to lower the communication cost than other redundancy scheme under the scenarios with different parameter configurations. The practicability and the feasibility of the PD-ULRFC scheme were fully validated in this work. In future work, we will investigate the applications of the PD-ULRFC scheme in realistic storage networks to evaluate the performance of the PD-ULRFC scheme.