[bittorrent] Introductory/endgame algorithms
Olaf van der Spek
olafvdspek at gmail.com
Fri Sep 30 03:27:29 EDT 2005
On 9/30/05, Elliott Mitchell <ehem at m5p.com> wrote:
> > Only a single file needs to have a 'non-aligned' end to affect all
> > files following.
> > DVDs are frequently distributed as VIDEO_TS dir and I'm not sure if
> > all file ends are aligned there.
> I'm well aware of that fact. Though you can still do page-sized I/O
> aligned to the file, though not well aligned to the torrent (yuck).
> This is definitely something that should be considered in any V2 protocol
Speaking of v2, is there any news about it?
I think v2 would use 'independent' sub-files, so pieces aren't shared
by two files. That'd solve this issue too.
> Wrong. If your buffer is page-aligned and you're doing I/O to
> page-aligned portions of a file, Linux will do a copy but by modifying
> the page table.
Doesn't that also require not using the buffer for anything else (afterwards)?
Because if you write to it, Linux will have to do the copy after all.
> > http://libtorrent.rakshasa.no/
> Unfortunately two issues here. First, http://libtorrent.sourceforge.net/,
> there is already a library of the same name out there. Second, despite
> claims to the contrary, the world is not ruled by C++, quite a few new
> things are written in C. Just because you're using C, doesn't mean you
> aren't doing OO (sorry, rant time there).
But what's the reason to use C instead of C++ in that case?
More information about the BitTorrent