Dashboard > GridGain User Guide > Table Of Contents > Developers Guide > SPI - Service Provider Interfaces > Information > Page Comparison
SPI - Service Provider Interfaces
Version 42 by morpheus
on Dec 23, 2008 02:23.


compared with
Current by morpheus
on Dec 23, 2008 13:02.

(show comment)
 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 * [#Service Provider Interface]
 * [#Specifying Different SPIs Per GridTask]
  
 h2. Service Provider Interface
 Service Provider Interface (SPI) design plays a key role in how GridGain is architected. From the initial stage GridGain was designed to fully "blend" into what we call a _hosting environment_. It is an important consideration because in many (if not in majority of) cases GridGain will not be deployed standalone but rather as part of bigger stack such as JEE application server, JSP/Servlet container or some other proprietary system like Tangosol Coherence.
  
 SPIs allow GridGain to abstract out most of the fundamental low-level functionality, provide pluggable implementation capability and base the rest of the system on this functionality without depending on a specific implementation of it. Good comparison and the most direct analogy of this design is HAL (Hardware Abstraction Layer) used by all modern operating system to abstract them from the specifics of the particular hardware configuration.
  
 SPI-based design along with the flexible configuration allows GridGain to start within these environments and fully utilize the services provided by them. Here are the few actual examples:
 * Communication SPI allows GridGain to use JBoss HA facility when running in JBoss or Coherence protocol when running within Coherence for communication exchange
 * Discovery SPI allows GridGain to use either JBoss HA or Coherence Clusteting when running in JBoss or Coherence for its topology and discovery functionality
 * URI deployment SPI allows to configure GridGain to use the same deployment folder and model as hosting JEE server
  
 GridGain comes with the following SPIs. We expect this list to grow as the product advances. Note that GridGain always comes pre-packaged with at least one default (and usually several) implementations for every SPI (in some cases like with communication and discovery SPIs GridGain comes with half a dozen of pre-built SPI implementations). Here is the list of all SPIs for GridGain:
 {table:class=confluenceTable}
 {tr}
  {th:class=confluenceTh}SPI{th}
  {th:class=confluenceTh}Description{th}
  {th:class=confluenceTh}Multiple Support{th}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_discovery.png! [Discovery|Discovery SPI]{td}
  {td:class=confluenceTd}Responsible for discovery of new nodes and detecting failed nodes.{td}
  {td:class=confluenceTd}No{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_communication.png! [Communication|Communication SPI]{td}
  {td:class=confluenceTd}Provides capability to send and receive messages between grid nodes.{td}
  {td:class=confluenceTd}No{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_collision.png! [Collision|Collision SPI]{td}
  {td:class=confluenceTd}Provides job scheduling and collision resolution on remote nodes.{td}
  {td:class=confluenceTd}No{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_failover.png! [Failover|Failover SPI]{td}
  {td:class=confluenceTd}Provides pluggable grid job fail-over logic.{td}
  {td:class=confluenceTd}Yes{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_topology.png! [Topology|Topology SPI]{td}
  {td:class=confluenceTd}Provides pluggable topology management logic.{td}
  {td:class=confluenceTd}Yes{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_loadbalancing.png! [Load Balancing|Load Balancing SPI]{td}
  {td:class=confluenceTd}!http://www.gridgain.com/images/small_20.gif! Provides pluggable load balancing policies to distribute load between grid nodes.{td}
  {td:class=confluenceTd}Yes{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_checkpoint.png! [Checkpoint|Checkpoint SPI]{td}
  {td:class=confluenceTd}Provides an ability to save an intermediate job state.{td}
  {td:class=confluenceTd}Yes{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_deployment.png! [Deployment|Deployment SPI]{td}
  {td:class=confluenceTd}Responsible for deploying/undeploying tasks from different sources.{td}
  {td:class=confluenceTd}No{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_eventstorage.png! [Event Storage|Event Storage SPI]{td}
  {td:class=confluenceTd}Provides storage for locally generated events.{td}
  {td:class=confluenceTd}No{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_tracing.png! [Tracing|Tracing SPI]{td}
  {td:class=confluenceTd}Allows to plug-in various external runtime monitoring solutions.{td}
  {td:class=confluenceTd}No{td}
 {tr}
 {tr}
  {td:class=confluenceTd|nowrap=true}!http://www.gridgain.com/images/spi_metrics.png! [Metrics|Local Metrics SPI]{td}
  {td:class=confluenceTd}!http://www.gridgain.com/images/small_20.gif! Provides up-to-date node's telemetry information.{td}
  {td:class=confluenceTd}No{td}
 {tr}
 {table}
  
 h2. Specifying Different SPIs Per GridTask
 Starting with GridGain 2.1 you can start multiple instances of [GridTopologySpi|Topology SPI], [GridLoadBalancingSpi|Load Balancing SPI], [GridFailoverSpi|Failover SPI], and [GridCheckpointSpi|Checkpoint SPI]. If you do that, you need to tell a task which SPI to use (by default it will use the fist SPI in the list).
  
  Add {{@GridTaskSpis}} {javadoc:GridTaskSpis.html} annotation to your task to specify which SPIs it wants to use. If this annotation is omitted, then by default GridGain will pick the first corresponding SPI implementation from the array provided in configuration.
  Add {{@GridTaskSpis}} {javadoc:GridTaskSpis.html} annotation to your task to specify which SPIs it wants to use. If this annotation is omitted, then by default GridGain will pick the first corresponding SPI implementation from the array of SPIs provided in configuration.
  
 For more information and examples refer to [Specifying Different SPIs Per GridTask|Grid Configuration#Specifying Different SPIs Per GridTask] documentation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators