SlideShare une entreprise Scribd logo
1  sur  89
Télécharger pour lire hors ligne
CS6601 DISTRIBUTED SYSTEMS
UNIT – II
Dr.A.Kathirvel, Professor, Computer Science and Engg.
M N M Jain Engineering College, Chennai
Unit - II
COMMUNICATION IN DISTRIBUTED
SYSTEM
System Model – Inter process Communication – the API for internet
protocols – External data representation and Multicast
communication. Network virtualization: Overlay networks. Case
study: MPI Remote Method Invocation And Objects: Remote
Invocation – Introduction – Request-reply protocols – Remote
procedure call – Remote method invocation. Case study: Java RMI –
Group communication – Publish-subscribe systems – Message
queues – Shared memory approaches – Distributed objects – Case
study: Enterprise Java Beans -from objects to components.
Coulouris, Dollimore, Kindberg and Blair
Distributed Systems:Concepts and Design Edition 5, Addison-Wesley 2012
Fig4.1: Middleware layers
INTERPROCESS COMMUNICATION
3
Fig4.2:Sockets and ports
message
agreed portany port socketsocket
Internet address = 138.37.88.249Internet address = 138.37.94.248
other ports
client server
4
UDP client sends a message to the
server and gets a reply
import java.net.*;
import java.io.*;
public class UDPClient{
public static void main(String args[]){
// args give message contents and server hostname
DatagramSocket aSocket = null;
try {
aSocket = new DatagramSocket();
byte [] m = args[0].getBytes();
InetAddress aHost = InetAddress.getByName(args[1]);
int serverPort = 6789;
DatagramPacket request = new DatagramPacket(m, m.length(), aHost, serverPort);
aSocket.send(request);
byte[] buffer = new byte[1000];
DatagramPacket reply = new DatagramPacket(buffer, buffer.length);
aSocket.receive(reply);
System.out.println("Reply: " + new String(reply.getData()));
}catch (SocketException e){System.out.println("Socket: " + e.getMessage());
}catch (IOException e){System.out.println("IO: " + e.getMessage());}
}finally {if(aSocket != null) aSocket.close();}
} }
5
UDP server repeatedly receives a
request and sends it back to the client
import java.net.*;
import java.io.*;
public class UDPServer{
public static void main(String args[]){
DatagramSocket aSocket = null;
try{
aSocket = new DatagramSocket(6789);
byte[] buffer = new byte[1000];
while(true){
DatagramPacket request = new DatagramPacket(buffer, buffer.length);
aSocket.receive(request);
DatagramPacket reply = new DatagramPacket(request.getData(),
request.getLength(), request.getAddress(), request.getPort());
aSocket.send(reply);
}
}catch (SocketException e){System.out.println("Socket: " + e.getMessage());
}catch (IOException e) {System.out.println("IO: " + e.getMessage());}
}finally {if(aSocket != null) aSocket.close();}
}}
6
TCP client makes connection to server,
sends request and receives reply
import java.net.*;
import java.io.*;
public class TCPClient {
public static void main (String args[]) {
// arguments supply message and hostname of destination
Socket s = null;
try{
int serverPort = 7896;
s = new Socket(args[1], serverPort);
DataInputStream in = new DataInputStream( s.getInputStream());
DataOutputStream out =new DataOutputStream( s.getOutputStream());
out.writeUTF(args[0]); // UTF is a string encoding see Sn 4.3
String data = in.readUTF();
System.out.println("Received: "+ data) ;
}catch (UnknownHostException e){ System.out.println("Sock:"+e.getMessage());
}catch (EOFException e){System.out.println("EOF:"+e.getMessage());
}catch (IOException e){System.out.println("IO:"+e.getMessage());}
}finally {if(s!=null) try {s.close();}catch (IOException
e){System.out.println("close:"+e.getMessage());}}
}}
7
TCP server makes a connection for each
client and then echoes the client’s request
import java.net.*;
import java.io.*;
public class TCPServer {
public static void main (String args[]) {
try{ int serverPort = 7896;
ServerSocket listenSocket = new ServerSocket(serverPort);
while(true) {
Socket clientSocket = listenSocket.accept();
Connection c = new Connection(clientSocket); }
} catch(IOException e) {System.out.println("Listen :"+e.getMessage());}
}
}
// this continues on the next slide
8
class Connection extends Thread {
DataInputStream in;
DataOutputStream out;
Socket clientSocket;
public Connection (Socket aClientSocket) {
try {
clientSocket = aClientSocket;
in = new DataInputStream( clientSocket.getInputStream());
out =new DataOutputStream( clientSocket.getOutputStream());
this.start();
} catch(IOException e) {System.out.println("Connection:"+e.getMessage());}
}
public void run(){
try { // an echo server
String data = in.readUTF();
out.writeUTF(data);
} catch(EOFException e) {System.out.println("EOF:"+e.getMessage());
} catch(IOException e) {System.out.println("IO:"+e.getMessage());}
} finally{ try {clientSocket.close();}catch (IOException e){/*close failed*/}}
}
}
9
CORBA CDR for constructed types
Type Representation
sequence length (unsigned long) followed by elements in order
string length (unsigned long) followed by characters in order (can also
can have wide characters)
array array elements in order (no length specified because it is fixed)
struct in the order of declaration o f the comp onents
enumerated unsigned long (the values are specified by the order declared)
union type tag followed by the selected m emb er
10
CORBA CDR message
The flattened form represents a Person struct with value: {‘Smith’, ‘London’, 1984}
0–3
4–7
8–11
12–15
16–19
20-23
24–27
5
"Smit"
"h___"
6
"Lond"
"on__"
1984
index in
sequence of bytes 4 bytes
notes
on representation
length of string
‘Smith’
length of string
‘London’
unsigned long
11
Indication of Java serialized form
The true serialized form contains additional type markers; h0 and h1 are handles
Serialized values
Person
3
1984
8-byte version number
int year
5 Smith
java.lang.String
name:
6 London
h0
java.lang.String
place:
h1
Explanation
class name, version number
number, type and name of
instance variables
values of instance variables
12
XML definition of the Person structure
<person id="123456789">
<name>Smith</name>
<place>London</place>
<year>1984</year>
<!-- a comment -->
</person >
use of namespace in the Person structure
<person pers:id="123456789" xmlns:pers="http://www.cdk5.net/person">
<pers:name> Smith </pers:name>
<pers:place> London </pers:place >
<pers:year> 1984 </pers:year>
</person>
13
An XML schema for the Person structure
<xsd:schema xmlns:xsd = URL of XML schema definitions >
<xsd:element name= "person" type ="personType" />
<xsd:complexType name="personType">
<xsd:sequence>
<xsd:element name = "name" type="xs:string"/>
<xsd:element name = "place" type="xs:string"/>
<xsd:element name = "year" type="xs:positiveInteger"/>
</xsd:sequence>
<xsd:attribute name= "id" type = "xs:positiveInteger"/>
</xsd:complexType>
</xsd:schema>
Representation of a remote object reference
Internet addressport number time object number
interface of
remote object
32 bits 32 bits 32 bits 32 bits
14
Multicast peer joins a group and sends
and receives datagrams
import java.net.*;
import java.io.*;
public class MulticastPeer{
public static void main(String args[]){
// args give message contents & destination multicast group (e.g. "228.5.6.7")
MulticastSocket s =null;
try {
InetAddress group = InetAddress.getByName(args[1]);
s = new MulticastSocket(6789);
s.joinGroup(group);
byte [] m = args[0].getBytes();
DatagramPacket messageOut =
new DatagramPacket(m, m.length, group, 6789);
s.send(messageOut);
// this figure continued on the next slide
15
// get messages from others in group
byte[] buffer = new byte[1000];
for(int i=0; i< 3; i++) {
DatagramPacket messageIn =
new DatagramPacket(buffer, buffer.length);
s.receive(messageIn);
System.out.println("Received:" + new String(messageIn.getData()));
}
s.leaveGroup(group);
}catch (SocketException e){System.out.println("Socket: " + e.getMessage());
}catch (IOException e){System.out.println("IO: " + e.getMessage());}
}finally {if(s != null) s.close();}
}
}
16
Types of overlay
table continues on the next slide
17
Skype overlay architecture
19
Fig:4.17 An overview of point-to-point
communication in MPI
20
Selected send operations in MPI
Fig 5.1: Middleware layers
Applications
Middleware
layersUnderlying interprocess communication primitives:
Sockets, message passing, multicast support, overlay networks
UDP and TCP
Remote invocation, indirect communication
This chapter
(and Chapter 6)
Remote invocation
22
Fig 5.2:Request-reply communication
Request
ServerClient
doOperation
(wait)
(continuation)
Reply
message
getRequest
execute
method
message
select object
sendReply
23
Operations of the request-reply protocol
public byte[] doOperation(RemoteRef s,int operationId,byte[] arguments)
sends a request message to the remote server and returns the reply.
The arguments specify the remote server, the operation to be invoked
and the arguments of that operation.
public byte[] getRequest ();
acquires a client request via the server port.
public void sendReply(byte[] reply,InetAddress clientHost, int clientPort);
sends the reply message reply to the client at its Internet address and
port.
24
Fig 5.4:Request-reply message structure
messageType
requestId
remoteReference
operationId
arguments
int (0=Request, 1= Reply)
int
RemoteRef
int or Operation
array of bytes
25
Fig5.5:RPC exchange protocols
R Request
R R Reply
R R A Acknowledge reply
Request
Request Reply
Client Server Client
Name Messages sent by
Fig 5.6:HTTP request message
GET //www.dcs.qmw.ac.uk/index.html HTTP/ 1.1
URL or pathnamemethod HTTP version headers message body
Fig 5.7:HTTP Reply message
HTTP/1.1 200 OK resource data
HTTP version status code reason headers message body
26
Fig5.8:CORBA IDL
example
// In file Person.idl
struct Person {
string name;
string place;
long year;} ;
interface PersonList {
readonly attribute string listname;
void addPerson(in Person p) ;
void getPerson(in string name, out Person p);
long number();};
Fig5.9:Call semantics
Fault tolerance measures Call
semantics
Retransmit request
message
Duplicate
filtering
Re-execute procedure
or retransmit reply
No
Yes
Yes
Not applicable
No
Yes
Not applicable
Re-execute procedure
Retransmit reply At-most-once
At-least-once
Maybe
Fig5.10: Role of client and server stub
procedures in RPC
client
Request
Reply
CommunicationCommunication
modulemodule dispatcher
service
client stub server stub
procedure procedure
client process server process
procedureprogram
28
Fig5.11: Files interface in Sun XDR
const MAX = 1000;
typedef int FileIdentifier;
typedef int FilePointer;
typedef int Length;
struct Data {
int length;
char buffer[MAX];
};
struct writeargs {
FileIdentifier f;
FilePointer position;
Data data;
};
struct readargs {
FileIdentifier f;
FilePointer position;
Length length;
};
program FILEREADWRITE {
version VERSION {
void WRITE(writeargs)=1; 1
Data READ(readargs)=2; 2
}=2;
} = 9999;
29
Fig5.12: Remote and local method
invocations
invocation invocation
remote
invocation
remote
local
local
local
invocation
invocation
A
B
C
D
E
F
30
Fig5.13:A remote object and its remote
interface
interface
remote
m1
m2
m3
m4
m5
m6
Data
implementation
remoteobject
{ of methods
31
Fig5.14: Instantiation of remote objects
32
Fig5.15: The role of proxy and skeleton
in remote method invocation
33
Fig5.16:Java Remote interfaces Shape
and ShapeList
import java.rmi.*;
import java.util.Vector;
public interface Shape extends Remote {
int getVersion() throws RemoteException;
GraphicalObject getAllState() throws RemoteException; 1
}
public interface ShapeList extends Remote {
Shape newShape(GraphicalObject g) throws RemoteException; 2
Vector allShapes() throws RemoteException;
int getVersion() throws RemoteException;
}
34
The Naming class of Java RMIregistry
void rebind (String name, Remote obj)
This method is used by a server to register the identifier of a remote object by
name, as shown in Figure 15.18, line 3.
void bind (String name, Remote obj)
This method can alternatively be used by a server to register a remote object by
name, but if the name is already bound to a remote object reference an
exception is thrown.
void unbind (String name, Remote obj)
This method removes a binding.
Remote lookup(String name)
This method is used by clients to look up a remote object by name, as shown in
Figure 5.20 line 1. A remote object reference is returned.
String [] list()
This method returns an array of Strings containing the names bound in the registry.
35
Fig5.18:Java class ShapeListServer
with main method
import java.rmi.*;
public class ShapeListServer{
public static void main(String args[]){
System.setSecurityManager(new RMISecurityManager());
try{
ShapeList aShapeList = new ShapeListServant(); 1
Naming.rebind("Shape List", aShapeList ); 2
System.out.println("ShapeList server ready");
}catch(Exception e) {
System.out.println("ShapeList server main " + e.getMessage());}
}
}
36
Fig5.19:Java class ShapeListServant
implements interface ShapeList
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
import java.util.Vector;
public class ShapeListServant extends UnicastRemoteObject implements ShapeList {
private Vector theList; // contains the list of Shapes
private int version;
public ShapeListServant()throws RemoteException{...}
public Shape newShape(GraphicalObject g) throws RemoteException { 1
version++;
Shape s = new ShapeServant( g, version); 2
theList.addElement(s);
return s;
}
public Vector allShapes()throws RemoteException{...}
public int getVersion() throws RemoteException { ... }
}
37
Fig5.20: Java client of ShapeList
import java.rmi.*;
import java.rmi.server.*;
import java.util.Vector;
public class ShapeListClient{
public static void main(String args[]){
System.setSecurityManager(new RMISecurityManager());
ShapeList aShapeList = null;
try{
aShapeList = (ShapeList) Naming.lookup("//bruno.ShapeList");
1
Vector sList = aShapeList.allShapes();
2
} catch(RemoteException e) {System.out.println(e.getMessage());
}catch(Exception e) {System.out.println("Client: " + e.getMessage());}
}
}
38
Fig5.21: Classes supporting Java RMI
RemoteServer
UnicastRemoteObject
<servant class>
Activatable
RemoteObject
Indirect Communication
39
Fig 6.1:Space and time coupling in ds
40
Fig6.2:Open and closed groups
Closed group Open group
41
Fig6.3: The role of group membership
management
Join
Group
address
expansion
Multicast
communication
Group
send
Fail
Group membership
management
Leave
Process group
42
Fig 6.4:The architecture of JGroups
43
Fig6.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) {
}}
44
Fig 6.6:Java class FireAlarmConsumerJG
import org.jgroups.JChannel;
public class FireAlarmConsumerJG {
public String await() {
try {
JChannel channel = new JChannel();
channel.connect("AlarmChannel");
Message msg = (Message) channel.receive(0);
return (String) msg.GetObject();
} catch(Exception e) {
return null;
}
}}
45
Fig 6.7:Dealing room system
Dealer’s computer
Information
provider
Dealer
External
source
External
source
Information
provider
Dealer
Dealer
Dealer
Notification
Notification
Notification
Notification
Notification
Notification
Notification
Notification
Dealer’s computer
Dealer’s computerDealer’s computer
Notification
Notification
46
Fig6.8:The publish-subscribe paradigm
47
Fig 6.9:A network of brokers
48
Fig6.10:The architecture of publish-
subscribe systems
49
Fig6.11:Filtering-based routing
upon receive publish(event e) from node x 1
matchlist := match(e, subscriptions) 2
send notify(e) to matchlist; 3
fwdlist := match(e, routing); 4
send publish(e) to fwdlist - x; 5
upon receive subscribe(subscription s) from node x 6
if x is client then 7
add x to subscriptions; 8
else add(x, s) to routing; 9
send subscribe(s) to neighbours - x; 10
50
Fig6.12:Rendezvous-based routing
upon receive publish(event e) from node x at node i
rvlist := EN(e);
if i in rvlist then begin
matchlist :=match(e, subscriptions);
send notify(e) to matchlist;
end
send publish(e) to rvlist - i;
upon receive subscribe(subscription s) from node x at node i
rvlist := SN(s);
if i in rvlist then
add s to subscriptions;
else
send subscribe(s) to rvlist - i;
51
Fig6.13:Example publish-subscribe system
52
Fig6.14:The message queue paradigm
53
Fig6.15:A simple networked topology
in WebSphere MQ
54
Fig6.16:The programming model
offered by JMS
55
Fig6.17:Java class FireAlarmJMS
import javax.jms.*;
import javax.naming.*;
public class FireAlarmJMS {
public void raise() {
try { 1
Context ctx = new InitialContext(); 2
TopicConnectionFactory topicFactory = 3
(TopicConnectionFactory)ctx.lookup ("TopicConnectionFactory"); 4
Topic topic = (Topic)ctx.lookup("Alarms"); 5
TopicConnection topicConn = 6
topicConnectionFactory.createTopicConnection(); 7
TopicSession topicSess = topicConn.createTopicSession(false, 8
Session.AUTO_ACKNOWLEDGE); 9
TopicPublisher topicPub = topicSess.createPublisher(topic); 10;
TextMessage msg = topicSess.createTextMessage(); 11
msg.setText("Fire!"); 12
topicPub.publish(message); 13
} catch (Exception e) { 14
} 15
}
56
Fig6.18:Java class FireAlarmConsumerJMS
import javax.jms.*; import javax.naming.*;
public class FireAlarmConsumerJMS
public String await() {
try { 1
Context ctx = new InitialContext(); 2
TopicConnectionFactory topicFactory = 3
(TopicConnectionFactory)ctx.lookup("TopicConnectionFactory"); 4
Topic topic = (Topic)ctx.lookup("Alarms"); 5
TopicConnection topicConn = 6
topicConnectionFactory.createTopicConnection(); 7
TopicSession topicSess = topicConn.createTopicSession(false, 8
Session.AUTO_ACKNOWLEDGE); 9
TopicSubscriber topicSub = topicSess.createSubscriber(topic); 10
topicSub.start(); 11
TextMessage msg = (TextMessage) topicSub.receive(); 12
return msg.getText(); 13
} catch (Exception e) { 14
return null;15
}16 }
57
Fig6.19:The distributed shared memory
abstraction
58
Fig6.20:The tuple space abstraction
59
Replication and the tuple space
operations
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.
continued on next slide
60
take Phase 1: Selecting the tuple to be removed
Phase 2: Removing the selected tuple
1. The requesting site multicasts the take request to all members of the view;
2. On receiving this request, each replica acquires a lock on the associated tuple set and, if the
lock cannot
be acquired, the take request is rejected;
3. All accepting members reply with the set of all matching tuples;
4. Step 1 is repeated until all sites have accepted the request and responded with their set of
tuples and the
intersection is non-null;
5. A particular tuple is selected as the result of the operation (selected randomly from the
intersection of all
the replies);
6. If only a minority accept the request, this minority are asked to release their locks and
phase 1 repeats.
1. The requesting site multicasts a remove request to all members of the view citing the
tuple to be
removed;
2. On receiving this request, members remove the tuple from their replica, send an
acknowledgement
and release the lock;
3. Step 1 is repeated until all acknowledgements are received.
61
Fig6.22:Partitioning in the York Linda
Kernel
62
Fig6.23:The JavaSpaces API
63
Fig6.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;}
}}
64
Fig6.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) {
} } }
65
Fig16.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;
} }}
66
Fig6.27:Summary of indirect
communication styles
67
Fig8.1:Distributed
objects
Distributed Objects and Components
68
Fig8.2:IDL interfaces Shape and ShapeList
struct Rectangle{ 1
long width;
long height;
long x;
long y;
} ;
struct GraphicalObject { 2
string type;
Rectangle enclosing;
boolean isFilled;
};
interface Shape { 3
long getVersion() ;
GraphicalObject getAllState() ; // returns state of the GraphicalObject
};
typedef sequence <Shape, 100> All; 4
interface ShapeList { 5
exception FullException{ }; 6
Shape newShape(in GraphicalObject g) raises (FullException); 7
All allShapes(); // returns sequence of remote object references 8
long getVersion() ;
};
69
Fig8.3:IDL module Whiteboard
module Whiteboard {
struct Rectangle{
...} ;
struct GraphicalObject {
...};
interface Shape {
...};
typedef sequence <Shape, 100> All;
interface ShapeList {
...};
};
70
Fig8.4:IDL constructed types – 1
Type Examples Use
sequence typedef sequence <Shape, 100> All;
typedef sequence <Shape> All
bounded and unbounded sequences
of Shapes
Defines a type for a variable-length
sequence of elements of a specified
IDL type. An upper bound on the
length may be specified.
string String name;
typedef string<8> SmallString;
unboundedand bounded
sequences of characters
Defines a sequences of characters,
terminated by the null character. An
upper bound on the length may be
specified.
array typedef octet uniqueId[12];
typedef GraphicalObject GO[10][8]
Defines a type for a multi-dimensional
fixed-length sequence of elements of a
specified IDL type.
this figure continues on the next slide
71
Fig8.4: IDL constructed types – 2
Type Examples Use
record struct GraphicalObject {
string type;
Rectangle enclosing;
boolean isFilled;
};
Defines a type for a record containing a
group of related entities. Structs are
passed by value in arguments and
results.
enumerated enum Rand
(Exp, Number, Name);
The enumerated type in IDL maps a
type name onto a small set of integer
values.
union union Exp switch (Rand) {
case Exp: string vote;
case Number: long n;
case Name: string s;
The IDL discriminated union allows
one of a given set of types to be passed
as an argument. The header is
parameterized by anenum, which
specifies which member is in use.};
72
Fig8.5:The main components of the
CORBA architecture
client server
proxy
or dynamic invocation
implementation
repository object
adapter
ORBORB
skeleton
or dynamic skeleton
client
program
interface
repository
Request
Reply
corecorefor A
Servant
A
73
Fig8.6: CORBA Services (1)
this figure continues on the next slide
74
Fig8.6:CORBA Services (2)
75
Fig8.7:Java interfaces generated by idlj
from CORBA interface ShapeList
public interface ShapeListOperations {
Shape newShape(GraphicalObject g)
throws ShapeListPackage.FullException;
Shape[] allShapes();
int getVersion();
}
public interface ShapeList extends ShapeListOperations,
org.omg.CORBA.Object,
org.omg.CORBA.portable.IDLEntity { }
76
Fig8.8: ShapeListServant class of the Java
server program for CORBA interface ShapeList
import org.omg.CORBA.*;
import org.omg.PortableServer.POA;
class ShapeListServant extends ShapeListPOA {
private POA theRootpoa;
private Shape theList[];
private int version;
private static int n=0;
public ShapeListServant(POA rootpoa){
theRootpoa = rootpoa;
// initialize the other instance variables
}
// continued on the next slide
77
public Shape newShape(GraphicalObject g)
throws ShapeListPackage.FullException { 1
version++;
Shape s = null;
ShapeServant shapeRef = new ShapeServant( g, version);
try {
org.omg.CORBA.Object ref =
theRoopoa.servant_to_reference(shapeRef); 2
s = ShapeHelper.narrow(ref);
} catch (Exception e) {}
if(n >=100) throw new ShapeListPackage.FullException();
theList[n++] = s;
return s;
}
public Shape[] allShapes(){ ... }
public int getVersion() { ... }
}
78
Fig8.9:Java class ShapeListServer
import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*; import org.omg.PortableServer.*;
public class ShapeListServer {
public static void main(String args[]) {
try{
ORB orb = ORB.init(args,null); 1
POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));2
rootpoa.the_POAManager().activate(); 3
ShapeListServant SLSRef = new ShapeListServant(rootpoa); 4
org.omg.CORBA.Object ref = rootpoa.servant_to_reference(SLSRef); 5
ShapeList SLRef = ShapeListHelper.narrow(ref);
org.omg.CORBA.Object objRef =orb.resolve_initial_references("NameService");
NamingContext ncRef = NamingContextHelper.narrow(objRef); 6
NameComponent nc = new NameComponent("ShapeList", ""); 7
NameComponent path[] = {nc}; 8
ncRef.rebind(path, SLRef); 9
orb.run(); 10
} catch (Exception e) { ... }
}}
79
Fig8.10:Java client program for CORBA
interfaces Shape and ShapeList
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
public class ShapeListClient{
public static void main(String args[]) {
try{
ORB orb = ORB.init(args, null); 1
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
NamingContext ncRef = NamingContextHelper.narrow(objRef);
NameComponent nc = new NameComponent("ShapeList", "");
NameComponent path [] = { nc };
ShapeList shapeListRef =
ShapeListHelper.narrow(ncRef.resolve(path)); 2
Shape[] sList = shapeListRef.allShapes(); 3
GraphicalObject g = sList[0].getAllState(); 4
} catch(org.omg.CORBA.SystemException e) {...}
}
80
Fig8.11:An example software architecture
81
Fig8.12:The structure of a container
82
Fig8.13:Application servers
83
Fig8.14: Transaction attributes in EJB.
84
Fig8.15:Invocation contexts in EJB
85
Fig8.16 :An example component
configuration in Fractal
86
Fig8.17:The structure of a Fractal
component
87
Fig8.18:Component and Content
Controller Interfaces in Fractal
88
Questions?

Contenu connexe

Tendances

Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
AbDul ThaYyal
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency control
AbDul ThaYyal
 

Tendances (20)

Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Network security - OSI Security Architecture
Network security - OSI Security ArchitectureNetwork security - OSI Security Architecture
Network security - OSI Security Architecture
 
MOBILE IP,DHCP,ADHOC ROUTING PROTOCOLS
MOBILE IP,DHCP,ADHOC ROUTING PROTOCOLSMOBILE IP,DHCP,ADHOC ROUTING PROTOCOLS
MOBILE IP,DHCP,ADHOC ROUTING PROTOCOLS
 
Peer to Peer services and File systems
Peer to Peer services and File systemsPeer to Peer services and File systems
Peer to Peer services and File systems
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
 
Unit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed SystemsUnit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed Systems
 
Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systems
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Cs8601 4
Cs8601 4Cs8601 4
Cs8601 4
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency control
 
Distributed Systems Naming
Distributed Systems NamingDistributed Systems Naming
Distributed Systems Naming
 
Address in the target code in Compiler Construction
Address in the target code in Compiler ConstructionAddress in the target code in Compiler Construction
Address in the target code in Compiler Construction
 
Client-Server Computing
Client-Server ComputingClient-Server Computing
Client-Server Computing
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed System
 
Coda file system
Coda file systemCoda file system
Coda file system
 

En vedette

Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
Rupsee
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
karan2190
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peer
Mohd Arif
 

En vedette (20)

CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
 
CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
Advanced Computing Techonologies
Advanced Computing TechonologiesAdvanced Computing Techonologies
Advanced Computing Techonologies
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
IT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTINGIT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTING
 
IT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTINGIT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTING
 
IT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTINGIT6601 MOBILE COMPUTING
IT6601 MOBILE COMPUTING
 
Distributed system notes unit I
Distributed system notes unit IDistributed system notes unit I
Distributed system notes unit I
 
Distributed System
Distributed System Distributed System
Distributed System
 
Java RMI Presentation
Java RMI PresentationJava RMI Presentation
Java RMI Presentation
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 
HIGH SPEED NETWORKS
HIGH SPEED NETWORKSHIGH SPEED NETWORKS
HIGH SPEED NETWORKS
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peer
 
Ipc
IpcIpc
Ipc
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 

Similaire à CS6601 DISTRIBUTED SYSTEMS

Chapter 4 slides
Chapter 4 slidesChapter 4 slides
Chapter 4 slides
lara_ays
 
Lab manual cn-2012-13
Lab manual cn-2012-13Lab manual cn-2012-13
Lab manual cn-2012-13
Sasi Kala
 
ikh331-06-distributed-programming
ikh331-06-distributed-programmingikh331-06-distributed-programming
ikh331-06-distributed-programming
Anung Ariwibowo
 

Similaire à CS6601 DISTRIBUTED SYSTEMS (20)

Chapter 4 slides
Chapter 4 slidesChapter 4 slides
Chapter 4 slides
 
Lab manual cn-2012-13
Lab manual cn-2012-13Lab manual cn-2012-13
Lab manual cn-2012-13
 
Unit 8 Java
Unit 8 JavaUnit 8 Java
Unit 8 Java
 
分散式系統
分散式系統分散式系統
分散式系統
 
CHAPTER - 3 - JAVA NETWORKING.pptx
CHAPTER - 3 - JAVA NETWORKING.pptxCHAPTER - 3 - JAVA NETWORKING.pptx
CHAPTER - 3 - JAVA NETWORKING.pptx
 
Sockets
Sockets Sockets
Sockets
 
ikh331-06-distributed-programming
ikh331-06-distributed-programmingikh331-06-distributed-programming
ikh331-06-distributed-programming
 
Java networking
Java networkingJava networking
Java networking
 
Java 1
Java 1Java 1
Java 1
 
Network Programming in Java
Network Programming in JavaNetwork Programming in Java
Network Programming in Java
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23
 
EN-04 (1).pptx
EN-04 (1).pptxEN-04 (1).pptx
EN-04 (1).pptx
 
Networking in Java
Networking in JavaNetworking in Java
Networking in Java
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
Sockets
SocketsSockets
Sockets
 
Java
JavaJava
Java
 
java sockets
 java sockets java sockets
java sockets
 
1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii
 
Socket Programming
Socket ProgrammingSocket Programming
Socket Programming
 
Network programming in java - PPT
Network programming in java - PPTNetwork programming in java - PPT
Network programming in java - PPT
 

Plus de Kathirvel Ayyaswamy

Plus de Kathirvel Ayyaswamy (20)

22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
 
22cs201 COMPUTER ORGANIZATION AND ARCHITECTURE
22cs201 COMPUTER ORGANIZATION AND ARCHITECTURE22cs201 COMPUTER ORGANIZATION AND ARCHITECTURE
22cs201 COMPUTER ORGANIZATION AND ARCHITECTURE
 
22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
 
18CS3040_Distributed Systems
18CS3040_Distributed Systems18CS3040_Distributed Systems
18CS3040_Distributed Systems
 
20CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 220CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 2
 
18CS3040 Distributed System
18CS3040 Distributed System	18CS3040 Distributed System
18CS3040 Distributed System
 
20CS2021 Distributed Computing
20CS2021 Distributed Computing 20CS2021 Distributed Computing
20CS2021 Distributed Computing
 
20CS2021 DISTRIBUTED COMPUTING
20CS2021 DISTRIBUTED COMPUTING20CS2021 DISTRIBUTED COMPUTING
20CS2021 DISTRIBUTED COMPUTING
 
18CS3040 DISTRIBUTED SYSTEMS
18CS3040 DISTRIBUTED SYSTEMS18CS3040 DISTRIBUTED SYSTEMS
18CS3040 DISTRIBUTED SYSTEMS
 
Recent Trends in IoT and Sustainability
Recent Trends in IoT and SustainabilityRecent Trends in IoT and Sustainability
Recent Trends in IoT and Sustainability
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security 18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
 
20CS2008 Computer Networks
20CS2008 Computer Networks20CS2008 Computer Networks
20CS2008 Computer Networks
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
20CS024 Ethics in Information Technology
20CS024 Ethics in Information Technology20CS024 Ethics in Information Technology
20CS024 Ethics in Information Technology
 

Dernier

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Dernier (20)

A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 

CS6601 DISTRIBUTED SYSTEMS

