The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AnyEvent::MP::Global - some network-global services

SYNOPSIS

   use AnyEvent::MP::Global;

DESCRIPTION

This module maintains a fully-meshed network, if possible, and tries to ensure that we are connected to at least one other node.

It also manages named port groups - ports can register themselves in any number of groups that will be available network-wide, which is great for discovering services.

Running it on one node will automatically run it on all nodes, although, at the moment, the global service is started by default anyways.

GLOBALS AND FUNCTIONS

$guard = register $port, $group

Register the given (local!) port in the named global group $group.

The port will be unregistered automatically when the port is destroyed.

When not called in void context, then a guard object will be returned that will also cause the name to be unregistered when destroyed.

$ports = find $group

Returns all the ports currently registered to the given group (as read-only array reference). When the group has no registered members, return undef.

SEE ALSO

AnyEvent::MP.

AUTHOR

 Marc Lehmann <schmorp@schmorp.de>
 http://home.schmorp.de/