Catalog Framework
Catalog Framework
The Catalog Framework wires all Catalog Components together. It is responsible for routing Catalog requests and responses to the appropriate target. Endpoints send Catalog requests to the Catalog Framework. The Catalog Framework then invokes Catalog Plugins, Transformers, and Resource Components as needed before sending requests to the intended destination such as one or more Sources.
Example Catalog Frameworks
The Catalog comes with the following Catalog Frameworks out of the box:
Catalog Framework Sequence Diagrams
Because the Catalog Framework plays a central role to Catalog functionality, it interacts with many different Catalog components. To illustrate these relationships, high level sequence diagrams with notional class names are provided below. These examples are for illustrative purposes only and do not necessarily represent every step in each procedure.
Ingest
The Ingest Service Endpoint, the Catalog Framework, and the Catalog Provider are key components of the Reference Implementation. The Endpoint bundle implements a Web service that allows clients to create, update, and delete metacards. The Endpoint calls the CatalogFramework
to execute the operations of its specification. The CatalogFramework
routes the request through optional PreIngest and PostIngest Catalog Plugins which may modify the ingest request/response before/after the Catalog Provider executes the ingest request and provides the response. Note that a CatalogProvider must be present for any ingest requests to be successfully processed, otherwise a fault is returned.
More details of this flow are shown in the diagram below:
This flow is similar for updating catalog entries, with update requests calling the update(UpdateRequest)
methods on the Endpoint, CatalogFramework
, and Catalog Provider. Similarly for deletion of catalog entries, the delete requests call the delete(DeleteRequest)
methods on the Endpoint, CatalogFramework
, and Catalog Provider.
Error Handling
Any ingest attempts that fail inside the Catalog Framework (whether the failure comes from the Catalog Framework itself, pre-ingest plugin failures, or issues with the Catalog Provider) will be logged to a separate log file for ease of error handling. The file is located at data/log/ingest_error.log, and will log the Metacards that fail, their ID and Title name, and the stack trace associated with their failure. By default, successful ingest attempts are not logged, however that functionality can be achieved by setting the log level of the ingestLogger to DEBUG (note that enabling DEBUG can cause a non-trivial performance hit).
Query
The Query Service Endpoint, the Catalog Framework, and the CatalogProvider
are key components for processing a query request as well. The Endpoint bundle contains a Web service that exposes the interface to query for Metacards
. The Endpoint calls the CatalogFramework
to execute the operations of its specification. The CatalogFramework
relies on the CatalogProvider
to execute the actual query. Optional PreQuery and PostQuery Catalog Plugins may be invoked by the CatalogFramework
to modify the query request/response prior to the Catalog Provider processing the query request and provides the query response. If a CatalogProvider
is not configured and no other remote Sources
are configured a fault will be returned. It is possible to have only remote Sources
configured and no local CatalogProvider
configured and be able to execute queries to specific remote Sources
by specifying the site name(s) in the query request.