• 検索結果がありません。

A Basic Agreement Protocol

3.4 Back-warding strategies

3.4.1 Cuts

M Oi(v). The maximum occurrenceM Oi(v) shows how many times a peerpican take in an agreement procedure. If M Oi(v) = 1, a peer pi can take a value v at most once. If a peerpi had so far taken a valuev or fever times thanM Oi(v), i.e.

|Hiit[v]|< M Oi(v), the peerpi can take a valuev again at roundt. IfM Oi(v) =

, a peerpican take a valuev as many times as the peerpiwould like to take.

At roundt, a peerpi takes a valuevitin the forward method on a historyHit. Here, the valuevithas to satisfy the following conditions:

[Conditions of possible values]

1. For every valuexin the local historyHiit,x→Ei vti. 2. |Hiit[vit]|< M Oi(vti).

LetPit(vit−1) show a set of possible values which a peerpican take at roundt.

The setPit(vit−1) is defined from the conditions as follows:

Pit(vti−1) ={v| |Hiit[v]|< M Oi(v) and for every valuexinHiit,vit−1 Ei v }.

A value v is not included in the possible value set Pit(vit−1) if |Hiit [v]| = M Oi(v). Then, the peer pi takes a value vti in the set Pit(vit−1) if Pit(vit−1) = φ. Then, the peerpi sends the valuevitto the other peers. IfPit(vit−1) =φ, there is no value which the peerpican take at roundtin the forward method after taking a valuevit−1at roundt- 1. Here the peerpihas to take another coordination method, null or compensate. If|Pit(vit−1)| ≥2, the valuevit−1 is referred to as branchable at roundt. Even if a valuevti−1is branchable in the domainDi, i.e.|Corni(vit−1)|

2, the valuevit−1may be taken in previous rounds of the local historyHiit.

[Definition] A cut of a historyHiδi is a tuple of valuesvt11, . . . , vtnnwheretj <

δj for eachj =1, . . . , n.

A cutv1t1, . . . , vtnnis referred to as current ifftj =δj for every peerpj. A cut v1t1, . . . , vtnn is referred to as concurrent iff each valueviti is taken at the same round. A current cut is concurrent.

[Definition] A cutv1t1, . . . , vntnof a historyHiδi is satisfiable in a peerpi iff the cutv1t1, . . . , vntnsatisfies the agreement conditionACi.

Since every peerpi is assumed to have the same agreement conditionACi = AC in this paper, a satisfiable cut in some peer is also satisfiable in every peer.

In the coordination protocol presented in the preceding section, a peerpitakes a forward function, i.e. takes a new value. However, even if the current cut is not satisfiable, there might be a satisfiable cut in a historyHiδi. Suppose the current cutv1δ1, . . . , vnδnis not satisfiable but another cutv1t1, . . . , vntnis satisfiable in a historyHiδi. Here, if every peerpi backs to the previous roundti+ 1 by compen-sating the local history Hiiδi (i = 1, . . ., n), all the peers p1, . . . , pn can make an agreement on a valuev =GDi(v1t1, . . . , vntn) for the cutv1t1, . . . , vntn.

[Definition] Let Hiiδi be a local history vi0, v1i, . . . , viδi−1 of each peer pi (i = 1, . . . , n). A cutct=vt11, . . . , vtnnis obtainable in a peerpiiff a postfixviti+1, . . . , viδi−1 of the local historyHiiδi is compensatable in the peerpi.

A peer pi can back to the previous value viti if there is an obtainable cut v1t1, . . . , vti1, . . . , vnt1. A cutct= v1t1, . . . , vntnis obtainable iff the cut ctis ob-tainable in every peer. A cutct=v1t1, . . . , vntnis maximally obtainable in a peer pi iff the cut ctis obtainable in the peer pti, i.e. a postfix viti+1, . . . , viδi−1 is compensatable, but a postfixviti, viti+1, . . . , viδi−1of the local historyHiiδi is not compensatable. A cutct=v1t1, . . . , vntnis maximally obtainable iff the cut ctis maximally obtainable in every peerpi.

Letctbe a cutvt11, . . . , vntn in a historyHiδi. The cutctis obtainable if the following conditions hold:

[Obtainability conditions]

1. Letmrujbe the most recently uncompensatable value in a local historyHijδj. A valuevjtj in the cutctprecedes the valuemruj inHijδj (mruj ⇒vjtj).

2. Letvk mean a value from a peerpk in the minimal domainM Dj(vjtj), i.e.

vtjj depends onvk(vk j vtjj). From each valuevjtj in the cutct, every value vkinM Dj(vtjj) precedes a value vktk in the local historyHijδj (vk vjtj) as shown in Figure 3.10.

H

i1

H

i3

H

i2

: most recently uncompensatable value.

mru

mru

mru 1

2

3

v1

v2

v3

t1

t2

t3

: value in a cut .ct

i

v

v v1

2

3

ct

1

ct

2

Figure 3.10: Obtainable cut.

Even if a cut ct = vt11, . . . , vtnn satisfies the agreement condition ACi, the previous value viti may not be obtainable in some peer pi. We have to find a cut which is not only satisfiable but also obtainable in each peerpi.

[Definition] Act=v1t1, . . . , vntnis referred to as recoverable in a historyHiδi iff the cutctis satisfiable and obtainable in a peerpi. A cutctis recoverable iff the cutctis recoverable in every peerpi.

[Theorem] If there is a recoverable cutct=v1t1, . . . , vntnin a historyHiδi, every peerpican make an agreement on the cutctby backing to the previous roundti+ 1.

[Proof] The cutct=v1t1, . . . , vntnsatisfies the agreement condition from the as-sumption. Each peer pi can back to the previous roundti + 1 since the cutctis obtainable in the peerpi.

In a historyHiδi, there might be multiple recoverable cutsct1, . . . , ctm (m >

1). Every peerpi has to take the same cutctl out of the possible cutsct1, . . . , ctn. Letct1andct2be a pair of recoverable cutsv11t11, . . . , vt11nnandct2121, . . . , ct22nnof a history Hiδi, respectively. First, the cut ct1 is referred to as precede the other cutct2 in the historyHiδi (ct1 ct2) ift1j ≤t2j for every peer pj (= 1, . . ., n).

Otherwise, a pair of the cutsct1 andct2 are referred to as intersect. Figure 3.11 shows a historyHiδi and three cutsct1,ct2 andct3. Here, the cutct1 precedes the

other cut ct2 (ct1 ct2). The cutsct1 andct2 intersect and the cutsct2 andct3 also intersect. Suppose there are a pair of recoverable cutsct1 andct2 in a history Hiδi. Here, each peerpihas to make a decision on which cutct1 orct2to be taken.

In this paper, each peer pi takes the cutct1 if the cutct2 precedes the cutct1 in the historyHiδi (ct2 ct1). Next, suppose a pair of the cutsct1 andct2 intersect in the historyHiδi. Here, we introduce the weight|ct|for a cutct=vt11, . . . , vntn in a historyHiδ11, . . . , Hinδnas|ct|=

j=1,...,nj -tj). A cutct1 is referred to as smaller than another cutct2 (ct1 < ct2) if|ct1|<|ct2|. The cutct1 is taken if the cutsct1andct2 intersect and thect1 is smaller than the cutct2 (|ct1|<|ct2|). Let CT be a set of recoverable cuts in a historyHiδi. A cutctis referred to as maximal in the history Hiδi iff there is no cutct in the historyHiδi where ctprecedes the cutct (ct→ct). Each peerpiselects a cutctin the setCT as follows:

[Select (CT)]

1. LetM CT be a set of maximal cuts in the setCT with respect to the prece-dent relation.

2. A smallest cutctis selected in the minimal cut setM CT.

H

11

H

13

H

12

ct

1

ct

3

ct

2

Figure 3.11: Cuts.

This selection rule means each peer takes a more recent cut to reduce the number of values which to be withdrawn.

The cuts can be also ordered in the preference of each peer. A cut ct1 = v11t11, . . . , v1t1nn is referred to as more preferable than another cutct2=vt2121, . . . , v2t2nn (ct1 ct2) iffv2t2jj Pj v1t1jj orv2t2jj |Pj v1t1jj for every peer pj (j = 1,. . . , n). The

cutsct1 andct2 are preferentially independent (ct1 |ct2) iff neitherct1 ct2 nor ct1 ct2. A cut ct1 is referred to as preferentially superior to another cut ct2 (ct1 ct2) iff ct1 | ct2 and |{v1j |vt22jj Pj v1t1jj }| ≥ |{v2k | v1t2kk Pk vt21kk}|. The cutct1 includes more preferable values than the other cutct2. A cutctis taken by every peer in the selection rule Mselection(CT):

[Selection rules: Mselect(CT)]

