=head1 NAME AnyEvent::MP::Global - some network-global services =head1 SYNOPSIS use AnyEvent::MP::Global; # -OR- aemp addservice AnyEvent::MP::Global:: =head1 DESCRIPTION This module provides an assortment of network-global functions: group name registration and non-local locks. It will also try to build and maintain a full mesh of all network nodes. =head1 GLOBALS AND FUNCTIONS =over 4 =cut package AnyEvent::MP::Global; use common::sense; use Carp (); use MIME::Base64 (); use AnyEvent::MP; use AnyEvent::MP::Kernel; our $VERSION = $AnyEvent::MP::VERSION; our $port = port; # in response to up_nodes request rcv $port, connect_nodes => sub { connect_node $_ for @_; }; sub mon_node { my ($noderef, $is_up) = @_; if ($is_up) { # request any other nodes possibly known to us snd $noderef, up_nodes => $port, "connect_nodes"; } #warn "node<$noderef,$is_up>\n";#d# } mon_node $_, 1 for up_nodes; mon_nodes \&mon_node; =back =head1 SEE ALSO L. =head1 AUTHOR Marc Lehmann http://home.schmorp.de/ =cut 1