CORAL Component documentation: LFCLookupService

RRCAT Team

RRCAT, INDIA

August 2006


1. Introduction

1.1. Purpose of the component

The LFCLookupService package is a plugin library providing logical-physical mapping technology using LFC and providing an implementation of the ILookupService interface.

1.2. Repository of the component

:pserver:anonymoys@coral.cvs.cern.ch:/cvs/coral/coral/LFCLookupService

2. LFCLookupService Semantics

The LFCLookupService is responsible for logical-physical mapping and for providing the list of possible replicas based on logical service name, authentication method and access mode. The lookup is done from LFC server set through the environment variable LFC_HOST.

LFCLookupService returns a list of possible replicas as object of class IDatabaseServiceSet defined in RelationalAccess package. Through IDatabaseServiceSet information can be accessed about number of available replicas, replica connection string, allowed access mode and authentication procedure.

3. Implementation Specifics

The implementation of package is based on LFC. It establishes a connection with LFC server, retrieves the available replicas for a given logical connection string using the LFC APIs, caches them into associated container and lists them, based on authentication mechanism and access mode.

4. Related components

  • RelationalAccess, is the package where the CORAL abstract interfaces are defined.

  • CoralCommon, is the package where some developer-level interfaces and some common implementation classes are defined.

  • LFC, is the package where APIs are defined.

5. LFCLookupService Reference

5.1. Properties of the "CORAL/Services/LFCLookupService" component

  • Strategy of Lookup

    An interface of ILookupService is implemented to perform the logical-physical mapping by providing the list of available replicas from the LFC server with specified authentication method and access mode. Authentication Method is a string, specifying the method used for authentication (parameter to the lookup function, which can be password or certificate). Access Mode can be read-only or update (parameter to the lookup function, default is update).

5.2. Command line tools

A set of LFCDbLookupService administrating tools API has been provided for the management of mapping information stored in LFC. These command line tools are implemented using LFC APIs for adding, removing, listing the replica entries for specified logical connection string and to export the replica entries of a logical connection string into XML file. The following command line tools are available:

  • coral_add_db_replica- Adds a new replica for the specified logical connection string. Usage of the CLI:

    coral_add_db_replica

    • [-h contact_string] (can be skipped if environment variable LFC_HOST is set)

    • -l logical_connection_string (mandatory parameter)

    • -p physical_replica (mandatory parameter)

    • [-r ] (optional for read-only replica, default is "update")

    • [-a authentication_method] (optional, default is "password")

  • coral_remove_db_replica- Removes an existing replica or all replicas mapped to a logical connection string. Usage of the CLI:

    coral_remove_db_replica

    • [-h contact_string] (can be skipped if environment variable LFC_HOST is set)

    • -l logical_connection_string (mandatory parameter)

    • [-p physical_replica] (optional, only removes the specified replica. If not specified, the entire replica entries for the logical_connection_string are removed)

  • coral_list_db_replicas- Lists available replicas mapped to a logical connection string - with optional filters. Usage of the CLI:

  • coral_list_db_replicas

    • [-h contact_string] (can be skipped if environment variable LFC_HOST is set)

    • [-l logical_connection_string] (optional filter for a specified logical connection string. If logical connection string is not specified, replicas for all logical connection strings available on the host are listed.)

    • [-r] (optional filter for read-only, only replicas with read-only mode are listed)

    • [-u] (optional filter for update, only replicas with update mode are listed)

  • coral_export_db_catalogue- Exports the db catalogue - Extracts the subset of dbreplica catalogue creating xml files in the format like dblookup.xml. Usage of the CLI:

  • coral_export_db_catalogue

    • [-h contact_string] (can be skipped if environment variable LFC_HOST is set)

    • [-f file name] (optional, default is dblookup.xml)

    • [-l logical_connection_string] (optional filter for a specified logical connection string. If logical connection string is not specified, replicas for all logical connection strings available on the host are exportted to the xml file.)

    • [-r] (optional filter for read-only, only replicas with read-only mode are exported)

    • [-u] (optional filter for update, only replicas with update mode are exported)