
----
h1. Federated Query Processor 1.4 Administrators Guide
----
{cagrid-1.4-docs-nav:name=FQP|guidetype=Administrators}
{cagridtoc:exclude=Federated Query Processor 1.4 Administrators Guide}
h1. Prerequisites
----
The Federated Query Processor service does not require any software or special system configuration beyond the standard caGrid stack.
To make use of the caGrid Transfer infrastructure, the transfer project is required, and the FQP service must be deployed to the *same* Tomcat container as the transfer service.
The performance of the FQP service may benefit from large amounts of RAM and multiple processor cores for handling concurrent query operations, but this is not strictly required to deploy the service.
h1. Obtaining the Service
----
The Federated Query Processor service is available in the caGrid release, and can be found in the directory $CAGRID_LOCATION/projects/fqp. If you have obtained a source release or checkout of caGrid, the FQP service must first be complied. From the directory $CAGRID_LOCATION, execute the command *ant all* to compile all of caGrid including the FQP service, or *ant build-project \-Dsingle.project.name=fqp* to build just the FQP service and the projects on which it depends.
h1. Installing the Software
----
Installation of the Federated Query Processor can be accomplished with either the caGrid Installer, or manually.
h2. Install caGrid and a Container
In this step you will download and install the FQP service and a grid service container using the caGrid Installer. If you already have caGrid 1.4 installed on your machine, and a suitable container, you may proceed to the next section.
{tip}Once you have installed caGrid, the FQP software can be found in the directory location where you installed caGrid, in the _caGrid/projects/fqp_ directory. This guide will refer to that location as *{_}FQP_HOME{_}*
{tip}To install caGrid/FederatedQueryProcessor and set up a container, please complete the following steps:
{include:caGrid14:Install caGrid and Configure a Secure Container Using the caGrid 1.4 Installer}
h1. Configuration
----
{tip}To simply deploy the FQP service with the default configuration, all you really need to edit is the service's standard ServiceMetadata, by following [these instructions|#Service Metadata].
{tip}
h2. Service Properties
The Federated Query Processor service may be configured by changing values specified in the service.properties file found in the root directory of the FQP distribution.
* *maxTargetServicesPerQuery*
** Default value: 12
** Type: Integer
** Controls the maximum number of target data services which may be included in any single DCQL query. If a client attempts to execute a query which specifies more than this number of target data services, an exception will be thrown and the query will not execute. If this value is set to zero (0), the number of services is unlimited.
* *maxRetryTimeout*
** Default value: 300
** Type: Integer
** Controls the maximum number of seconds a client may request the FQP service to wait between retrying queries to target data services which failed to respond correctly. If the client specifies a value greater than this, an exception will be thrown and the query will not execute. If this value is set to zero (0), the maximum timeout is unlimited.
* *maxRetries*
** Default value: 4
** Type: Integer
** Controls the maximum number of retries a client may request the FQP service to perform when retrying to execute queries to target data services which failed to respond correctly. If the client specifies a value greater than this, an exception will be thrown and the query will not execute. If this value is set to zero (0), the maximum number of retries is unlimited.
* *threadPoolSize*
** Default value: 10
** Type: Integer
** Controls the size of the thread pool used by the FQP service to perform DCQL and perform final query aggregation against target data services. Increasing this value may improve performance and responsiveness of the FQP service at the expense of potentially using more server resources.
* *initialResultLeaseInMinutes*
** Default value: 30
** Type: Integer
** Controls the initial time-to-live (lease time) of FederatedQueryResults resources. The value is specified in minutes. Unless the client explicitly requests a termination time for their results resource more distant in the future, after this time has elapsed, the resource will be destroyed. When the resource is destroyed, any remaining query execution tasks are terminated and any DCQL query results are lost.
These properties may be configured at deployment time by the Introduce service deployment GUI, or by directly editing the service.properties file before deploying it.
h2. Service Metadata
The FQP service provides a Resource Property, which acts as metadata for its clients and describes the service's capabilities and information on where it is being hosted. This Resource Property is the caGrid standard _ServiceMetadata_, and is loaded from a file on the filesystem (_serviceMetadata.xml_), which is located in the *{_}FQP_HOME{_}*/etc directory, and is deployed with the service upon [deployment|#Deployment]. This file is fully populated, except for the information about where the service is being hosted. Before deploying the service, you must edit this file and provide the information which describes your organization.
{tip}If you aren't comfortable manually editing XML, you can use Introduce's graphical editor instead when you deploy the service.
{tip}Below is the relevant section of the file which you should edit:
{code:xml} <ns1:hostingResearchCenter>
<ns18:ResearchCenter displayName="" shortName="" xmlns:ns18="gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.common">
<ns18:Address country="" locality="" postalCode="" stateProvince="" street1="" street2=""/>
<ns18:ResearchCenterDescription description="" homepageURL="" imageURL="" rssNewsURL=""/>
<ns18:pointOfContactCollection>
<ns18:PointOfContact affiliation="" email="" firstName="" lastName="" phoneNumber="" role=""/>
</ns18:pointOfContactCollection>
</ns18:ResearchCenter>
</ns1:hostingResearchCenter>
{code}