Вы находитесь на странице: 1из 17

Figure 14.

1 A basic architectural model for the management of replicated data

Requests and
replies

RM RM
C FE

Clients Front ends Service

Replica
C FE RM managers

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 1
Figure 14.2 Services provided for process groups

Group
address
expansion

Group Leave
send

Multicast
communication Fail Group membership
management

Join

Process group

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 2
Figure 14.3 View-synchronous group communication

a (allowed). b (allowed).
p crashes p crashes
p p

q q

r r

view (p, q, r) view (q, r) view (p, q, r) view (q, r)

c (disallowed). d (disallowed).
p crashes p crashes
p p

q q

r r

view (p, q, r) view (q, r) view (p, q, r) view (q, r)

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 3
Figure 14.4 The passive (primary-backup) model for fault tolerance

Primary
RM
C FE RM
Backup

C FE RM
Backup

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 4
Figure 14.5 Active replication

RM

C FE RM FE C

RM

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 5
Figure 14.6 Query and update operations in a gossip service

Service

RM

gossip
RM RM

Query, prev Val, new Update, prev Update id

FE FE

Query Val Update


Clients

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 6
Figure 14.7 Front ends propagate their timestamps whenever clients communicate directly

Service

RM

gossip
RM RM

Vector
FE FE
timestamps

Clients

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 7
Figure 14.8 A gossip replica manager, showing its main state components

Other replica managers


Replica Replica log
timestamp
Gossip
messages
Replica manager

Timestamp table

Replica timestamp Value timestamp


Stable
Update log Value
updates

Executed operation table

Updates
OperationID Update Prev
FE FE

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 8
Figure 14.9 Committed and tentative updates in Bayou

Committed Tentative

c0 c1 c2 cN t0 t1 t2 ti ti+1

Tentative update ti becomes the next committed update


and is inserted after the last committed update cN.

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 9
Figure 14.10 Transactions on replicated data

Client + front end Client + front end

T U
deposit(B,3);

getBalance(A)
B
Replica managers
Replica managers

A A A B B B

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 10
Figure 14.11 Available copies

Client + front end T U Client + front end

getBalance(B)
deposit(A,3);
getBalance(A)
deposit(B,3); Replica managers
B
Replica managers M

A A B B
X Y P N

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 11
Figure 14.12 Network partition

Client + front end Client + front end


Network U
withdraw(B, 4) T
partition
deposit(B,3);

B
Replica managers

B B B

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 12
Gifford’s quorum concensus examples
Example 1 Example 2 Example 3
Latency Replica 1 75 75 75
(milliseconds) Replica 2 65 100 750
Replica 3 65 750 750
Voting Replica 1 1 2 1
configuration Replica 2 0 1 1
Replica 3 0 1 1
Quorum R 1 2 1
sizes W 1 3 3
Derived performance of file suite:
Read Latency 65 75 75
Blocking probability 0.01 0.0002 0.000001
Write Latency 75 100 750
Blocking probability 0.01 0.0101 0.03

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 13
Figure 14.13 Two network partitions

Transaction T Network partition

Replica managers

X V Y Z

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 14
Figure 14.14 Virtual partition

Virtual partition Network partition

Replica managers

X V Y Z

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 15
Figure 14.15 Two overlapping virtual partitions

Virtual partition V1 Virtual partition V2

Y X V Z

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 16
Figure 14.16 Creating a virtual partition

Phase 1:
• The initiator sends a Join request to each potential member. The argument of Join
is a proposed logical timestamp for the new virtual partition.
• When a replica manager receives a Join request, it compares the proposed logical
timestamp with that of its current virtual partition.
– If the proposed logical timestamp is greater it agrees to join and replies Yes;
– If it is less, it refuses to join and replies No.
Phase 2:
• If the initiator has received sufficient Yes replies to have read and write quora, it
may complete the creation of the new virtual partition by sending a Confirmation
message to the sites that agreed to join. The creation timestamp and list of actual
members are sent as arguments.
• Replica managers receiving the Confirmation message join the new virtual
partition and record its creation timestamp and list of actual members.

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Pearson Education 2001 17

Вам также может понравиться