|Featured Blog Entries|
Running Queries in Parallel using a ReduceGridAgent
lisaw 0600016B42 Visits (1229)
Data Grid API to run a query over every partition in the grid.
WebSphere eXtreme Scale includes a query engine that allows clients to run queries against a single partition in the grid. The query engine does not provide a way to run queries over the entire grid. This would involve a complex interaction between every partition and wouldn't scale very well. Joining tables across hundreds of partitions, or ordering results requires query decomposition, multiple remote requests and client-side aggregation.
This sample provides a simple alternative that uses a ReduceGridAgent from the Data Grid API to spray a query request to all partitions and return results to the client. The client has access to all of the details of the query result and can perform additional aggregation on the results if needed.
The sample includes the following features:
To install the sample follow these steps:
The <ObjectGrid> directory is the directory where the eXtreme Scale trial was extracted, or the ObjectGrid directory within a WebSphere eXtreme Scale product install.
Running the sample
The ParallelQuery.zip contains the ParallelQuery binary class files and the source files for running parallel queries. It also includes two test cases that demonstrate how to use the sample using both the EntityManager API and the ObjectMap API . The samples can be run with the supplied scripts for Windows and UNIX operating systems, or can also be run in Eclipse.
For details on running the sample, see the README.txt file located in the extracted ParallelQuery directory. For details on running the sample in Eclipse, see the ECLIPSE_README.txt file also located in the extracted ParallelQuery directory.
Please post any feedback on this sample as a comment on this page.