


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Distributed Software Develop; Subject: Computer Science; University: University of San Francisco (CA); Term: Spring 2006;
Typology: Study notes
1 / 42
This page cannot be seen from the preview
Don't miss anything!



































Distributed Software Development
Chris Brooks
Department of Computer Science
University of San Francisco
Department of Computer Science — University of San Francisco – p. 1/
-^
causal delivery
says that if
send
(m
send
(m
, then
deliver
(m
(m
when different processes are sending
m
1
and
m
-^
Logical clocks aren’t enough to give us causal delivery.
Department of Computer Science — University of San Francisco – p. 2/
p^1 p^2 p^3
(1,0,0) (0,1,0) (0,0,1)
(2,1,0) (1,0,2)(1,0,3) (1,0,4)
(3,1,3)
(1,2,4)
(4,1,3)
(4,3,4) (1,0,5)
(5,1,6)
(5,1,3)
(6,1,3)
Department of Computer Science — University of San Francisco – p. 4/
-^
If we don’t have reliable communication, consensus isimpossible, even without failures.
-^
With reliable communication, we can solve consensus for crashfailures.
-^
In asynchronous systems, it is impossible to guarantee that wewill reach consensus, even in the presence of a single crashfailure.
-^
This means that we can’t do:^ ◦
Asynchronous Byzantine generals ◦ Asynchronous totally ordered multicast
Department of Computer Science — University of San Francisco – p. 5/
-^
Increased performance.^ ◦
By moving data closer to a client, latency is reduced. ◦ Web caching, proxy servers are an example of this.
-^
Performance is improved most effectively with immutable data.^ ◦
If the client is going to change the data and send it back,performance gains are reduced.
Department of Computer Science — University of San Francisco – p. 7/
-^
Increased availability.
-^
Many services need to be highly available
-^
Replication provides a way of overcoming server failures.
-^
If a server will fail with probability
p
, then we can determine how
many servers are needed to provide a given level of service:^ ◦
Avail
p
n
-^
For example, if a server has a 5% chance of failure (i.i.d) over agiven time period, and we want 99.9% availability, we need atleast 4 replicas.
Department of Computer Science — University of San Francisco – p. 8/
-^
Highly available data may not be correct data.^ ◦
For example, in the presence of network outages.
-^
Fault tolerance guarantees correct behavior in the presence ofa given number of faults.
-^
Similar to availability, but a coordination element is alsorequired.
-^
We may also want to ensure against corruption of data.
Department of Computer Science — University of San Francisco – p. 10/
-^
Passive Replication^ ◦
What problems must be solved for this?
-^
Active Replication^ ◦
What problems must be solved for this?
-^
Lazy Replication^ ◦
What problems must be solved for this?
Department of Computer Science — University of San Francisco – p. 11/
Client Client
FrontEnd FrontEnd
RM RM
RM
RM
-^
Clients interact with replicamanagers via a front end.
-^
Front end hides replicationfrom the client.
-^
Front end may interact withall replica managers, or justa subset.
-^
Replica
managers
interact
to ensure consistency.
Department of Computer Science — University of San Francisco – p. 13/
-^
Consider this example:^ ◦
We have a bank with two replicated servers: a user’s frontend may connect to either one. ◦ First, a user updates account A via server 1 to contain $10. ◦ Next, the user transfers $5 from A to account B via server 2. ◦ Server 1 fails before data is propagated. ◦ The bank manager logs into server 2 and sees that accountA has a balance of 0 and account B has a balance of $5.
-^
Problem: even though the transfer happened after the deposit,it is the only operation seen.
Department of Computer Science — University of San Francisco – p. 14/
Client Client
FrontEnd FrontEnd
BackupRM PrimaryRM
BackupRM
BackupRM
-^
Passive replication uses asingle replica manager.
-^
Other replica managers actas backups (or slaves).
-^
Primary manager executesoperations and sendscopies of updated data tobackups
-^
If primary fails, a new one iselected.
Department of Computer Science — University of San Francisco – p. 16/
-^
Sequence of events:1. Front end issues a request to primary2. Primary takes requests in FIFO order. Checks to see if
request has already been serviced. If so, re-send response.
acknowledge.
Department of Computer Science — University of San Francisco – p. 17/
-^
Updating replicas is a
group communication
problem.
-^
If groups can change dynamically, then a group membershipservice is needed.
-^
This keeps track of the processes that are currently in a group.
Department of Computer Science — University of San Francisco – p. 19/
-^
A group membership process needs to:^ ◦
Provide an interface for membership changes, creation, anddestruction. ◦ Provide a failure detector ◦ Notify members of membership changes. ◦ Perform group address expansion. When a message is sentvia multicast, it is sent to the group address. Themembership process must then deliver that message to allprocesses.
Department of Computer Science — University of San Francisco – p. 20/