Click to See Complete Forum and Search --> : P2P Apt
timothykaine
01-25-2005, 10:55 AM
I was just thinking it would be really cool if Debian had P2P repositories. I wonder how difficult it would be to make a P2P-based package manager. It would make it a lot cheaper for distros to run, and make it easier for new distributions to set up repositories without having to put up money for a server.
Just yet another community Linux feature to be proud of too. And anyone would be able to help, all they have to do is run the distro. Could be an efficient direction for "Free as in beer" distributions to go in the future.
hard candy
01-25-2005, 11:18 AM
A nice idea. Do they not already have bitttorrent downloads of their cd's?.
One thing to work out would be package security, how would you know the version you are downloading would be the version that has been tested? What if you had 50 packages named xmms-1.2.9.deb listed- which one would would you get? How would you know they were from legitimate sources?
IsaacKuo
01-25-2005, 11:41 AM
You'd want to make it work like bittorrent--there are checksums in the .torrent file so the client can tell whether the file sections being downloaded from other clients are valid or corrupt. The .torrent files would be on the servers in /etc/apt/sources.list.
In order for bittorrent to work, the .torrent files need to be on a "legitimate source", but the actual clients doing the file sharing don't need to be.
Hmm...it would actually be pretty easy to incorporate the bittorrent protocol into a new version of "apt". The new version needs to be able to recognize two basic sorts of files:
1. *.deb - a file which is downloaded directly from the server via normal http, just like today's apt.
and
2. *.deb.torrent - a file which is downloaded via bittorrent rather than http, via the bittorrent protocol.
This new version of apt should first look for a *.deb.torrent file, and only revert to the *.deb file if the torrent either doesn't exist or there's some problem in downloading (or if an option switch is specified to explicitely not use torrents). This way, both backwards and forwards compatibility with the existing apt clients is maintained.
Brilliant!:cool: