IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

Package com.ibm.websphere.objectgrid.datagrid

This package contains the interfaces for interacting with the data grid API.

See:
          Description

Interface Summary
AgentManager The AgentManager is the primary interface for submitting MapGridAgent or ReduceGridAgent instances to the ObjectGrid.
EntityAgentMixin This interface can be implemented by an agent.
EntryErrorValue This is returned as the value when the AgentManager is unable to run the agent on the server, the server is unable to complete the agent's transaction or the agent throws an exception.
MapGridAgent A MapGridAgent is used to process operations against map entries in a remote (server-side) ObjectGrid.
ReduceGridAgent A ReduceGridAgent is used to process a set of entries and reduce them to a single result.
 

Package com.ibm.websphere.objectgrid.datagrid Description

This package contains the interfaces for interacting with the data grid API.

Overview

DataGrid is a major new set of application patterns supported by the ObjectGrid. ObjectGrid can store data in a very large grid of computers. The data is partitioned and replicated amongst those servers. DataGrid applications are characterized by including application logic agents in the same process as the data is stored. Clients can send requests to those agents and receive the answers.

Map style

Clients can ask for a particular agent to be invoked for a collection of keys. The agent is invoked once for each key and the results returned to the client. The invocations are in parallel across the grid. Clients can also run a query against each partition and invoke the agent for each key returned by the query. This style is characterized by a single result for each key processed.

Reduce or Aggregation style.

This style is different in that a single result is returned. The application provided set of keys is split in to a list for each partition. An agent is then invoked for each partition with the keys for that partition. The agent returns a single value as a result. Therefore, the intermediate results are a single value for each partition with keys. Finally, these results are aggregated to a single value on the client.

Key directed agents or partition style

Agents can be invoked for specific keys or a client can request the agent be invoked on every partition. The every partition use case usually means the agent will run a client specified query on each partition and process the results of that query.

Basic operation

The application implements MapGridAgent or ReduceGridAgent depending on the pattern required. This agent must be serializable and must be deployed to the ObjectGrid servers. The client then constructs an instance of the agent and may specify additional agent specific state that is passed to the servers. The client obtains an AgentManager instance from the ObjectMap. The client then invokes either callMapAgent or callReduceAgent on the AgentManager. The client must provide the agent instance and a key or collection of keys. These methods must be invoked within a client side transaction. The transaction is used purely for aggregating the results. Each agent on the servers runs using an independent transaction.

The ObjectGrid runtime then invokes the agents on the ObjectGrid servers with relevant data in parallel while the client blocks waiting for the response.


IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.