Grid Library Filters
You can limit which Engines synchronize a Grid Library using Grid Library filters. This enables you to define a filter file in XML that specifies which Engines based on Engine properties. This decreases hard drive usage and network bandwidth in deployments where not all Engines can or are allowed to work on certain types of Services.
A Grid Library filter is an XML with the same name as its associated Grid Library and ends with the extension .filter. When an Engine requests a resources sync, the list of Grid Libraries are filtered based on the matching of the conditions.
Grid Library Filter DTD
A Grid Library filter has the following DTD:
|
Element |
Description |
Elements and Attributes |
|||||||||
|
|
root element |
Elements
|
|||||||||
|
|
A set of conditions that must be satisfied for the Engine to synchronize |
Elements
Attributes
|
|||||||||
|
|
A condition that must be satisfied for the Engine to synchronize |
Elements
Attributes
|
A property-condition uses the following comparison attributes:
| • | contains |
| • | notContains |
| • | matches |
| • | notMatches |
| • | equal |
| • | notEqual |
| • | greaterThan |
| • | lessThan |
| • | greaterThanEqual |
| • | lessThanEqual |
The operator attribute can be and (the default) or or. The null-compare attribute can be false (the default) or true.
Filter Example
The following code is an example of a simple filter which only deploys a given Grid Library to Engines running four or more instances:
<grid-library-filter>
<property-condition-set>
<property-condition>
<property>
<name>numInstances</name>
<value>4</value>
</property>
<comparison>greaterThanEqual</comparison>
</property-condition>
</property-condition-set>
</grid-library-filter>
Deploying Grid Library Filters
Grid Library filters are uploaded in the GridServer Administration Tool at Services > Services > Grid Libraries, using the same control used to upload Grid Libraries. When you upload a filter, it is first validated to ensure it is valid XML and the comparison, property, value, and type elements are valid and property.name elements are not empty. Also, there is a 16 KB size limit for filters, which is checked.
After the filter is validated, you are prompted if you want to deploy it. If you click Cancel, the filter is not added to the Manager.
Deployed filters are shown in the list of entries on the Services > Services > Grid Libraries page, and you can delete them the same way you delete a Grid Library. Unlike Grid Libraries, you can upload a filter with a duplicate name to replace an existing filter with a revised version.