BAT - system overview of the Biodiversity Analysis Tool


Back to top ^


NAME

BAT - system overview of the Biodiversity Analysis Tool

Back to top ^


DESCRIPTION

The Biodiversity Analysis Tool is an application that downloads observation data from selected DiGIR providers and allows a user to run a selection of analyses on a subset of the downloaded data. The main design goal of BAT was to make the application simple, modular, easy to enhance and database portable. Speed and impact on server load were also strong considerations.

Diagram: High Level BAT Architecture

Back to top ^


SOURCE CODE

Source code is available as a zip compressedd tar file. It includes this documentation (as in-line POD documentation).

Source code: bat.zip

Back to top ^


CGI SCRIPT

bat.pl

All user interaction with the BAT system takes place through this CGI script. Different functionality/pages are available by specifying different modes in the mode CGI parameter.

bat.pl

Back to top ^


ADMIN SCRIPTS

update_observation_cache.pl

Deletes all sessions and re-populates the observation records for each data source.

update_observation_cache.pl

expire_sessions.pl

Deletes all sessions and related data whose creation date is older than $BAT::Config::Session_Timeout.

expire_sessions.pl

delete_session.pl

Deletes a single session and all its associated data from the database.

delete_session.pl

Back to top ^


MODULES

BAT::Config

Defines global configuration constants for BAT. Includes config for database connection, DiGIR connection, CGI environment, Data and process management, and map output.

BAT::Config

BAT::AdminConfig

Changes database connection parameters in BAT::Config so that administrative operations like insert(), expire_sesssions() and delete_session() can be performed with the appropriate privileges.

BAT::AdminConfig

BAT::Analysis

Provides standardised access to all analysis modules, including Richness, Endemism and Taxonomic Diversity.

BAT::Analysis

BAT::Database

Module for all database methods.

BAT::Database

BAT::DiGIRLoader

Retrieves and stores observation data.

BAT::DiGIRLoader

BAT::Map

Classifies analysis scores and redirects to the interactive map. See also MAPPING ENVIRONMENT below.

BAT::Map

BAT::Session

Sessions within BAT enable concurrent analysis operations to avoid producing corrupted results. A session in BAT is the combination of a data source (DiGIR provider and resource) and an analysis layer (or analysis grid). It is possible to run different types of analysis against the same session, although the current implementation of BAT creates a new session for each analysis. This effectively adds analysis type as a component of a session, although it is not stored with session data.

The BAT::Session module stores and retrieves session data.

BAT::Session

JavaScript::RPC::SelectTree

JavaScript::RPC::SelectTree implements a subclass of JavaScript::RPC::Server::CGI, and is designed to operate as the server side component for the select-tree JavaScript module. Both modules rely on Brent Ashley's JSRPC client library, available from http://www.ashleyit.com/rs.

The module is used by bat.pl to provide dynamic select elements in the Define Analysis page.

JavaScript::RPC::SelectTree

Net::DiGIR

A general purpose Perl DiGIR client. The version currently used by BAT is in experimental alpha version. I am in the process of re-writing Net::DiGIR as a more robust and flexible module that will eventually be available on CPAN, and possibly on http://digir.net as well.

Back to top ^


DATABASE ENVIRONMENT

BAT Data Model diagram

BAT is uses an Oracle 10g database to store and analyse observation data. Some configuration is also stored in the database, including information on data sources and analysis layers that can be used by the application.

The application was written with database portability in mind, so there are no stored functions or procedures, only basic table structures, sequences and indexes. The SQL in the Perl modules was written to be compliant with the ANSI SQL/86 standard, which is implemented by a large number of commercial and open source database platforms.

All spatial analysis grid layers must be accessible (SELECT only) to the BAT query user in order to assign observation records to analysis units before running an analysis. In the DEH environment, spatial layers are stored in a separate instance to the text data, so views of the spatial layers were created in the BAT user's schema, while a view of the analysis_scores table was created in the map user's schema. This setup would not be necessary if spatial and non-spatial data were stored in the same database instance.

Back to top ^


MAPPING ENVIRONMENT

Mapping for the BAT is handled by ArcIMS 4. Users view maps using a custom Java applet developed for DEH's Environmental Reporting Tool (ERT) and adapted for BAT. The Java applet has been observed to have problems on some platforms or in some network environments. Further information on the ERT interactive map can be gained by contacting the Australian Government Department of the Environment and Heritage.

Back to top ^


AUTHOR

  Bryn Honeyman 2005

Back to top ^

 BAT - system overview of the Biodiversity Analysis Tool