轉載 http://www.iteye.com/topic/475010
網格技術分為兩種一種為網格計算一種為網格數據,gridgain是網格計算,可以根據規則分節點技術,提高計算速度,比如用于規則引擎,技術引擎等,銀行結算,保險考核結算等。但是如果在計算中數據時分布式或者是延時加載時,此時數據獲取不到,這個時候就需要用到網格數據,在網格中計算,在網格中獲取數據,這個時候Infinispan就是一個不錯的選擇!
數據分區技術和數據網格的集成
概述:
當處理大量數據的時候,常常值得推薦的是跨節點把數據分隔開處理。基本上,每個點負責處理數據的一部分。這種方法基本上允許從數據庫數據中加載大量的數據到緩存,然后配置你的電腦區執行這些數據。為什么?為了避免數據在各節點的重復緩沖,這樣往往可以提升性能,防止服務器癱瘓。
使用gridgain,使用Affinity Load Balancing這樣的設計非常完美的解決了這個問題,而且可以和分布式緩存集成,解決數據網格。

Affinity Load Balancing
在GridGain中Affinity Load Balancing是通過GridAffinityLoadBalancingSpi.提供。
下圖說明是使用數據網格和不適用數據網格的差別。左面的圖表示沒使用GridGain的執行流程,其中遠程數據庫服務器負責查詢數據,然后傳遞到主調用服務器。這種比數據庫訪問要快,但是結果計算使使用很多不必要的流量。
右圖,使用了Gridgain。整個邏輯計算與數據訪問整合到本地節點。假設大量邏輯計算比數據序列到數據庫要輕巧(即大量計算),那么網絡流量將是最小的。此外,您的計算都可以訪問節點2和節點3的數據。在這種情況下,GridGain將分為邏輯計算jobs和合適的邏輯計算路由到相應的數據服務中進行計算。以確保所有計算都在本地節點中計算。現在,如果數據服務節點崩潰時,您的失敗jobs會自動轉移到其他節點,這種是允許失敗的(數據網格和分布式緩存提供這種方式)。
數據網格集成
GridGain沒有實現數據高速緩存,但是與現有的數 據高速緩存或數據網格解決方案進行了集成。這使用戶可以使用幾乎任何的分布式緩存來實現自己喜歡的方案。
比如:GridGain提供了一個JBoss Cache Data Partitioning Example 告訴用戶如何來使用Attinty Load Balancing。事實上,JBOSSCache沒有提供數據分區的功能。由于使用了GridGain的GridAffinityLoadBalancingSpi提供的Attinity Load Balancing讓JBoss Cache 數據分區成為了可能。
本文包含附件:admin@pjprimer.com 索取
==========English==========
Overview: When processing mass data, what often be worth to recommend is to cross node to open data space processing. Basically, every order the one share of responsible processing data. This kind of method basically allows to arrive from the data with the much to load in database data cache, the computer division that deploys you next carries out these data. Why? To avoid the data repetition in each node amortize, often can promote property so, prevent a server to break down. Use Gridgain, the settlement with such very ideal design of use Affinity Load Balancing this problem, and can mix distributed cache is compositive, solve data reseau. Affinity Load Balancing is in GridGain Affinity Load Balancing is to pass GridAffinityLoadBalancingSpi. Offer. Specification laying a plan is the difference of service data reseau and reseau of not applicable data. The graph of left expresses to did not use the executive technological process of GridGain, among them long-range database server is in charge of inquiring data, deliver next advocate call a server. Than the database the visit wants this kind fast, but as a result computation makes use a lot of needless flow. Right graph, used Gridgain. Whole and logistic computation and data visit conformity arrive this locality node. Assume a large number of logistic computation compare data alignment to want to the database deft (calculate in great quantities namely) , so network discharge will be the smallest. In addition, your computation can visit node 2 with node the data of 3. Below this kind of circumstance, gridGain calculates component for logic Jobs and right logistic computation way by have consideration in corresponding data service. In order to ensure all computation are calculated in this locality node. Now, when if data serves node,breaking down, your unsuccessful Jobs can transfer other node automatically, this kind is allow failure (data reseau and distributed cache offer this kind of way) . [Compositive GridGain did not realize Img][/img] data reseau cache of data high speed, but undertook with cache of existing data high speed or data reseau solution compositive. This makes the user can be used almost any distributed cache will implement the plan that he likes. For instance: GridGain offerred a JBoss Cache Data Partitioning Example to tell an user how to use Attinty Load Balancing. In fact, JBOSSCache did not provide the function of data partition. Because used the Attinity Load Balancing that the GridAffinityLoadBalancingSpi of GridGain offers to let JBoss Eamil ask for: Admin@pjprimer.com