The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perfSONAR_PS::LS::LS - A module that provides methods for the single domain LS (sLS).

DESCRIPTION

This module provides functionality to accept various forms of message and interact with an XML Database to store and return various forms of XML based information.

SYNOPSIS

    use perfSONAR_PS::LS::LS;

    my %conf = ();
    $conf{"METADATA_DB_TYPE"} = "xmldb";
    $conf{"METADATA_DB_NAME"} = "/home/jason/perfSONAR-PS/LS/xmldb";
    $conf{"METADATA_DB_FILE"} = "store.dbxml";
    $conf{"METADATA_DB_CONTROL_FILE"} = "control.dbxml";

    my %ns = (
      nmwg => "http://ggf.org/ns/nmwg/base/2.0/",
      netutil => "http://ggf.org/ns/nmwg/characteristic/utilization/2.0/",
      nmwgt => "http://ggf.org/ns/nmwg/topology/2.0/",
      snmp => "http://ggf.org/ns/nmwg/tools/snmp/2.0/",
      select => "http://ggf.org/ns/nmwg/ops/select/2.0/",
      perfsonar => "http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/",
      psservice => "http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/",
      xquery => "http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/",
      xpath => "http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xpath/1.0/"
    );

    my $ls = perfSONAR_PS::LS::LS->new(\%conf, \%ns);

    # or
    # $ls = perfSONAR_PS::LS::LS->new;
    # $ls->setConf(\%conf);
    # $ls->setNamespaces(\%ns);

    $ls->init;
    while(1) {
      $ls->receive;
    }

DETAILS

This API is a work in progress, and still does not reflect the general access needed in an LS.

API

The offered API is simple, but offers the key functions we need in a lookup service.

init($self)

Initialize the underlying transportation medium. This function depends on certain conf file values.

receive($self)

Receives messages from the Transport.pm module above and acts upon them.

handleRequest($self, $request, $doc)

Functions as the 'gatekeeper' the the MA. Will either reject or accept requets. will also 'do nothing' in the event that a request has been acted on by the lower layer.

__handleRequest($self, $request, $doc)

Based on the type of message that enters this service, route to the proper handling code.

handleMessageParameters($self, $msgParams)

Extracts and acts on any message level parameters this service may recognize. Not to be used externally.

prepareDatabases($self, $doc)

Opens the databases, returns errors if applicable. Not to be used externally.

isValidKey($self, $metadatadb, $key)

Given a key, check to see if it is in the database yet.

lsRegisterRequest($self, $doc, $request)

Acts on LSRegisterRequest messages. Not to be used externally.

lsDeregisterRequest($self, $doc, $request)

Acts on LSDeregisterRequest messages. Not to be used externally.

lsKeepaliveRequest($self, $doc, $request)

Acts on LSKeepaliveRequest messages. Not to be used externally.

lsQueryRequest($self, $doc, $request)

Acts on LSQueryRequest messages. Not to be used externally.

SEE ALSO

Exporter, Log::Log4perl, File::Temp, Time::HiRes, perfSONAR_PS::LS::Base, perfSONAR_PS::MA::General, perfSONAR_PS::LS::General, perfSONAR_PS::Common, perfSONAR_PS::Messages, perfSONAR_PS::DB::XMLDB

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. Bugs, feature requests, and improvements can be directed here:

  https://bugs.internet2.edu/jira/browse/PSPS

VERSION

$Id$

AUTHOR

Jason Zurawski, zurawski@internet2.edu

LICENSE

You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <http://www.internet2.edu/membership/ip.html>

COPYRIGHT

Copyright (c) 2004-2007, Internet2 and the University of Delaware

All rights reserved.