curl-users
multi-threaded/segmented downloads w/ cURL
Date: Sun, 7 May 2006 16:24:51 -0400
Hi,
I've been working on an XML file format called Metalink for storing Mirror &
p2p locations for easy/automatic segmented downloads. A few download
managers support it now, with a few more on the way. No unix clients, which
is too bad because I designed it w/ open source projects in mind. It's
really handy for stuff like CD/DVD ISOs.
A .metalink file looks like this:
<metalink version="3.0" xmlns="http://www.metalinker.org/">
<files>
<file name="example.ext">
<verification>
<hash type="md5">example-md5-hash</hash>
<hash type="sha1">example-sha1-hash</hash>
</verification>
<resources>
<url type="ftp">ftp://ftp.example.com/example.ext</url>
<url type="http">http://www.example2.com/example.ext</url>
<url type="bittorrent>http://www.ex.com/example.ext.torrent</url>
<url type="magnet"/>
<url type="ed2k"/>
</resources>
</file>
</files>
</metalink>
(There would usually be a bunch of ftp & http sources listed. There's also
language/OS information in files, so a .metalink for OpenOffice.org lists
all the language & Oses, & the client would download the file for your
language/OS if available).
Programs that don't support p2p would just use the multiple ftp/http URLs
listed, get segments from each in parallel, then run md5sum or sha1sum
against the finished download & compare checksums. You can see a video
capture of it working at http://www.metalinker.org/implementation.html
I emailed Daniel Stenberg about this & he said:
"curl currently has no XML parser or anything... Probably it would be
easiest to start with writing a separate command line tool for this that
uses libcurl for the transfers with each individual server. Using the multi
interface, it will also be easy to do it still using a single thread."
If anyone would be interested in working on this project, please contact me.
I'd be happy to sponsor development financially.
Current clients that support Metalink
FlashGot http://www.flashgot.net/
GetRight http://www.getright.com/beta6.html
thanks!
ant
http://www.metalinker.org/
Received on 2006-05-07