Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

  (email not shown publicly)

Journal of Alias (5735)

Sunday September 07, 2008
11:07 PM

CPAN::Indexer::Mirror - Enabling mirror auto-discovery

[ #37386 ]

CPAN::Indexer::Mirror implements a long-awaited (by me at least) chunk of functionality for the PAUSE indexer.

Specifically, it creates mirror.yaml and mirror.json files which contain something like the following.

version: 1.0
name: JavaScript Archive Network
timestamp: 2008-08-15T21:17:52Z

The file contains the absolute minimum needed for a client to work out if a mirror URI is valid, what it is mirroring, how long it has been since the last syncronisation (or at least since the last indexer run) and a list of mirrors that it can probe to look for a better option than the one it is currently running.

The mirror.json file is identical to the YAML version, but encoded in JSON instead of YAML, making it easier for webby applications to do similar mirror detection.

On the client side, a matching Mirror::YAML module (currently out of date, but being updated) implements the client logic needed to validate, check for updated mirror lists, and scan for the "best" mirror (serially).

More advanced modules, based on something like HTTP::Client::Parallel would give the ability to do the same mirror selection functions, but would call a number of mirrors at the same time, making the selection of a "good" mirror a completely automated (and reasonably fast) process.

Amoungst other features, this should finally allow us to do away with the (defunct) method of asking a user what mirror to use, when most of the time the user doesn't have any idea which one to use either.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.