Replication and Group Communication

Download Report

Transcript Replication and Group Communication

Replication and Group
Communication
Management of Replicated Data
Requests and
replies
C
Clients
FE
Front ends
C
FE
RM
RM
Service
RM
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Replica
managers
Replica Manager
• Manages a single copy of the data
• Interacts with other RMs
• Behave as state machines
– Operations are atomic
– Deterministic
– Ensures behaviour can be reproduced at replicas
• May be dynamic or static
Sequence of Events
RM
Client
Request
Response
Front
End
Request, id
Coordination
Execution
Response, id
Agreement
RM
RM
Coordination Phase
• Reach agreement on
– Whether to execute or not
– Ordering
• FIFO
• Causal
• Total
Group Communication
• Messages send to all members of a group
– Reliable – Either all receive message or none do
– Ordered
• Group membership
– Static – Fixed number of processes
– Dynamic – Processes can leave and join
• Implementation
– Network support (IP Multicast)
– Sending multiple messages
Group Types
•
•
•
•
Process vs Object groups
Closed vs Open groups
Overlapping vs Non-overlapping
Synchronous vs Asynchronous
Reliability of Multicasts
• Integrity
– Message received same as message send
– No message is delivered twice
• Validity
– Message send is eventually delivered
• Agreement
– If delivered to one, it is delivered to all
Managing Group Membership
•
•
•
•
Allow processes to be added and removed
Detect failed/unreachable components
Notify members of group changes
Perform group address expansion
– Processes may be part of multiple groups
– Send message to group using group id
System Model
RM
Client
Request
Response
Front
End
Request, id
GM
GC
RM
GC
Response, id
RM
GC
RM – Replication Manager
GM – Group Manager
GC – Group Communicator
GM
GM
Group Communicator
• Assumptions
– Reliable one-to-one channels
– Processes only fail by crashing
• To send a message:
– RM calls multicast(g,m) in GC
– GC may communicate with GM to get group members
• To receive a message:
– GC receives message over network
– Processes message
– Calls deliver(m) in RM
Basic Multicast
• B-multicast(g,m):
– For each p ∊ g, send (p,m)
• On receive(m) at p:
– B-deliver(m) at p