GridAffinityLoadBalancingSpi 數(shù)據(jù)分區(qū)技術(shù)和數(shù)據(jù)網(wǎng)格的集成
轉(zhuǎn)載 http://www.iteye.com/topic/475010
網(wǎng)格技術(shù)分為兩種一種為網(wǎng)格計(jì)算一種為網(wǎng)格數(shù)據(jù),gridgain是網(wǎng)格計(jì)算,可以根據(jù)規(guī)則分節(jié)點(diǎn)技術(shù),提高計(jì)算速度,比如用于規(guī)則引擎,技術(shù)引擎等,銀行結(jié)算,保險(xiǎn)考核結(jié)算等。但是如果在計(jì)算中數(shù)據(jù)時(shí)分布式或者是延時(shí)加載時(shí),此時(shí)數(shù)據(jù)獲取不到,這個(gè)時(shí)候就需要用到網(wǎng)格數(shù)據(jù),在網(wǎng)格中計(jì)算,在網(wǎng)格中獲取數(shù)據(jù),這個(gè)時(shí)候Infinispan就是一個(gè)不錯(cuò)的選擇!
數(shù)據(jù)分區(qū)技術(shù)和數(shù)據(jù)網(wǎng)格的集成
概述:
當(dāng)處理大量數(shù)據(jù)的時(shí)候,常常值得推薦的是跨節(jié)點(diǎn)把數(shù)據(jù)分隔開(kāi)處理。基本上,每個(gè)點(diǎn)負(fù)責(zé)處理數(shù)據(jù)的一部分。這種方法基本上允許從數(shù)據(jù)庫(kù)數(shù)據(jù)中加載大量的數(shù)據(jù)到緩存,然后配置你的電腦區(qū)執(zhí)行這些數(shù)據(jù)。為什么?為了避免數(shù)據(jù)在各節(jié)點(diǎn)的重復(fù)緩沖,這樣往往可以提升性能,防止服務(wù)器癱瘓。
使用gridgain,使用Affinity Load Balancing這樣的設(shè)計(jì)非常完美的解決了這個(gè)問(wèn)題,而且可以和分布式緩存集成,解決數(shù)據(jù)網(wǎng)格。
Affinity Load Balancing
在GridGain中Affinity Load Balancing是通過(guò)GridAffinityLoadBalancingSpi.提供。
下圖說(shuō)明是使用數(shù)據(jù)網(wǎng)格和不適用數(shù)據(jù)網(wǎng)格的差別。左面的圖表示沒(méi)使用GridGain的執(zhí)行流程,其中遠(yuǎn)程數(shù)據(jù)庫(kù)服務(wù)器負(fù)責(zé)查詢(xún)數(shù)據(jù),然后傳遞到主調(diào)用服務(wù)器。這種比數(shù)據(jù)庫(kù)訪問(wèn)要快,但是結(jié)果計(jì)算使使用很多不必要的流量。
右圖,使用了Gridgain。整個(gè)邏輯計(jì)算與數(shù)據(jù)訪問(wèn)整合到本地節(jié)點(diǎn)。假設(shè)大量邏輯計(jì)算比數(shù)據(jù)序列到數(shù)據(jù)庫(kù)要輕巧(即大量計(jì)算),那么網(wǎng)絡(luò)流量將是最小的。此外,您的計(jì)算都可以訪問(wèn)節(jié)點(diǎn)2和節(jié)點(diǎn)3的數(shù)據(jù)。在這種情況下,GridGain將分為邏輯計(jì)算jobs和合適的邏輯計(jì)算路由到相應(yīng)的數(shù)據(jù)服務(wù)中進(jìn)行計(jì)算。以確保所有計(jì)算都在本地節(jié)點(diǎn)中計(jì)算。現(xiàn)在,如果數(shù)據(jù)服務(wù)節(jié)點(diǎn)崩潰時(shí),您的失敗jobs會(huì)自動(dòng)轉(zhuǎn)移到其他節(jié)點(diǎn),這種是允許失敗的(數(shù)據(jù)網(wǎng)格和分布式緩存提供這種方式)。
數(shù)據(jù)網(wǎng)格集成
GridGain沒(méi)有實(shí)現(xiàn)數(shù)據(jù)高速緩存,但是與現(xiàn)有的數(shù) 據(jù)高速緩存或數(shù)據(jù)網(wǎng)格解決方案進(jìn)行了集成。這使用戶(hù)可以使用幾乎任何的分布式緩存來(lái)實(shí)現(xiàn)自己喜歡的方案。
比如:GridGain提供了一個(gè)JBoss Cache Data Partitioning Example 告訴用戶(hù)如何來(lái)使用Attinty Load Balancing。事實(shí)上,JBOSSCache沒(méi)有提供數(shù)據(jù)分區(qū)的功能。由于使用了GridGain的GridAffinityLoadBalancingSpi提供的Attinity Load Balancing讓JBoss Cache 數(shù)據(jù)分區(qū)成為了可能。
本文包含附件: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
posted on 2011-08-06 14:11 w@ns0ng 閱讀(294) 評(píng)論(0) 編輯 收藏 所屬分類(lèi): GridGain