Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 Using the Example Code : ASQuery (Java Only)

ASQuery (Java Only)
The ASQuery example is provided only in a Java version.
Overview
ASQuery is a good example to look at to learn about how to compose search filter strings for use when browsing a space. ASQuery first populates the default space (myspace) with 1,000,000 tuples, and then displays the amount of time it took to populate the space.
After the space is populated, ASQuery creates browsers using different searche filters, scans the entries of the space using each browser, and displays the browse statistics. ASQuery adds indexes to the default space (myspace) in order to speed up the filtering of data when processing queries. Indexes are added for the 'key' and 'value' fields.
Starting ASQuery
The following example shows how to invoke ASQuery in Java.
Java Invocation
java ASQuery -metaspace examplems -member_name query
ASQuery by default joins a space (myspace) as a leech. If you try to run ASQuery using the default settings, you will get the following message asking you to start a seeder:
waiting for the space to be ready...
please start 1 seeder nodes (ex. as-agent)
You have two options:
Run ASQuery and specify -role seeder as a command line option.
Starting AS Query With Security
The following example shows the command line options that you can use when starting ASQuery to have it join the security domain exdomain and to use a space with an additional encrypted field:
-discovery tcp://127.0.0.1:50000 -member_name query -security_token exdomain_token.txt -encrypt_field
These command line options start ASQuery using the default metaspace named ms and allow it to connect to a security domain controller that has been started using the example security policy file example_policy.txt. ASQuery will then additionally populate an encrypted field named secure_value. Since encrypted fields cannot be queried, additional queries on the encrypted field have not been added to the example. See the section Data Encryption in Chapter 4., “Implementing ActiveSpaces Security” for information on encrypting data fields.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved