R. LUN ET AL.
Copyright © 2013 SciRes. CN
vanilla BitTorrent.
1) Preliminaries: In this paper, we assume the content
files are bundled. A peer joining the distribution of the
bundled content may select one or more files in the con-
tent bundle to download [3].
Each peer has a portion of local disk space allocated
for use by BISTRO to speed up local downloads. In this
paper, we call the portion of the local disk space as the
contributed storage. The storage is divided into two parts:
the content part and the management part. The content
part is used to store file blocks and it takes the majority
of t he space al located as the contributed stora ge. The con-
tent part is divided into blocks and the size of each block
in the content part is the same as the size of file blocks
exchanged among BitTorrent peers so that each block of
the content part can be used to store one file block. Since
most BitTo rrent swarms use 256 KB as the block size so
the size of the block in the contributed storage is set to
256 KB by default1. The management part is used to
store information required to manage the storage. For
example, the information needed by the block replace-
ment method is kept in the management pa rt.
2) Dormant Phase: In the dormant phase, a peer has
no desire to download a file from a swarm yet. The peer
joins the swarm simply to participate in the content dis-
tribution to fill and optimize its contributed storage. So
that later, the file blocks in the storage can be used by the
peer to maximize the return, i.e., exchange back its de-
sired file blocks according to the tit-for-tat policy used
by BitTorrent. The pre-filled storage is equivalent to the
pre-calculated results stored in memory. In the classical
time-space trade-off, the pre-calculated results are used
to speed program execution. In BISTRO, the prefilled
storage is used to speed up both local downloads and the
content distribution to other peers.
For the dormant phase we extend the vanilla BitTor-
rent as follows:
BITFIELD Message: A vanilla BitTorrent peer ex-
changes the BITFIELD messages with other peers to an-
nounce the file blocks that have already downloaded. A
BISTRO peer will also announce the file blocks in its
contributed storage so that other peers can download
these file blocks in the contributed storage.
Storage Management: When the storage is not full, a
BISTRO peer simply stores downloaded file blocks in
the contributed storage since these file blocks are not of
interest by the peer in the dormant phase. But when the
storage is full and new file blocks are downloaded, cer-
tain blocks in the contributed storage may have to be
replaced. Obviously the block replacement method is im-
portant to the performance: 1) Because of the tit-for-tat
policy, file blocks in the contributed storage are essen-
tially bargain chips used to exchange back desired file
blocks when the peer is in the download phase. So it is
important for a peer to keep most useful barga in chips i n
the contributed storage to speed up the file downloading
in the do wnload p hase; 2) In the dormant phase, the peer
has no interest in the blocks within the contributed sto-
rage. But the file blocks held by the dormant peers affect
the content distribution to other peers in the swarm. In
this paper, we propose two storage replacement methods:
Random Replacement: The peer randomly selects a
file block in the contributed storage and replaces the
file block with a newly downloaded file block.
Least Frequently Requested (LFR): In the LFR me-
thod, the least frequently requested, i.e., the most un-
popular file blocks are replaced. To keep track of re-
quests on each file block in the contributed storage, a
request count associated with each file block is kept
in the management part of the storage. The heuristic
behind the met hod is that the most popular file blo cks
are the most useful bargain chips to exchange back
desired file blocks in the download phase.
For different content distribution networks, the actual
implementation of the dormant phase may vary in terms
of participating in the content distribution without the
desire to download a file. In some content distribution
networks, it is possible for a peer to participate in the
distribution passively as a cache node [8]. In other type
of content distribution networks, a peer in the dormant
phase has to send download requests to participate in the
content distribution. For the second type of content dis-
tribution networks, the peer in the dormant phase re-
quests file blocks randomly or simple select a file ran-
domly from the bundled content to download. In BISTRO,
the second implementation method is used.
The length o f the do rmant p hase depend s on whe n the
peer beco mes interested in downloading files. So me peers
may want to simply contributing the storage for content
distribution so that they can use the file blocks in the
storage to speed up their future download. Some peers
may want to download desired files immediately after
joining a BitTorrent swarm.
3) Download Phase: Whenever a BISTRO peer be-
comes interested in downloading files in the swarm, the
peer is changed into the download p hase.
A BISTRO peer in the download phase acts largely the
same as a regular peer in the vanilla BitTorrent. The ma-
jo r differe nce is t hat from the begi nning o f the downlo ad
phase, the peer has bargain chips, i.e., file blocks in the
contributed storage. So when a BISTRO peer advertises
the file blocks availab le for sharing, the BI TFIELD mes-
sage also contains the availability of the file bloc ks i n the
contributed storage. So that other peers can request and
download the file blocks in the contributed storage.
In the download phase, the contributed storage is not
1The
block size in the contributed storage can be changed according to
the change of the block size used by BitTorrent swarms.