Open topic with navigation

TIBCO GridServer® 7.1.0

# 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:

Grid Library Filter DTD

Element | Description | Elements and Attributes
`grid-library-filter` | root element | Elements
| • | `property-condition-set*`
`property-condition-set*` | A set of conditions that must be satisfied for the Engine to synchronize | Elements
| • | `property-condition*`
| • | `property-condition-set*`
Attributes
| • | `operator?`
`property-condition*` | A condition that must be satisfied for the Engine to synchronize | Elements
| • | `property`
| • | `comparison`
Attributes
| • | `null-compare?`

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.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO GridServer®

Copyright © 2001-2022. TIBCO Software Inc. All Rights Reserved.