You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

The Data Access Component (DAC) plays a new role in the FEWS system. It allows webservices that are deployed in the same servlet container as the DAC to communicate directly with the FEWS central database.

Functionality

The main functionality of the Data Access Component is given below.

  • Allow webservice deployed in a Servlet container such as Tomcat to access the FEWS central database directly or through an instance of the DataStore component. Through the DataStore component it will be possible to access the following information:
    - read / write timeseries
    - read / log messages
    - read FEWS configuration
    - run workflows

Design

The Design of the FEWS data access component is directly linked to the FEWS database model. For more information on the design of the FEWS database model we refer to documentation of the Master Controller database.

The Data Access Components will make use of existing components such as the DataStore component currently used by the FEWS client instances (OC, FSS) and the ExtendedDataSource components used to connect to de Master Controller database.

Data Access Component

Is a java class that is configured as a Global Resource in a Servlet container and will be initialized as a Singleton for each database connection. The Data Access Component will implement an interface that will allow webservices to access the FEWS DataStore. In the future this interface can be expanded to provide more convenience methods and to reduce code duplication. All resources used by the Data Access Component will be added to the Tomcat class path. This way it is possible for other webservices deployed in the same Servlet container to access and use the DataStore without having to include all FEWS data access resources.

Each instance of the Data Access Component represents one database connection for one FEWS region.

DataStore

This component will be initialized once the Data Access Component is initialized. A DataStore requires an instance of a ExternalDataSource (connection to MC database) and a reference to a cache directory for storing the datastore cache files. This information is configured in the Global Resource of the Data Access Component.

ExternalDataSource

This is a component required by the DataStore. This component will be configured as a separate Global Resource within the Servlet container. Only one ExternalDataSource instance is allowed per Master Controller database.

FEWS Webservice

A FEWS webservice component that uses the Data Access Component can do so by performing a lookup from the InitialContext. Each webservice can use the FEWS configuration present in the central database. It is up to the webservice itself to decide how it wishes to publish the available information to the outside world. This can either be done by publishing Capabilities in the same way OGC standards do this (WMS, WFS, WaterML) or by configuration such as the FewsPiService does this.

Security

To secure access to the Data Access Component or to individual webservices there are standards provided by the Servlet container. We will make use of these standards wherever and whenever required.

  • No labels