• No results found

3.2 The Arbitrary Tree Protocol

3.2.2 The Operations

Our system is a bi-coterie where the set of read quorums R and the set of write quo- rums W are constructed based on definition 2.2.8. Furthermore, we assign separate strategies of picking read and write quorums using definition 2.4.6. More precisely, let wread denote a strategy for picking read quorums of R such that wread =

m(R) X j=1 wread,j and let wwrite = m(W)X j=1

wwrite,j denote a strategy for picking write quorums of W where wread,j,

wwrite,j, m(R), and m(W) are defined later in this section. The availability computations

are carried out by taking the assumption that every replica is independently available with a probability p = 1− p0 greater than 12: it was proven in [PW95] that if the replicas are fail-prone, with an individual availability probability less than 12, then the best strat- egy is not to replicate and to pick a single centralized king. In the rest of this section, we use d to denote the minimal number of physical nodes of the physical levels of the tree such that d = min{mphy,k| k ∈ Kphy}, use e to denote the maximal number of physical

nodes of the physical levels of the tree such that e = max{mphy,k| k ∈ Kphy}, and h to

denote the height of the tree. We consider timestamps that consist of a version number and a replica identifier (RID) which are used during read and write operations of our protocol. Next, we demonstrate how the read and write quorums of the Arbitrary Tree protocol are constructed and give the communication cost, availability and system load of its read and write operations.

-A- The Read Operation

A read operation takes place by accessing all the members of a read quorum Rj ∈ R

and retrieving the value of data whose timestamp has the highest version number and the smallest replica identifier (RID). A read quorum Rj is constructed by taking as its

members any physical node of every physical level of the tree: Rj ={Sphy(i,k)| ∀k ∈ Kphy∧ ∃i : 1 ≤ i ≤ mk}

FACT 3.2.1 Let R ={ R1, R2, . . . , Rj } be the set of read quorums such that every

read quorum Rj is constructed in the same manner as explained in the previous para-

graph. Then the number of read quorums (size) ofRis denoted by m(R) = Y

k∈Kphy

mphy,k.

In order to compute the load of the system induced by this read operation, a strategy wread is taken that picks each read quorum Rj with a probability wread,j = m(R)1 where

The read operation of the Arbitrary Tree protocol has:

A communication cost of RDcost = 1 + h − | Klog|

An availability of RDav (p) =

Y

k∈Kphy

(1− (1 − p)mphy,k) (3.2.1)

An optimal system load of LRD =

1

d (3.2.2)

The proof of the optimality of the system load induced by read operations of the Arbitrary Tree protocol is provided in the Appendix A of this manuscript.

It is important to note that as much as d increases, as much as the load imposed by the read operations on the system and communication cost diminish and the availability ameliorates.

-B- The Write Operation

A write operation, after fetching the highest version number of data and incrementing it by one, accesses all the members of a write quorum Wj ∈W in order to update their

data with a new value and timestamp. A write quorum Wj is constructed by taking as

its members all the physical nodes of any single physical level of the tree: Wj ={Sphy(i,k)| ∃k ∈ Kphy∧ ∀i : 1 ≤ i ≤ mk}

FACT 3.2.2 Let W = { W1, W2, . . . , Wj } be the set of write quorums such that

every write quorum Wj is constructed in the same manner as explained above. Then the

number of write quorums of W denoted by m(W ) = 1 + h – |Klog|.

In order to compute the load of the system induced by this write operation, a strat- egy wwrite is taken that picks each write quorum of our system Wj with a probability

wwrite,j = m(W)1 where j ∈ {1,. . . ,m(W)}.

The write operation of the Arbitrary Tree protocol thus has a minimum cost of d, a maximum cost of e and an average cost of W Rcost =

X

k∈Kphy

mphy,k×wwrite,j. Hence such

a strategy wwrite of picking write quorums induces a communication cost of 1+h−|Kn log|.

This operation has an availability of:

W Rav (p) = 1− W Rf ail (p) (3.2.3)

where W Rf ail (p) =

Y

k∈Kphy

(1− pmphy,k) and it imposes an optimal system load of:

LW R =

1 1 + h− |Klog|

(3.2.4) The proof of the optimality of the system load induced by write operations of the Arbitrary Tree protocol is provided in the Appendix A of this manuscript.

It is important to note that as much as the number of physical levels |Kphy| of the

tree increases, as much as the load imposed by the write operation on the system and communication cost diminish and the availability becomes better.

3.2 The Arbitrary Tree Protocol 73

-C- Discussion

The optimal system loads imposed by read and write operations of the Arbitrary Tree protocol are computed by assuming that all replicas of the system are functioning properly. Therefore, the load of the system induced by these operations becomes higher as replicas of the system start to fail one after another. In order to compute the expected load knowing that replicas are available with a probability p, we use the following two equations which are expressed in terms of equations (3.2.1), (3.2.2), (3.2.3) and (3.2.4):

ELRD = RDav(p)× (LRD− 1) + 1 (3.2.5)

ELW R = W Rav(p)× LW R+ W Rf ail(p)× 1 (3.2.6)

As we can notice from equations 3.2.5 and 3.2.6 that the expected system load com- putations largely depend on the availability of the operations: as much as the availability of the operations are high, as much as the expected system load becomes close to the computed optimal system load and thus the system is classified as stable. Next, we demonstrate that our system is a bi-coterie i.e. any read quorum has a non empty intersection with any write quorum.

The read and write quorums of our protocol are of the following form: Read Quorum = any single replica of every physical level

Write Quorum = all replicas of any single physical level

The proof is by induction on the number of physical levels of the tree:

Basis Step: Trivial for a tree of one physical level because all replicas of the system are found at one and only one physical level.

Induction hypothesis: Assume that it holds for a tree of h physical levels: |Kphy| = h .

Induction Step: Consider a tree of h + 1 physical levels. Since every read quorum already had an intersection with every write quorum of h physical levels (induction hypothesis step) then it holds true because the fact of adding one new physical level does not prevent the read quorums to have a non-empty intersection with any write quorum of h physical levels. On the other hand, since the read quorums contain a replica from the new physical level and the new write quorum contains all the replicas of this same new physical level, then any read quorum has a non-empty intersection with this write quorum. Hence, by induction, our protocol guarantees non-empty intersection of read and write quorums.