1. Let M P C be a set of cuts which are maximally preferable in the cut set CT.

2. If M P C =φ, one cutct is selected in the setM P C, i.e. where ctis the smallest in the setM P C.

3. IfM P C =φ,ct= Select(CT).

A local historyHjtj of a peer pj at roundtj is a sequence v0j, vj1, . . . , vjtj−1 of values which each peer pj takes until roundtj (j =1, . . . , n). vsj precedes vju iff s < u. The value vjtj−1 is current and the other values are previous in Hjtj. vj0, . . . , vju andvju, . . . , vjtj−1 (0 ≤u tj 1) are prefix and postfix of Hjtj, respectively. Suppose a peerpireceives values a, b, c, d, and e from another peer pj. Here,Hj5 =a, b, c, a, d, e. a, b, cis a prefix andd, eis a postfix ofHj5.

For each valuevju in the historyHjtj, letVju(vju) show a package ofvju. That means, a peerpjsends the packageVju(vuj) and takes the primary valuevjuat round u.

A global history G is a collection of local histories H1t1, . . ., Hntn. In a global history G = H1t1, . . . , Hntn where Hiti = v0i, . . . , viti−1 (i = 1, . . . , n), a tuple[xu11, . . . , xunn]of values is referred to as cut, whereuk ≤tk and each value xukkis in a packageVkukof a local historyHktkfork= 1,. . .,n. A cut[xu11, . . . , xunn] is satisfiable if the valuesxu11, . . . , xvnn satisfy the agreement conditionAC.

Letcu=[xu11, . . . , xunn]andcs=[y1s1, . . . , ynsn]be a pair of satisfiable cuts in a global historyG=H1t1, . . . , Hntnwherevi ≤ti andsi ≤tifori=1, . . . , n. The size|cu|of the cutcuis given asn

i=1(ti -ui). A cutcuis smaller than another cutcs(cu < cs) iff |cu|<|cs|. The cutcuprecedes another cutctiffui ≤si for i=1, . . . , n. A cutcu=[y1u1, . . . , ynun]is maximally satisfiable iffctis satisfiable and there is no satisfiable cut ct, which precedesctin a global history G. A cut cu is maximally satisfiable iffcuis satisfiable and there is no satisfiable cutcu which is smaller thancu.

p

p p

a time

V

31

1

2

3

V

32

round1 round 2 b

c d

e c

a b

e b

d c

V

22

V

21

V

12

V

11

p

p p

time

1 a

2

3

b c d

e

c b a

b e c d

round 1 round 2 round 3 round 4

(1)

(2)

Figure 3.12: Multiple cuts.

Figure 3.12 (1) shows the history of three peersp1,p2, andp3after exchanging

packages with each other. At each roundk, each peerpisends a packageVikwhich including a pair of values. For example, the peer p1 sends a packageV11 = a, b where a value a is primary and b is secondary. In Figure 3.12 (2), each peer takes the single-value exchange scheme to send the same values as Figure 3.12 (1). In this example, each peer has five different values in the value domainD= a, b, c, d, e. The E-precedent relations between values in each peerpias follows:

p1: a→b→c→d→e p2: c→e→b →a→d p3: b→e→c→d→a

In the multi-value exchange scheme, according to the precedent relation between values, the peers p1, p2 and p3 send packagesV11 =a, b, V21 = c, e, andV31 = b, eto the other peers at round 1, respectively. On the other hand, in the single-value exchange scheme, the peers p1, p2 and p3 send values a, c, and b to each other at round 1, respectively. In the multi-value exchange scheme, as shown in the Figure 3.12 (1) after two rounds, the peers detect two satisfiable cuts ct1 = [c, c, c,] andct2 = [b, b, b] in the history, respectively. Therefore, the peers makes agreement on the cutct2, becausect2is the smallest cut among satisfiable cuts. In the single-value exchange scheme, as shown in the Figure 3.12 (2), it takes three rounds to detect the same satisfiable cuts. Following the example, it is obvious that, by using the multi-value exchange scheme, we can significantly reduce the overall time consumption.

In this paper, we consider the binary package Vii only contains two values.

After evaluating the scheme, we would like to extend it to a multi-ary package which can include more than two values.

[Definition] A cut

v1u1−1, . . . , vnun−1

is consistent in a global historyG=H1t1, . . .,Hntniff there is no valuevj in a packageVjsj(vjsj) (sj ≤uj1) such thatviri

i vj andui1≤ri.

関連したドキュメント