Tags

Running Queries in Parallel using a ReduceGridAgent

This sample demonstrates how to use the WebSphere eXtreme Scale Data Grid API to run a query over every partition in the grid.

Overview

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:

Run a select query against all partitions.

Retrieve the query plan from all partitions and verify that the plan is identical.

Installation

Download the ParallelQuery.zip file from the following downloads section.

Extract the ParallelQuery.zip file to the <ObjectGrid>/samples directory.

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.