  • 1. CS6601 DISTRIBUTED SYSTEMS UNIT – II Dr.A.Kathirvel, Professor, Computer Science and Engg. M N M Jain Engineering College, Chennai
  • 2. Unit - II COMMUNICATION IN DISTRIBUTED SYSTEM System Model – Inter process Communication – the API for internet protocols – External data representation and Multicast communication. Network virtualization: Overlay networks. Case study: MPI Remote Method Invocation And Objects: Remote Invocation – Introduction – Request-reply protocols – Remote procedure call – Remote method invocation. Case study: Java RMI – Group communication – Publish-subscribe systems – Message queues – Shared memory approaches – Distributed objects – Case study: Enterprise Java Beans -from objects to components. Coulouris, Dollimore, Kindberg and Blair Distributed Systems:Concepts and Design Edition 5, Addison-Wesley 2012
  • 4. Fig4.2:Sockets and ports message agreed portany port socketsocket Internet address = 138.37.88.249Internet address = 138.37.94.248 other ports client server 4
  • 5. UDP client sends a message to the server and gets a reply import java.net.*; import java.io.*; public class UDPClient{ public static void main(String args[]){ // args give message contents and server hostname DatagramSocket aSocket = null; try { aSocket = new DatagramSocket(); byte [] m = args[0].getBytes(); InetAddress aHost = InetAddress.getByName(args[1]); int serverPort = 6789; DatagramPacket request = new DatagramPacket(m, m.length(), aHost, serverPort); aSocket.send(request); byte[] buffer = new byte[1000]; DatagramPacket reply = new DatagramPacket(buffer, buffer.length); aSocket.receive(reply); System.out.println("Reply: " + new String(reply.getData())); }catch (SocketException e){System.out.println("Socket: " + e.getMessage()); }catch (IOException e){System.out.println("IO: " + e.getMessage());} }finally {if(aSocket != null) aSocket.close();} } } 5
  • 6. UDP server repeatedly receives a request and sends it back to the client import java.net.*; import java.io.*; public class UDPServer{ public static void main(String args[]){ DatagramSocket aSocket = null; try{ aSocket = new DatagramSocket(6789); byte[] buffer = new byte[1000]; while(true){ DatagramPacket request = new DatagramPacket(buffer, buffer.length); aSocket.receive(request); DatagramPacket reply = new DatagramPacket(request.getData(), request.getLength(), request.getAddress(), request.getPort()); aSocket.send(reply); } }catch (SocketException e){System.out.println("Socket: " + e.getMessage()); }catch (IOException e) {System.out.println("IO: " + e.getMessage());} }finally {if(aSocket != null) aSocket.close();} }} 6
  • 7. TCP client makes connection to server, sends request and receives reply import java.net.*; import java.io.*; public class TCPClient { public static void main (String args[]) { // arguments supply message and hostname of destination Socket s = null; try{ int serverPort = 7896; s = new Socket(args[1], serverPort); DataInputStream in = new DataInputStream( s.getInputStream()); DataOutputStream out =new DataOutputStream( s.getOutputStream()); out.writeUTF(args[0]); // UTF is a string encoding see Sn 4.3 String data = in.readUTF(); System.out.println("Received: "+ data) ; }catch (UnknownHostException e){ System.out.println("Sock:"+e.getMessage()); }catch (EOFException e){System.out.println("EOF:"+e.getMessage()); }catch (IOException e){System.out.println("IO:"+e.getMessage());} }finally {if(s!=null) try {s.close();}catch (IOException e){System.out.println("close:"+e.getMessage());}} }} 7
  • 8. TCP server makes a connection for each client and then echoes the client’s request import java.net.*; import java.io.*; public class TCPServer { public static void main (String args[]) { try{ int serverPort = 7896; ServerSocket listenSocket = new ServerSocket(serverPort); while(true) { Socket clientSocket = listenSocket.accept(); Connection c = new Connection(clientSocket); } } catch(IOException e) {System.out.println("Listen :"+e.getMessage());} } } // this continues on the next slide 8
  • 9. class Connection extends Thread { DataInputStream in; DataOutputStream out; Socket clientSocket; public Connection (Socket aClientSocket) { try { clientSocket = aClientSocket; in = new DataInputStream( clientSocket.getInputStream()); out =new DataOutputStream( clientSocket.getOutputStream()); this.start(); } catch(IOException e) {System.out.println("Connection:"+e.getMessage());} } public void run(){ try { // an echo server String data = in.readUTF(); out.writeUTF(data); } catch(EOFException e) {System.out.println("EOF:"+e.getMessage()); } catch(IOException e) {System.out.println("IO:"+e.getMessage());} } finally{ try {clientSocket.close();}catch (IOException e){/*close failed*/}} } } 9
  • 10. CORBA CDR for constructed types Type Representation sequence length (unsigned long) followed by elements in order string length (unsigned long) followed by characters in order (can also can have wide characters) array array elements in order (no length specified because it is fixed) struct in the order of declaration o f the comp onents enumerated unsigned long (the values are specified by the order declared) union type tag followed by the selected m emb er 10
  • 11. CORBA CDR message The flattened form represents a Person struct with value: {‘Smith’, ‘London’, 1984} 0–3 4–7 8–11 12–15 16–19 20-23 24–27 5 "Smit" "h___" 6 "Lond" "on__" 1984 index in sequence of bytes 4 bytes notes on representation length of string ‘Smith’ length of string ‘London’ unsigned long 11
  • 12. Indication of Java serialized form The true serialized form contains additional type markers; h0 and h1 are handles Serialized values Person 3 1984 8-byte version number int year 5 Smith java.lang.String name: 6 London h0 java.lang.String place: h1 Explanation class name, version number number, type and name of instance variables values of instance variables 12
  • 13. XML definition of the Person structure <person id="123456789"> <name>Smith</name> <place>London</place> <year>1984</year> <!-- a comment --> </person > use of namespace in the Person structure <person pers:id="123456789" xmlns:pers="http://www.cdk5.net/person"> <pers:name> Smith </pers:name> <pers:place> London </pers:place > <pers:year> 1984 </pers:year> </person> 13
  • 14. An XML schema for the Person structure <xsd:schema xmlns:xsd = URL of XML schema definitions > <xsd:element name= "person" type ="personType" /> <xsd:complexType name="personType"> <xsd:sequence> <xsd:element name = "name" type="xs:string"/> <xsd:element name = "place" type="xs:string"/> <xsd:element name = "year" type="xs:positiveInteger"/> </xsd:sequence> <xsd:attribute name= "id" type = "xs:positiveInteger"/> </xsd:complexType> </xsd:schema> Representation of a remote object reference Internet addressport number time object number interface of remote object 32 bits 32 bits 32 bits 32 bits 14
  • 15. Multicast peer joins a group and sends and receives datagrams import java.net.*; import java.io.*; public class MulticastPeer{ public static void main(String args[]){ // args give message contents & destination multicast group (e.g. "228.5.6.7") MulticastSocket s =null; try { InetAddress group = InetAddress.getByName(args[1]); s = new MulticastSocket(6789); s.joinGroup(group); byte [] m = args[0].getBytes(); DatagramPacket messageOut = new DatagramPacket(m, m.length, group, 6789); s.send(messageOut); // this figure continued on the next slide 15
  • 16. // get messages from others in group byte[] buffer = new byte[1000]; for(int i=0; i< 3; i++) { DatagramPacket messageIn = new DatagramPacket(buffer, buffer.length); s.receive(messageIn); System.out.println("Received:" + new String(messageIn.getData())); } s.leaveGroup(group); }catch (SocketException e){System.out.println("Socket: " + e.getMessage()); }catch (IOException e){System.out.println("IO: " + e.getMessage());} }finally {if(s != null) s.close();} } } 16
  • 17. Types of overlay table continues on the next slide 17
  • 18.
  • 20. Fig:4.17 An overview of point-to-point communication in MPI 20
  • 22. Fig 5.1: Middleware layers Applications Middleware layersUnderlying interprocess communication primitives: Sockets, message passing, multicast support, overlay networks UDP and TCP Remote invocation, indirect communication This chapter (and Chapter 6) Remote invocation 22
  • 24. Operations of the request-reply protocol public byte[] doOperation(RemoteRef s,int operationId,byte[] arguments) sends a request message to the remote server and returns the reply. The arguments specify the remote server, the operation to be invoked and the arguments of that operation. public byte[] getRequest (); acquires a client request via the server port. public void sendReply(byte[] reply,InetAddress clientHost, int clientPort); sends the reply message reply to the client at its Internet address and port. 24
  • 25. Fig 5.4:Request-reply message structure messageType requestId remoteReference operationId arguments int (0=Request, 1= Reply) int RemoteRef int or Operation array of bytes 25
  • 26. Fig5.5:RPC exchange protocols R Request R R Reply R R A Acknowledge reply Request Request Reply Client Server Client Name Messages sent by Fig 5.6:HTTP request message GET //www.dcs.qmw.ac.uk/index.html HTTP/ 1.1 URL or pathnamemethod HTTP version headers message body Fig 5.7:HTTP Reply message HTTP/1.1 200 OK resource data HTTP version status code reason headers message body 26
  • 27. Fig5.8:CORBA IDL example // In file Person.idl struct Person { string name; string place; long year;} ; interface PersonList { readonly attribute string listname; void addPerson(in Person p) ; void getPerson(in string name, out Person p); long number();}; Fig5.9:Call semantics Fault tolerance measures Call semantics Retransmit request message Duplicate filtering Re-execute procedure or retransmit reply No Yes Yes Not applicable No Yes Not applicable Re-execute procedure Retransmit reply At-most-once At-least-once Maybe
  • 28. Fig5.10: Role of client and server stub procedures in RPC client Request Reply CommunicationCommunication modulemodule dispatcher service client stub server stub procedure procedure client process server process procedureprogram 28
  • 29. Fig5.11: Files interface in Sun XDR const MAX = 1000; typedef int FileIdentifier; typedef int FilePointer; typedef int Length; struct Data { int length; char buffer[MAX]; }; struct writeargs { FileIdentifier f; FilePointer position; Data data; }; struct readargs { FileIdentifier f; FilePointer position; Length length; }; program FILEREADWRITE { version VERSION { void WRITE(writeargs)=1; 1 Data READ(readargs)=2; 2 }=2; } = 9999; 29
  • 30. Fig5.12: Remote and local method invocations invocation invocation remote invocation remote local local local invocation invocation A B C D E F 30
  • 31. Fig5.13:A remote object and its remote interface interface remote m1 m2 m3 m4 m5 m6 Data implementation remoteobject { of methods 31
  • 32. Fig5.14: Instantiation of remote objects 32
  • 33. Fig5.15: The role of proxy and skeleton in remote method invocation 33
  • 34. Fig5.16:Java Remote interfaces Shape and ShapeList import java.rmi.*; import java.util.Vector; public interface Shape extends Remote { int getVersion() throws RemoteException; GraphicalObject getAllState() throws RemoteException; 1 } public interface ShapeList extends Remote { Shape newShape(GraphicalObject g) throws RemoteException; 2 Vector allShapes() throws RemoteException; int getVersion() throws RemoteException; } 34
  • 35. The Naming class of Java RMIregistry void rebind (String name, Remote obj) This method is used by a server to register the identifier of a remote object by name, as shown in Figure 15.18, line 3. void bind (String name, Remote obj) This method can alternatively be used by a server to register a remote object by name, but if the name is already bound to a remote object reference an exception is thrown. void unbind (String name, Remote obj) This method removes a binding. Remote lookup(String name) This method is used by clients to look up a remote object by name, as shown in Figure 5.20 line 1. A remote object reference is returned. String [] list() This method returns an array of Strings containing the names bound in the registry. 35
  • 36. Fig5.18:Java class ShapeListServer with main method import java.rmi.*; public class ShapeListServer{ public static void main(String args[]){ System.setSecurityManager(new RMISecurityManager()); try{ ShapeList aShapeList = new ShapeListServant(); 1 Naming.rebind("Shape List", aShapeList ); 2 System.out.println("ShapeList server ready"); }catch(Exception e) { System.out.println("ShapeList server main " + e.getMessage());} } } 36
  • 37. Fig5.19:Java class ShapeListServant implements interface ShapeList import java.rmi.*; import java.rmi.server.UnicastRemoteObject; import java.util.Vector; public class ShapeListServant extends UnicastRemoteObject implements ShapeList { private Vector theList; // contains the list of Shapes private int version; public ShapeListServant()throws RemoteException{...} public Shape newShape(GraphicalObject g) throws RemoteException { 1 version++; Shape s = new ShapeServant( g, version); 2 theList.addElement(s); return s; } public Vector allShapes()throws RemoteException{...} public int getVersion() throws RemoteException { ... } } 37
  • 38. Fig5.20: Java client of ShapeList import java.rmi.*; import java.rmi.server.*; import java.util.Vector; public class ShapeListClient{ public static void main(String args[]){ System.setSecurityManager(new RMISecurityManager()); ShapeList aShapeList = null; try{ aShapeList = (ShapeList) Naming.lookup("//bruno.ShapeList"); 1 Vector sList = aShapeList.allShapes(); 2 } catch(RemoteException e) {System.out.println(e.getMessage()); }catch(Exception e) {System.out.println("Client: " + e.getMessage());} } } 38
  • 39. Fig5.21: Classes supporting Java RMI RemoteServer UnicastRemoteObject <servant class> Activatable RemoteObject Indirect Communication 39
  • 40. Fig 6.1:Space and time coupling in ds 40
  • 41. Fig6.2:Open and closed groups Closed group Open group 41
  • 42. Fig6.3: The role of group membership management Join Group address expansion Multicast communication Group send Fail Group membership management Leave Process group 42
  • 43. Fig 6.4:The architecture of JGroups 43
  • 44. Fig6.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) { }} 44
  • 45. Fig 6.6:Java class FireAlarmConsumerJG import org.jgroups.JChannel; public class FireAlarmConsumerJG { public String await() { try { JChannel channel = new JChannel(); channel.connect("AlarmChannel"); Message msg = (Message) channel.receive(0); return (String) msg.GetObject(); } catch(Exception e) { return null; } }} 45
  • 46. Fig 6.7:Dealing room system Dealer’s computer Information provider Dealer External source External source Information provider Dealer Dealer Dealer Notification Notification Notification Notification Notification Notification Notification Notification Dealer’s computer Dealer’s computerDealer’s computer Notification Notification 46
  • 48. Fig 6.9:A network of brokers 48
  • 49. Fig6.10:The architecture of publish- subscribe systems 49
  • 50. Fig6.11:Filtering-based routing upon receive publish(event e) from node x 1 matchlist := match(e, subscriptions) 2 send notify(e) to matchlist; 3 fwdlist := match(e, routing); 4 send publish(e) to fwdlist - x; 5 upon receive subscribe(subscription s) from node x 6 if x is client then 7 add x to subscriptions; 8 else add(x, s) to routing; 9 send subscribe(s) to neighbours - x; 10 50
  • 51. Fig6.12:Rendezvous-based routing upon receive publish(event e) from node x at node i rvlist := EN(e); if i in rvlist then begin matchlist :=match(e, subscriptions); send notify(e) to matchlist; end send publish(e) to rvlist - i; upon receive subscribe(subscription s) from node x at node i rvlist := SN(s); if i in rvlist then add s to subscriptions; else send subscribe(s) to rvlist - i; 51
  • 54. Fig6.15:A simple networked topology in WebSphere MQ 54
  • 56. Fig6.17:Java class FireAlarmJMS import javax.jms.*; import javax.naming.*; public class FireAlarmJMS { public void raise() { try { 1 Context ctx = new InitialContext(); 2 TopicConnectionFactory topicFactory = 3 (TopicConnectionFactory)ctx.lookup ("TopicConnectionFactory"); 4 Topic topic = (Topic)ctx.lookup("Alarms"); 5 TopicConnection topicConn = 6 topicConnectionFactory.createTopicConnection(); 7 TopicSession topicSess = topicConn.createTopicSession(false, 8 Session.AUTO_ACKNOWLEDGE); 9 TopicPublisher topicPub = topicSess.createPublisher(topic); 10; TextMessage msg = topicSess.createTextMessage(); 11 msg.setText("Fire!"); 12 topicPub.publish(message); 13 } catch (Exception e) { 14 } 15 } 56
  • 57. Fig6.18:Java class FireAlarmConsumerJMS import javax.jms.*; import javax.naming.*; public class FireAlarmConsumerJMS public String await() { try { 1 Context ctx = new InitialContext(); 2 TopicConnectionFactory topicFactory = 3 (TopicConnectionFactory)ctx.lookup("TopicConnectionFactory"); 4 Topic topic = (Topic)ctx.lookup("Alarms"); 5 TopicConnection topicConn = 6 topicConnectionFactory.createTopicConnection(); 7 TopicSession topicSess = topicConn.createTopicSession(false, 8 Session.AUTO_ACKNOWLEDGE); 9 TopicSubscriber topicSub = topicSess.createSubscriber(topic); 10 topicSub.start(); 11 TextMessage msg = (TextMessage) topicSub.receive(); 12 return msg.getText(); 13 } catch (Exception e) { 14 return null;15 }16 } 57
  • 58. Fig6.19:The distributed shared memory abstraction 58
  • 59. Fig6.20:The tuple space abstraction 59
  • 60. Replication and the tuple space operations 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. continued on next slide 60
  • 61. take Phase 1: Selecting the tuple to be removed Phase 2: Removing the selected tuple 1. The requesting site multicasts the take request to all members of the view; 2. On receiving this request, each replica acquires a lock on the associated tuple set and, if the lock cannot be acquired, the take request is rejected; 3. All accepting members reply with the set of all matching tuples; 4. Step 1 is repeated until all sites have accepted the request and responded with their set of tuples and the intersection is non-null; 5. A particular tuple is selected as the result of the operation (selected randomly from the intersection of all the replies); 6. If only a minority accept the request, this minority are asked to release their locks and phase 1 repeats. 1. The requesting site multicasts a remove request to all members of the view citing the tuple to be removed; 2. On receiving this request, members remove the tuple from their replica, send an acknowledgement and release the lock; 3. Step 1 is repeated until all acknowledgements are received. 61
  • 62. Fig6.22:Partitioning in the York Linda Kernel 62
  • 64. Fig6.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;} }} 64
  • 65. Fig6.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) { } } } 65
  • 66. Fig16.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; } }} 66
  • 69. Fig8.2:IDL interfaces Shape and ShapeList struct Rectangle{ 1 long width; long height; long x; long y; } ; struct GraphicalObject { 2 string type; Rectangle enclosing; boolean isFilled; }; interface Shape { 3 long getVersion() ; GraphicalObject getAllState() ; // returns state of the GraphicalObject }; typedef sequence <Shape, 100> All; 4 interface ShapeList { 5 exception FullException{ }; 6 Shape newShape(in GraphicalObject g) raises (FullException); 7 All allShapes(); // returns sequence of remote object references 8 long getVersion() ; }; 69
  • 70. Fig8.3:IDL module Whiteboard module Whiteboard { struct Rectangle{ ...} ; struct GraphicalObject { ...}; interface Shape { ...}; typedef sequence <Shape, 100> All; interface ShapeList { ...}; }; 70
  • 71. Fig8.4:IDL constructed types – 1 Type Examples Use sequence typedef sequence <Shape, 100> All; typedef sequence <Shape> All bounded and unbounded sequences of Shapes Defines a type for a variable-length sequence of elements of a specified IDL type. An upper bound on the length may be specified. string String name; typedef string<8> SmallString; unboundedand bounded sequences of characters Defines a sequences of characters, terminated by the null character. An upper bound on the length may be specified. array typedef octet uniqueId[12]; typedef GraphicalObject GO[10][8] Defines a type for a multi-dimensional fixed-length sequence of elements of a specified IDL type. this figure continues on the next slide 71
  • 72. Fig8.4: IDL constructed types – 2 Type Examples Use record struct GraphicalObject { string type; Rectangle enclosing; boolean isFilled; }; Defines a type for a record containing a group of related entities. Structs are passed by value in arguments and results. enumerated enum Rand (Exp, Number, Name); The enumerated type in IDL maps a type name onto a small set of integer values. union union Exp switch (Rand) { case Exp: string vote; case Number: long n; case Name: string s; The IDL discriminated union allows one of a given set of types to be passed as an argument. The header is parameterized by anenum, which specifies which member is in use.}; 72
  • 73. Fig8.5:The main components of the CORBA architecture client server proxy or dynamic invocation implementation repository object adapter ORBORB skeleton or dynamic skeleton client program interface repository Request Reply corecorefor A Servant A 73
  • 74. Fig8.6: CORBA Services (1) this figure continues on the next slide 74
  • 76. Fig8.7:Java interfaces generated by idlj from CORBA interface ShapeList public interface ShapeListOperations { Shape newShape(GraphicalObject g) throws ShapeListPackage.FullException; Shape[] allShapes(); int getVersion(); } public interface ShapeList extends ShapeListOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } 76
  • 77. Fig8.8: ShapeListServant class of the Java server program for CORBA interface ShapeList import org.omg.CORBA.*; import org.omg.PortableServer.POA; class ShapeListServant extends ShapeListPOA { private POA theRootpoa; private Shape theList[]; private int version; private static int n=0; public ShapeListServant(POA rootpoa){ theRootpoa = rootpoa; // initialize the other instance variables } // continued on the next slide 77
  • 78. public Shape newShape(GraphicalObject g) throws ShapeListPackage.FullException { 1 version++; Shape s = null; ShapeServant shapeRef = new ShapeServant( g, version); try { org.omg.CORBA.Object ref = theRoopoa.servant_to_reference(shapeRef); 2 s = ShapeHelper.narrow(ref); } catch (Exception e) {} if(n >=100) throw new ShapeListPackage.FullException(); theList[n++] = s; return s; } public Shape[] allShapes(){ ... } public int getVersion() { ... } } 78
  • 79. Fig8.9:Java class ShapeListServer import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.CORBA.*; import org.omg.PortableServer.*; public class ShapeListServer { public static void main(String args[]) { try{ ORB orb = ORB.init(args,null); 1 POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));2 rootpoa.the_POAManager().activate(); 3 ShapeListServant SLSRef = new ShapeListServant(rootpoa); 4 org.omg.CORBA.Object ref = rootpoa.servant_to_reference(SLSRef); 5 ShapeList SLRef = ShapeListHelper.narrow(ref); org.omg.CORBA.Object objRef =orb.resolve_initial_references("NameService"); NamingContext ncRef = NamingContextHelper.narrow(objRef); 6 NameComponent nc = new NameComponent("ShapeList", ""); 7 NameComponent path[] = {nc}; 8 ncRef.rebind(path, SLRef); 9 orb.run(); 10 } catch (Exception e) { ... } }} 79
  • 80. Fig8.10:Java client program for CORBA interfaces Shape and ShapeList import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.CORBA.*; public class ShapeListClient{ public static void main(String args[]) { try{ ORB orb = ORB.init(args, null); 1 org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); NamingContext ncRef = NamingContextHelper.narrow(objRef); NameComponent nc = new NameComponent("ShapeList", ""); NameComponent path [] = { nc }; ShapeList shapeListRef = ShapeListHelper.narrow(ncRef.resolve(path)); 2 Shape[] sList = shapeListRef.allShapes(); 3 GraphicalObject g = sList[0].getAllState(); 4 } catch(org.omg.CORBA.SystemException e) {...} } 80
  • 81. Fig8.11:An example software architecture 81
  • 82. Fig8.12:The structure of a container 82
  • 86. Fig8.16 :An example component configuration in Fractal 86
  • 87. Fig8.17:The structure of a Fractal component 87
  • 88. Fig8.18:Component and Content Controller Interfaces in Fractal 88