[bittorrent] Piece download strategy

Alan McGovern alan.mcgovern at gmail.com
Thu Apr 23 14:56:57 EDT 2009


Just in case anyone's interested, I received a patch a while ago from two
guys who implemented a better version of this as compared to pure sequential
downloading:

http://anonsvn.mono-project.com/viewvc/trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/PiecePicking/SlidingWindowPicker.cs?view=markup

To use this API the application doing the streaming needs to keep the piece
picker informed of the data it considers 'really important', so once the
media player processes the data in piece 0, it should tell the picker that
the high priority set starts at piece 1, etc. The important method is at the
bottom of the file[1] then. It basically performs three lookups, once to
find a high priority piece, once for a medium priority, then one for
anything else.

It's probably close to as good as you can get to real rarest first picking
without making media completely unstreamable.

[1]
http://anonsvn.mono-project.com/viewvc/trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/PiecePicking/SlidingWindowPicker.cs?view=markup

On Thu, Apr 23, 2009 at 7:47 PM, chris erway <cce at cs.brown.edu> wrote:

> Following up what Nikitas said, there are quite a few BitTorrent
> streaming papers:
>   http://scholar.google.com/scholar?&q=video%20streaming%20bittorrent
>
> For the last couple of years, BT streaming has been one of the
> suggested project ideas for the P2P networking seminar course that my
> advisor teaches here.  It's not too hard to get a naive strategy
> working; even easier for heavily-seeded torrents & low-bitrate files.
>
> Libtorrent has "sequential download support"; one of our seminar
> groups once worked on tweaking its strategy to mix rarest-first with
> sequential.
>
> http://www.rasterbar.com/products/libtorrent/manual.html#set-sequential-download-is-sequential-download
>
> I agree there isn't really a good production client out there that
> does this.  Except for Bitlet, which plays torrents of MP3s via a Java
> applet in your browser -- I imagine they're probably doing sequential
> downloading:
>   http://www.bitlet.org/music
>
> Hope these links help!
>
> chris
>
> On Apr 23, 2009, at 7:07 AM, Nikitas Liogkas wrote:
>
> > I recall there have been some papers discussing this as part of a
> > bigger
> > system (usually having to do with video streaming), but I don't
> > remember
> > the titles off the top of my head. You can look for them at P2P
> > conferences, such as IPTPS.
> >
> > HTH
> > nikitas
> >
> > Rayson Ho wrote:
> >> (I've read the FAQ, and watched Bram's talk online [1])
> >>
> >> I know that the download strategy used by BT is usually rarest first.
> >> However, this means that there usually are many "holes" in a file
> >> when
> >> downloading.
> >>
> >> It's not a problem if the torrent is well seeded. However if the
> >> availability of seeds is not stable, or if there is only 1 seed, then
> >> I think using the sequential order can give the user quite a lot of
> >> benefits -- if it is a music or movie file, then the user can at
> >> least
> >> view the beginning of it, and if it is a source tarball, then at
> >> least
> >> some part of the directory can be extracted...
> >>
> >> Any one has worked on this before?? I am not replacing the rarest
> >> first strategy, but if the availability is same, then I want to bias
> >> towards sequential order (or even biggest consecutive piece first --
> >> try to construction a bigger piece).
> >>
> >> Thanks,
> >> Rayson
> >>
> >> [1]:
> >> http://www.stanford.edu/class/ee380/Abstracts/050216.html
> >> http://stanford-online.stanford.edu/courses/ee380/050216-
> >> ee380-100.asx
> >> _______________________________________________
> >> BitTorrent mailing list
> >> BitTorrent at lists.ibiblio.org
> >> http://lists.ibiblio.org/mailman/listinfo/bittorrent
> > _______________________________________________
> > BitTorrent mailing list
> > BitTorrent at lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/bittorrent
> >
>
> _______________________________________________
> BitTorrent mailing list
> BitTorrent at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/bittorrent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20090423/623360a9/attachment.html 


More information about the BitTorrent mailing list