Method for downloading file in parallel
Disclosed is the parallel download for a file, which calculates availability values of each block by using node operation rates of each node having blocks constituting a file, and preferentially downloads a block having a minimum availability value among the calculated availabilities, thereby increasing probability to access the file and each block constituting the file, thus to perform file downloading more accurately and rapidly.
1. A computer-implemented parallel file downloading method by which a file is downloaded to a node in a parallel downloading system including a plurality of nodes, the method comprising:
obtaining node operation rates related to the plurality of the nodes connected to the system, wherein a node operation rate for a node j is calculated according to [Numerical formula 1] below:
Active( j )=a time for which a node j actually operates/a measuring duration, [Numerical formula 1]
wherein the Active(j) indicates a node operation rate of the node j;
obtaining availability values related to blocks available at the plurality of nodes based on the node operation rates, wherein an availability value of a block is calculated according to [Numerical formula 2] below:
Avail block ( f, i )=1−Π(1−Active( j )), (jεSources( f, i )), [Numerical formula 2]
wherein the Sources(f, i) indicates a set of nodes having a block i of a file f, Π is a constant and the Avail block (f, i) indicates availability of the block i, which is a fragment of the file f; and
if the node among the plurality of nodes requests to download the file, preferentially downloading, to the node, a block having a minimum availability value among blocks constituting the file.
2. The parallel file downloading method of claim 1 , further comprising:
obtaining information regarding which block of the file belongs to which node among the plurality of nodes.
3. The parallel file downloading method of claim 1 , wherein the block availability values are obtained by a broker server serving as an entity of a network.
4. A block selection method in a parallel file downloading system in which a node selects blocks constituting a file to download the file, the parallel file downloading system including a plurality of nodes, the method comprising:
receiving node operation rates related to the plurality of nodes comprising blocks constituting the file, wherein a node operation rate for a node j is calculated according to [Numerical formula 1] below:
Active( j )=a time for which a node j actually operates/a measuring duration, wherein the Active( j ) indicates a node operation rate of the node j ; [Numerical formula 1]
calculating availability values corresponding to each of the blocks based on the node operation rates, where an availability value of a block is calculated according to [Numerical formula 2] below:
Avail block ( f, i )=1−Π(1−Active( j )), ( j εSources( f, i )), [Numerical formula 2]
wherein the Sources(f, i) indicates a set of nodes having a block i of a file f, Π is a constant, and the Avail block (f, i) indicates availability of the block i, which is a fragment of the file f; and
selecting a block having a minimum availability value.
5. The block selection method of claim 4 , further comprising:
transmitting a file search message to each node;
receiving from each of the plurality of nodes a response message including node information, information related to the node operation rate, and block information of a file stored in each of the nodes.
6. The block selection method of claim 4 , wherein selecting the block having the minimum availability value comprises:
responsive to a number of the blocks having the minimum availability value exceeding one block, selecting one of the blocks having the minimum availability value.
7. The block selection method of claim 6 , wherein selecting one of the blocks having the minimum availability value comprises:
determining whether or not the nodes having the blocks of the minimum availability value operate; and
selecting said one of the blocks at an operating node.
8. A non-transitory computer readable storage medium storing computer instructions configured to cause a processor of a computer to perform a computer-implemented parallel file downloading method by which a file is downloaded to a node in a parallel downloading system including a plurality of nodes, the method comprising:
receiving node operation rates related to the plurality of nodes comprising blocks constituting the file, wherein a node operation rate for a node j is calculated according to [Numerical formula 1] below:
Active( j )=a time for which a node j actually operates/a measuring duration, wherein the Active( j ) indicates a node operation rate of the node j ; [Numerical formula 1]
calculating availability values corresponding to each of the blocks based on the node operation rates, where an availability value of a block is calculated according to [Numerical formula 2] below:
Avail block ( f, i )=1−Π(1−Active( j )), ( j εSources ( f, i ), [Numerical formula 2]
wherein the Sources(f, i) indicates a set of nodes having a block i of a file f, Π is a constant, and the Avail block (f, i) indicates availability of the block i, which is a fragment of the file f; and
selecting a block having a minimum availability value; and
downloading the selected block from the node having the selected block.