NAME
perfSONAR_PS::Services::MA::PingER - A module that implements MA service.
DESCRIPTION
This module aims to offer simple methods for dealing with requests for information, and the related tasks of intializing the backend storage.
SYNOPSIS
use perfSONAR_PS::Services::MA::PingER;
my %conf = ();
$conf{"METADATA_DB_TYPE"} = "xmldb";
$conf{"METADATA_DB_NAME"} = "/home/netadmin/LHCOPN/perfSONAR-PS/MP/Ping/xmldb";
$conf{"METADATA_DB_FILE"} = "pingerstore.dbxml";
$conf{"SQL_DB_USER"} = "pinger";
$conf{"SQL_DB_PASS"} = "pinger";
$conf{"SQL_DB_DB"} = "pinger_pairs";
my $pingerMA_conf = perfSONAR_PS::SimpleConfig->new( -FILE => 'pingerMA.conf', -PROMPTS => \%CONF_PROMPTS, -DIALOG => '1');
my $config_data = $pingerMA_conf->parse();
$pingerMA_conf->store;
%conf = %{$pingerMA_conf->getNormalizedData()};
my $ma = perfSONAR_PS::MA::PingER->new( \%con );
# or
# $self = perfSONAR_PS::MA::PingER->new;
# $self->setConf(\%conf);
$self->init;
while(1) {
$self->receive;
$self->respond;
}
DETAILS
This API is a work in progress, and still does not reflect the general access needed in an MA. Additional logic is needed to address issues such as different backend storage facilities.
API
The offered API is simple, but offers the key functions we need in a measurement archive.
new
create a new instance of the PingER MA
init( $handler )
Initiate the MA; configure the configuration defaults, and message handlers.
database
accessor/mutator for database instance
ls
accessor/mutator for the lookup service
needLS
Should the instance of the PingER register with a LS?
registerLS
register all the metadata that our ma contains to the LS
handleEvent()
main access into MA from Daemon Architecture
__handleEvent( $request )
actually do something the incoming $request message.
mergeMetadata This function is called by the daemon if the module has registered a merge handler and a md is found that needs to be merged with another md and has an eventType that matches what's been registered with the daemon.
messageType: The type of the message where the merging is occurring
eventType: The event type in at least one of the md that caused this handler to be chosen
parentMd: The metadata that was metadataIdRef'd by the childMd
childMd: The metadata that needs to be merged with its parent
SEE ALSO
perfSONAR_PS::MA::Base, perfSONAR_PS::MA::General, perfSONAR_PS::Common, perfSONAR_PS::Messages, perfSONAR_PS::DB::File, perfSONAR_PS::DB::XMLDB, perfSONAR_PS::DB::RRD, perfSONAR_PS::Datatypes::Namespace, perfSONAR_PS::SimpleConfig
To join the 'perfSONAR-PS' mailing list, please visit:
https://mail.internet2.edu/wws/info/i2-perfsonar
The perfSONAR-PS subversion repository is located at:
https://svn.internet2.edu/svn/perfSONAR-PS
Questions and comments can be directed to the author, or the mailing list.
VERSION
$Id: PingER.pm 227 2007-06-13 12:25:52Z zurawski $
AUTHOR
Yee-Ting Li, <ytl@slac.stanford.edu> Maxim Grigoriev, <maxim@fnal.gov> Jason Zurawski, <zurawski@internet2.edu>
COPYRIGHT AND LICENSE
Copyright (C) 2007 by Internet2
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.