New versions of JSAN::Client and JSAN::Shell

0 views
Skip to first unread message

Adam Kennedy

unread,
Jan 21, 2007, 10:27:01 AM1/21/07
to js...@googlegroups.com
I've just released some small upgrades to the second-generation JSAN client.

JSAN-Client-0.16 (the programmatic client) has some tweaks to protect
against cache-merging (a bug) when the mirror is changed after a cache
already exists on disk. It now caches in a subdirectory of the
configured cache location, based on an MD5 hash of the URI.

JSAN-Shell-2.00_05 (the user shell) integrates the new Mirror::YAML
which does mirror detection, auto-discovery, and master-recovery based
on a mirror.yml file on the servers.

The result of these changes is that now when you start the jsan2 test
client, it will both check for working access to the internet, and will
discovery, benchmark, and select the closest and fastest non-stale
mirror for you (with some pseudo-randomness to avoid concentrating on
one large mirror).

On a typical broadband connection in Australia (i.e. for me) this takes
about 7 seconds. I can optimise this later (with more aggressive
timeouts and such and smarter selection logic), but for now 7 seconds to
guarantee a current and fast mirror without the need for config files is
worth it.

Adam K

Burak Gürsoy

unread,
Jan 26, 2007, 8:13:33 AM1/26/07
to JSAN Users
Why Shell2? Are you planning to delete Casey West' s old shell from
CPAN?

01_compile.t needs a patch under win32. This line is bogus:

my $cmd = "perl $include -c $script 1>/dev/null 2>/dev/null";

must be:

my $NULL = $^O eq 'MSWin32' ? '>NUL 2>NUL' : '>/dev/null 2>/dev/null';
my $cmd = "perl $include -c $script 1 $NULL";

Also see my bug report for TermReadKey

http://rt.cpan.org/Ticket/Display.html?id=24598

After applying these two patches, JSAN-Shell-2.00_05 passes all tests
(except the skipped one -- 99_author.t) under windows.

> On a typical broadband connection in Australia (i.e. for me) this takes
> about 7 seconds.

What can I say? I'm jealous, since my speed is limited to 256K :p

Btw, these two distributions have a lot of dependencies and this makes
them uneasy to install for the average people...

Burak Gürsoy

unread,
Jan 27, 2007, 3:49:21 PM1/27/07
to JSAN Users
Tar and Zip handlers needs a patch:

http://rt.cpan.org/Public/Bug/Display.html?id=24633

And there are some problematic distros on JSAN. I noticed one with
a .tgz extension which makes JSAN::Client croak. Also, Mochikit has
css files, which JSAN::Client ignores and skips.

Burak Gürsoy

unread,
Jan 27, 2007, 3:55:19 PM1/27/07
to JSAN Users
I've used this code to fetch everything on JSAN. Can we add something
like "pull -all"/"install -all" to cmdline?

use strict;
use JSAN::Client;

my $client = JSAN::Client->new(
prefix => 'C:/jsan',
verbose => 1,
);

my $iterator = JSAN::Index::Library->retrieve_all;

while( my $lib = $iterator->next ) {
warn "Installing $lib->{name}\n";
$client->install_library( $lib->{name} );
}

Reply all
Reply to author
Forward
0 new messages