Dashboard > GridGain User Guide > Table Of Contents > Developers Guide > Topology SPI
Topology SPI
Added by morpheus, last edited by morpheus on Nov 12, 2008  (view change)
Labels: 
(None)


Click on Javadoc link to open Javadoc documentation.

Package

org.gridgain.grid.spi.topology Javadoc

Built-in Implementations

GridGain comes with following implementations for topology SPI:

Description

GridTopologySpi Javadoc SPI allows developer to have a custom logic deciding what specific set of grid nodes (topology) is available to GridGain in any given point of time. This SPI is called every time when grid task gets mapped (GridTask.map(List,Object) Javadoc ).

Implementations can employ various strategies, e.g., some may be time based when certain nodes are available only at certain time or dates, or topology can be based on average load of the nodes, or it can be based on specifics of the task obtained from the task session and ability to match them to grid nodes.

Note that in simple environments the topology is often the same as entire grid (sometimes minus the local node). More complex topology management is required only when available topology changes per task or per some other condition.

Configuration

GridTopologySpi Javadoc is provided in Configuring GridGain passed into GridFactory Javadoc at startup. You can configure a different topology SPI implementation as follows

GridConfigurationAdapter cfg = new GridConfigurationAdapter();

GridBasicTopologySpi topSpi = new GridBasicTopologySpi();

// Exclude local node from topology.
topSpi.setLocalNode(false);

// Configure your own topology SPI.
cfg.setTopologySpi(topSpi);

GridFactory.start(cfg);

Note that GridConfiguration Javadoc interface is just a bean and can also be configured using spring XML configuration.


For more information about using Spring framework for configuration click here.

Default Implementation

If no topology SPI is provided in configuration by default GridBasicTopologySpi is used.

GridAttributesTopologySpi (GridGain User Guide)
GridBasicTopologySpi (GridGain User Guide)
GridNodeFilterTopologySpi (GridGain User Guide)

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators