Slides For Chapter 6: Indirect Communication: Distributed Systems: Concepts and Design
Slides For Chapter 6: Indirect Communication: Distributed Systems: Concepts and Design
Slides For Chapter 6: Indirect Communication: Distributed Systems: Concepts and Design
Indirect Communication
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
Pearson Education 2012
2
Figure 6.2
Open and closed groups
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
Figure 6.3
The role of group membership management
Group
address
expansion
Group Leave
send
Join
Process group
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
Pearson Education 2012
Figure 6.4
The architecture of JGroups
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
Pearson Education 2012
5
Figure 6.5
Java class FireAlarmJG
import org.jgroups.JChannel;
public class FireAlarmJG {
public void raise() {
try {
JChannel channel = new JChannel();
channel.connect("AlarmChannel");
Message msg = new Message(null, null, "Fire!");
channel.send(msg);
}
catch(Exception e) {
}
}
Instructors Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
Pearson Education 2012
6
Figure 6.6
Java class FireAlarmConsumerJG
import org.jgroups.JChannel;
Notification Information
provider Notification
Notification
Notification
Notification
Dealers computer Dealers computer
Notification
Information
provider
Notification
Dealer Notification
Dealer
External
source
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
Figure 6.8
The publish-subscribe paradigm
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
9
Figure 6.9
A network of brokers
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
10
Figure 6.10
The architecture of publish-subscribe systems
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
11
Figure 6.11
Filtering-based routing
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
12
Figure 6.12
Rendezvous-based routing
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
13
Figure 6.13
Example publish-subscribe system
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
14
Figure 6.14
The message queue paradigm
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
15
Figure 6.15
A simple networked topology in WebSphere MQ
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
16
Figure 6.16
The programming model offered by JMS
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
17
Figure 6.17
Java class FireAlarmJMS
import javax.jms.*;
import javax.naming.*;
public class FireAlarmJMS {
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3
Addison-Wesley Publishers 2000
Figure 6.20
The tuple space abstraction
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
21
Figure 6.21 (1)
Replication and the tuple space operations [Xu and Liskov 1989]
write
1. The requesting site multicasts the write request to all members of the view; 2.
On receiving this request, members insert the tuple into their replica and
acknowledge this action;
3. Step 1 is repeated until all acknowledgements are received.
read
1. The requesting site multicasts the read request to all members of the view;
2. On receiving this request, a member returns a matching tuple to the requestor;
3. The requestor returns the first matching tuple received as the result of the operation (ignoring others); 4
Step 1 is repeated until at least one response is received.
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
22
Figure 6.21 (continued)
Replication and the tuple space operations [Xu and Liskov 1989]
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
23
Figure 6.22
Partitioning in the York Linda Kernel
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
24
Figure 6.23
The JavaSpaces API
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
25
Figure 6.24
Java class AlarmTupleJS
import net.jini.core.entry.*;
public class AlarmTupleJS implements Entry {
public String alarmType;
public AlarmTupleJS() { }
}
public AlarmTupleJS(String alarmType) {
this.alarmType = alarmType;}
}
}
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
26
Figure 6.25
Java class FireAlarmJS
import net.jini.space.JavaSpace;
public class FireAlarmJS {
public void raise() {
try {
JavaSpace space = SpaceAccessor.findSpace("AlarmSpace");
AlarmTupleJS tuple = new AlarmTupleJS("Fire!");
space.write(tuple, null, 60*60*1000);
catch (Exception e) {
}
}
}
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
27
Figure 16.26
Java class FireAlarmReceiverJS
import net.jini.space.JavaSpace;
public class FireAlarmConsumerJS {
public String await() {
try {
JavaSpace space = SpaceAccessor.findSpace();
AlarmTupleJS template = new AlarmTupleJS("Fire!");
AlarmTupleJS recvd = (AlarmTupleJS) space.read(template, null,
Long.MAX_VALUE);
return recvd.alarmType;
}
catch (Exception e) {
return null;
}
}
}
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
28
Figure 6.27
Summary of indirect communication styles
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
Pearson Education 2005
29