Archive: Torrent Patcher?


Torrent Patcher?
OK. I'm aware of BattleTorrent but I'm a complete nub with NSIS.
I have no idea where to even start with this.

Bittorrent will be the ideal distribution for my program since we will be making small modifications to large files (i.e. they'll essentially just hashcheck their current files, and it will modify the ones that need to be updated).

Can anybody help with a simple starting point on how to utilize bittorrent in NSIS?


Re: Torrent Patcher?

Bittorrent will be the ideal distribution for my program since we will be making small modifications to large files (i.e. they'll essentially just hashcheck their current files, and it will modify the ones that need to be updated).
Are you really sure about this? BitTorrent pieces are always of a fixed size, so if you add even a single byte inbetween two others somewhere, all file data from that point on will have to be redownloaded because the piece hashes have changed. What you probably want is a diff patcher, not BitTorrent hashchecking.

Re: Re: Torrent Patcher?

Originally posted by MSG
Are you really sure about this? BitTorrent pieces are always of a fixed size, so if you add even a single byte inbetween two others somewhere, all file data from that point on will have to be redownloaded because the piece hashes have changed. What you probably want is a diff patcher, not BitTorrent hashchecking.
A diff patcher sounds wonderful.
I take it you'd have to download the diff file and use a diff patcher to make the modifications?

Re: Re: Re: Torrent Patcher?

Originally posted by Rein Masamuri
A diff patcher sounds wonderful.
I take it you'd have to download the diff file and use a diff patcher to make the modifications?
Yeah, that sounds about right. One method would be to use the md5 plugin on a file and send the md5sum to the server, which then decides what diff file to send back to the installer. After download, the installer then patches the file.

Re: Re: Re: Re: Torrent Patcher?

Originally posted by MSG
Yeah, that sounds about right. One method would be to use the md5 plugin on a file and send the md5sum to the server, which then decides what diff file to send back to the installer. After download, the installer then patches the file.
That is way above my head I think, but thanks.

Well diff patches only work from ONE file to ONE other file. If your software has v1.0, v1.1 and v1.5, then the 1.0->1.5 and 1.1->1.5 diff patches will be different.

To deal with this, you'll have to either do incremental upgrades (first 1.0->1.1 and then 1.1->1.5), or keep diff patches for both possibilities. The method I described above would allow the installer to only download the diff patches it needs. If it sends the md5 checksums of the v1.1 files to the server, the server will know it needs to give the 1.1->1.5 diff patches. Then in the future when you create a v1.6, the server would return the 1.1->1.6 diff patches.