Distributed Systems Lecturer Notes Latest 25 148
Distributed Systems Lecturer Notes Latest 25 148
2
SYSTEM
Physical models: It is the most explicit way in which to describe a system in terms
of hardware composition.
Architectural models: They describe a system in terms of the computational and
communication tasks performed by its computational elements.
Fundamental models: They examine individual aspects of a distributed system.
They are again classified based on some parameters as follows:
Interaction models: This deals with the structure and sequencing of the
communication between the elements of the system
Failure models: This deals with the ways in which a system may fail to
operate correctly
Security models: This deals with the security measures implemented in the
system against attempts to interfere with its correct operation or to steal its
data.
There are many physical models available from the primitive baseline model to the
complex models that could handle cloud environments.
It has very limited internet connectivity and can support a small range of
services such as shared local printers and file servers.
The nodes were desktop computers and therefore relatively static, discrete and
independent.
Mobile computing has led to physical models with movable nodes. Service
discovery is of primary concern in these systems.
The cloud computing and cluster architectures hassled to pools of nodes that
collectively provide a given service. This resulted in enormous number of
systems given the service.
This describes the components and their interrelationships to ensure the system is
reliable, manageable, adaptable and cost-effective. The different models are evaluated based
on the following criteria:
architectural elements
architectural patterns
middleware platforms
Communication paradigms
There are three major modes of communication in distributed systems:
Interprocess communication:
This is a low-level support for communication between processes in distributed
systems, including message-passing primitives. They have direct access to the API
offered by Internet protocols and support multicast communication.
Remote invocation:
It is used in a distributed system and it is the calling of a remote operation,
procedure or method.
a) Request-reply protocols:
This is a message exchange pattern in which a requestor sends a request message
to a replier system which receives and processes the request, ultimately returning a
message in response. This is a simple, but powerful messaging pattern which
allows two applications to have a two-way conversation with one another over a
channel. This pattern is especially common in client–server architectures.
2.6 Communication in Distrubuted Sytem
b) Remote procedure calls: Remote Procedure Call (RPC) is a protocol that one
program can use to request a service from a program located in another computer
in a network without having to understand network details.
c) Remote method invocation: RMI (Remote Method Invocation) is a way that a
programmer can write object-oriented programming in which objects on different
computers can interact in a distributed network. This has the following two key
features:
Space uncoupling: Senders do not need to know who they are sending to
Time uncoupling: Senders and receivers do not need to exist at the same time
Indirect communication
Key techniques for indirect communication include:
a) Group communication: Group communication is concerned with the delivery
of messages to a set of recipients and hence is a multiparty communication
paradigm supporting one-to-many communication. A group identifier uniquely
identifies the group. The recipients join the group and receive the messages.
Senders send messages to the group based on the group identifier and hence do
not need to know the recipients of the message.
b) Publish-subscribe systems: This is a messaging pattern where senders
of messages, called publishers, do not program the messages to be sent directly
to specific receivers, called subscribers. Instead, published messages are
characterized into classes, without knowledge of what, subscribers there may
be. Similarly, subscribers express interest in one or more classes, and only
receive messages that are of interest, without knowledge of what, if any,
publishers there are. They offer one-to-many style of communication.
c) Message queues: They offer a point-to-point service whereby producer
processes can send messages to a specified queue and consumer processes can
receive messages from the queue or be notified of the arrival of new messages
in the queue. Queues therefore offer an indirection between the producer and
consumer processes.
d) Tuple spaces: The processes can place arbitrary items of structured data,
called tuples, in a persistent tuple space and other processes can either read or
remove such tuples from the tuple space by specifying patterns of interest. This
style of programming is known as generative communication.
e) Distributed shared memory: In computer architecture, distributed shared
memory (DSM) is a form of memory architecture where the (physically
separate) memories can be addressed as one (logically shared) address space.
Here, the term shared does not mean that there is a single centralized memory
but shared essentially means that the address space is shared (same physical
address on two processors refers to the same location in memory
Distrubuted Systems 2.7
1) Client-server:
The system is structured as a set of processes, called servers, that offer services
to the users, called clients.
The client-server model is usually based on a simple request/reply protocol,
implemented with send/receive primitives or using remote procedure calls
(RPC) or remote method invocation (RMI).
The client sends a request (invocation) message to the server asking for some
service; - the server does the work and returns a result (e.g. the data requested)
or an error code if the work could not be performed.
A server can itself request services from other servers; thus, in this new
relation, the server itself acts like a client.
When an object is needed by a client process, the caching service first checks
the cache and supplies the object from there if an up-to-date copy is available.
If not, an up-to-date copy is fetched.
Caches may be co-located with each client or they may be located in a proxy
server that can be shared by several clients.
Mobile code:
Applets are a well-known and widely used example of mobile code.
The user running a browser selects a link to an applet whose code is stored on a
web server; the code is downloaded to the browser and runs.
They provide interactive response.
Mobile agents:
A mobile agent is a running program (including both code and data) that
travels from one computer to another in a network carrying out a task on
someone‟s behalf, such as collecting information, and eventually returning
with the results.
A mobile agent is a complete program, code + data, that can work (relatively)
independently.
The mobile agent can invoke local resources/data.
A mobile agent may make many invocations to local resources at each site it
visit.
Typical tasks of mobile agent includes: collect information , install/maintain
software on computers, compare prices from various vendors bay visiting their
sites etc.
Mobile agents (like mobile code) are a potential security threat to the resources
in computers that they visit.
Layering:
In a layered approach, a complex system is partitioned into a number of
layers, with a given layer making use of the services offered by the layer
below.
2.10 Communication in Distrubuted Sytem
Tiered architecture
Tiering is a technique to organize functionality of a given layer and place
this functionality into appropriate servers and, as a secondary
consideration, on to physical nodes.
The two tiered architecture refers to client/server architectures in which the
user interface (presentation layer) runs on the client and the database
(data layer) is stored on the server. The actual application logic can run on
either the client or the server.
Distrubuted Systems 2.11
The legacy system acts as a server in its own right with a graphical
interface implemented on a client.
The major disadvantages of thin clients is that it places a heavy processing
load on both the server and the network and the delay due to operating
system latencies.
The virtual network computing(VNC) has emerged to overcome the
disadvantages og thin clients.
VNC is a type of remote-control software that makes it possible to control
another computer over a network connection.
Keystrokes and mouseclicks are transmitted from one computer to another,
allowing technical support staff to manage a desktop, server, or other
networked device without being in the same physical location.
Since all the application data and code is stored by a file server, the users
may migrate from one network computer to another. So VNC is of big use
in distributed systems.
Other patterns
a) Proxy:
This facilitates location transparency in remote procedure calls or remote
method invocation.
A proxy is created in the local address space to represent the remote object
with same interface as the remote object.
The programmer makes calls on this proxy object and he need not be aware
of the distributed nature of the interaction.
b) Brokerage:
It is used to bring interoperability in potentially complex distributed
infrastructures.
The service broker is meant to be a registry of services, and stores
information about what services are available and who may use them.
c) Reflection:
The Reflection architectural pattern provides a mechanism for changing
structure and behavior of software systems dynamically.
It supports the modification of fundamental aspects, such as type structures
and function call mechanisms.
In this pattern, an application is split into two parts:
1) Meta Level: This provides information about selected system
properties and makes the software self-aware.
2) Base level: This includes the application logic. Its implementation
builds on the meta level. Changes to information kept in the meta level
affect subsequent base-level behavior.
2 2.2.3 Associated middleware solutions
Middleware is a general term for software that serves to "glue together" separate,
often complex and already existing, programs.
Categories of middleware
The following are some of the categories of middleware:
Distributed Objects
The term distributed objects usually refers to software modules that are designed to
work together, but reside either in multiple computers connected via a network or
in different processes inside the same computer. One object sends a message to
another object in a remote machine or process to perform some task. The results
are sent back to the calling object.
Distributed Components
A component is a reusable program building block that can be combined with
other components in the same or other computers in a distributed network to form
an application. Examples: a single button in a graphical user interface, a small
interest calculator, an interface to a database manager. Components can be
2.14 Communication in Distrubuted Sytem
deployed on different servers in a network and communicate with each other for
needed services. A component runs within a context called a container .
Examples: pages on a Web site, Web browsers, and word processors.
Publish subscriber model
Publish–subscribe is a messaging pattern where senders of messages, called
publishers, do not program the messages to be sent directly to specific receivers,
called subscribers. Instead, published messages are characterized into classes,
without knowledge of what, if any, subscribers there may be. Similarly,
subscribers express interest in one or more classes, and only receive messages that
are of interest, without knowledge of what publishers are there.
Message Queues
Message queues provide an asynchronous communications protocol, meaning that
the sender and receiver of the message do not need to interact with the message
queue at the same time. Messages placed onto the queue are stored until the
recipient retrieves them. Message queues have implicit or explicit limits on the size
of data that may be transmitted in a single message and the number of messages
that may remain outstanding on the queue.
Web services
A web service is a collection of open protocols and standards used for exchanging
data between applications or systems. Software applications written in various
programming languages and running on various platforms can use web services to
exchange data over computer networks like the Internet in a manner similar to
inter-process communication on a single computer. This interoperability (e.g.,
between Java and Python, or Windows and Linux applications) is due to the use of
open standards.
Peer to peer
Peer-to-peer (P2P) computing or networking is a distributed application
architecture that partitions tasks or work load between peers. Peers are equally
privileged, equipotent participants in the application. They are said to form a peer-
to-peer network of nodes.
Advantages of middleware
Real time information access among systems.
Streamlines business processes and helps raise organizational efficiency.
Maintains information integrity across multiple systems.
It covers a wide range of software systems, including distributed Objects and
components, message-oriented communication, and mobile application support.
Middleware is anything that helps developers create networked applications.
Distrubuted Systems 2.15
Disadvantages of middleware
Prohibitively high development costs.
There are only few people with experience in the market place to develop and use
a middleware.
Models addressing time synchronization, message delays, failures, security issues are
addressed as:
make explicit all the relevant assumptions about the systems we are modelling.
1) Communication performance
2) Global notion of time.
Communication Performance
The communication channel in can be implemented in a variety of ways in
distributed systems: Streams or through simple message passing over a network.
The performance characteristics of a network are:
a) Latency: A delay between the start of a message‟s transmission from one
process to the beginning of reception by another.
b) Bandwidth: The total amount of information that can be transmitted over in a
given time. The communication channels using the same network, have to
share the available bandwidth.
c) Jitter: The variation in the time taken to deliver a series of messages. It is very
relevant to multimedia data.
Synchronous DS
This is practically hard to achieve in real life.
In synchronous DS the time taken to execute a step of a process has known
lower and upper bounds.
Asynchronous DS
There are no bounds on: process execution speeds, message transmission
delays and clock drift rates.
Event Modeling
Event ordering is of major concern in DS.
The concept of one event happening before another in a distributed system is
examined, and is shown to define a partial ordering of the events.
The execution of a system can be described in terms of events and their ordering
despite the lack of accurate clocks.
Consider a mailing list with users X, Y, Z, and A.
Due to independent delivery in message delivery, message may be delivered in
different order.
If messages m1, m2, m3 carry their time t1, t2, t3, then they can be displayed to
users accordingly to their time ordering.
The mail box is:
23 Z Re: Meeting
24 X Meeting
26 Y Re: Meeting
2.18 Communication in Distrubuted Sytem
send receive receive
X
1 m1 4
m2
send
2 3 receive Physical
Y
receive time
send
Z
receive receive
m3 m1 m2
A
receive receive receive
t1 t2 t3
Fig 2.6: Ordering of events
2.2.3.2 Failure Model
In a DS, both processes and communication channels may fail – i.e., they may depart
from what is considered to be correct or desirable behavior. The following are the common
types of failures:
Omission Failure
Arbitrary Failure
Timing Failure
a) Omission failure
Omission failures occur due to communication link failures. They are detected through
timeouts. They are classified as:
A fixed period of time is fixed for all the methods to complete its
execution. If the method takes time longer than the allowed time, a time
out has occurred.
In an asynchronous system a timeout can indicate only that a process is
not responding.
A process crash is called fail-stopif other processes can detect certainly
that the process has crashed.
Distrubuted Systems 2.19
The loss of messages between the sending process and the outgoing
message buffer is known as send omission failures.
The loss of messages between the incoming message buffer and the
receiving process as receive-omission failures.
Communication channel
Outgoing message buffer Incoming message buffer
Clock Process Process‟s local clock exceeds the bounds on its rate of drift
from real time
Performance Process Process exceeds the bounds on the interval between two steps
Performance Channel A message‟s transmission takes longer than the stated bound.
Masking failures
Each component in a distributed system is generally constructed from a collection
of other components. It is always possible to construct reliable services from
components that exhibit failures.
A knowledge of failure characteristics of a component can enable a new service to
be designed to mask the failure of the components on which it depends.
Distrubuted Systems 2.21
The security of a DS can be achieved by securing the processes and the channels
used in their interactions and by protecting the objects that they encapsulate against
unauthorized access.
Protection is described in terms of objects, although the concepts apply equally well to
resources of all types.
Protecting objects
The users can run client programs that send invocations to the server to perform
operations on the objects.
The server carries out the operation specified in each invocation and sends the
result to the client.
2.22 Communication in Distrubuted Sytem
This uses use “access rights” that define who is allowed to perform operation on a
object.
The server should verify the identity of the principal (user) behind each operation
and checking that they have sufficient access rights to perform the requested
operation on the particular object, rejecting those who do not.
A principal is an authority that manages the access rights. The principal may be a
user or a process.
Clients:
When a client receives the result of an invocation from a server, it cannot
necessarily tell whether the source of the result message is from the intended
server or from an enemy, perhaps „spoofing‟ the mail server.
Thus the client could receive a result that was unrelated to the original
invocation, such as a false mail item (one that is not in the user‟s mailbox).
Threats to communication channels:
An enemy can copy, alter or inject messages as they travel across the network
and its intervening gateways.
Such attacks present a threat to the privacy and integrity of information as it
travels over the network and to the integrity of the system.
Defeating security threats
Encryption and authentication are use to build secure channels.
Each of the processes knows the identity of the principal on whose behalf the
other process is executing and can check their access rights before performing
an operation.
Other possible threats from an enemy
Denial of service:
Denial of service (DoS) attack is an incident in which a user or organization is
deprived of the services of a resource they would normally expect to have. In a
distributed denial-of-service, large numbers of compromised systems (sometimes
called a botnet) attack a single target.
Mobile code:
Mobile code is software transferred between systems, e.g. transferred across a
network, and executed on a local system without explicit installation by the
recipient. Mobile code raises new and interesting security problems for anyprocess
that receives and executes program code from elsewhere.
The uses of security models
The use of security techniques incurs processing and management costs. The
distributed systems faces threats from various points. The threat analysis demands the
construction of security models.
2.3 INTERPROCESS COMMUNICATION
Interprocess communication (IPC) is a set of programming interfaces that allow a
programmer to coordinate activities among different program processes that can
run concurrently in an operating system.
2.24 Communication in Distrubuted Sytem
Message destinations
The messages in the Internet protocols, messages are sent to (Internet address,
local port) pairs.
A local port is a message destination with in a computer, specified as an
integer.
A port has exactly one receiver but can have many senders.
Processes may use multiple ports to receive messages.
Any process that knows the number of a port can send a message to it.
Client programs refer to services by name and use a name server or binder to
translate their names into server locations at runtime.
This allows services to be relocated but not to migrate – that is, to be moved
while the system is running.
Distrubuted Systems 2.25
Reliability
A point-to-point message service can be described as reliable if messages are
guaranteed to be delivered.
A point-to-point message service can be described as unreliable if messages are
not guaranteed to be delivered in the face of even a single packet dropped or
lost.
Ordering
Some applications require that messages be delivered in the order in which
they were transmitted by the sender.
The delivery of messages outof sender order is regarded as a failure by such
applications.
Sockets
A socket is one endpoint of a two-way communication link between two programs
running on the network.
For a process to receive messages, its socket must be bound to a local port and one of
the Internet addresses of the computer on which it runs. Messages sent to a particular Internet
address and port number can be received only by a process whose socket is associated with
that Internet address and port number.
Users of this class refer to computers by Domain Name System (DNS) hostnames.
InetAddressaComputer = InetAddress.getByName("abc.ac.in");
In the Java and UNIX APIs, the sender specifies the destination using a socket.
o Creating a socket
Receive() returns Internet address and port of sender, along with the message.
Any application requiring messages larger than the maximum must fragment
them.
Distrubuted Systems 2.27
Blocking:
The send() returns after delivering the message to theUDP and IP protocols.
These protocols are now responsible for transmitting the message to its
destination
The message is placed in a queue for the socket that is bound to the destination
port.
The receive()blocks until a datagram is received, unless a timeout has been set
on the socket.
Timeouts:
The receive() cannot wait indefinitely. This situation occurs when the sending
process may have crashed or the expected message may have been lost.
The timeouts must be much larger than the time required to transmit a
message.
The receive() does not specify an origin for messages. This can get datagrams
addressed to its socket from any origin.
The receive() returns the Internet address and local port of the sender, allowing
the recipient to check where the message came from.
Syntax:
send(packet);
receive();
Syntax:
setSotimeout(time in seconds);
3. connect: This method is used for connecting to a particular remote
port and Internet address, in which case the socket is only able to
send messages to and receive messages from that address.
Syntax:
int connect(in sockfd, const structsockaddr *addr, socklen_taddrlen);
Distrubuted Systems 2.29
import java.net.*;
import java.io.*;
public class UDPClient
{
public static void main(String args[])
{
DatagramSocketaSocket = null;
try {
aSocket = new DatagramSocket(); // Create an object for the datagram class
byte [] m = args[0].getBytes(); //Buffer to get data
InetAddressaHost = InetAddress.getByName(args[1]); // Get Inetaddress
intserverPort = 6789;
DatagramPacket request =
new DatagramPacket(m, m.length(), aHost, serverPort);
aSocket.send(request); //Sent the packet
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());
}
2.30 Communication in Distrubuted Sytem
finally
{
if(aSocket != null) aSocket.close();}
}
}
Server program
import java.net.*;
import java.io.*;
public class UDPServer
{
public static void main(String args[])
{
DatagramSocketaSocket = 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());
Distrubuted Systems 2.31
}
catch (IOException e)
{
System.out.println("IO: " + e.getMessage());
}
finally
{
if (aSocket != null) aSocket.close();}
}
}
try
{
intserverPort = 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;
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)
{
2.34 Communication in Distrubuted Sytem
/*close failed*/
}
}
}
}
TCP server
import java.net.*;
import java.io.*;
public class TCPServer
{
public static void main (String args[])
{
try{
intserverPort = 7896;
ServerSocketlistenSocket = new ServerSocket(serverPort);
while(true) {
Socket clientSocket = listenSocket.accept();
Connection c = new Connection(clientSocket);
}
} catch(IOException e) {System.out.println("Listen :"+e.getMessage());}
}
}
class Connection extends Thread
{
DataInputStream in;
DataOutputStream out;
Socket clientSocket;
Distrubuted Systems 2.35
Marshalling is the process of taking a collection of data items and assembling them
into a form suitable for transmission in a message. Unmarshalling is the process of
disassembling a collection of data on arrival to produce an equivalent collection of
data items at the destination.
The following are the three common approaches to external data representation and
marshalling:
CORBA: The data representation is concerned with an external representation for
the structured and primitive types that can be passed as the arguments and results
of remote method invocations in CORBA. It can be used by a variety of
programming languages. Marshalling and unmarshalling is done by the
middleware in binary form.
Java’s object serialization: This is concerned with the flattening and external data
representation of any single object or tree of objects that may need to be
transmitted in a message or stored on a disk. It is for use only by Java. Marshalling
and unmarshalling is done by the middleware in binary form.
XML: This defines a textual fomat for representing structured data. It was
originally intended for documents containing textual self-describing structured
data. Marshalling and unmarshalling is in texual form.
8-11 “@ ”
20-23 “on ”
Marshalling in CORBA
The type of a data item not given in case of CORBA. CORBA assumes that both the
sender and recipient have common knowledge of the order and types of data items. The types
of data structures and types of basic data items are described in CORBA IDL. This provides a
notation for describing the types of arguments and results of RMI methods
2.38 Communication in Distrubuted Sytem
Example:
Struct student
{
string name;
stringrollnumber;
}
To serialize an object: ‹
(1) its class info is written out: name, version number ‹
(2) types and names of instance variables • If an instance variable belong to a new
class, then new class info must be written out, recursively. Each class is given a
handle ‹
Distrubuted Systems 2.39
Attributes: A start tag may optionally include pairs of associated attribute names
and values such as id="123456789".
Names: The names of tags and attributes in XML generally start with a letter, but
can also start with an underline or a colon. The names continue with letters, digits,
hyphens, underscores, colons or full stops. Letters are case-sensitive. Names that
start with xml are reserved.
CDATA: XML parsers normally parse the contents of elements because they may
contain further nested structures. If text needs to contain an angle bracket or a
quote, it may be represented in a special way.
Namespace: A namespace applies within the context of the enclosing pair of start
and end tags unless overridden by an enclosed namespace declaration.
2.4.3 Remote Object Reference
Remote object references are used when a client invokes an object that is located
on a remote server.
Distrubuted Systems 2.41
Multicast operation is an operation that sends a single message from one process to
each of the members of a group of processes. The simplest way of multicasting, provides no
guarantees about message delivery or ordering.
The following are the characteristics of multicasting:
Fault tolerance based on replicated services:
A replicated service consists of a group of servers.
Client requests are multicast to all the members of the group, each of which
performs an identical operation.
Finding the discovery servers in spontaneous networking
Join to receive
multicast message
Receiver
Multicast IP
Address
Sender Receiver
Receiver
Fig 2.9: Multicasting
2.5.1 IP Multicast
IP multicast is built on top of the Internet protocol.
Multicast IP routers
IP packets can be multicast both on local network and on the Internet.
Local multicast uses local network such as Ethernet.
To limit the distance of propagation of a multicast datagram, the sender can
specify the number of routers it is allowed to pass- called the time to live
(TTL).
Distrubuted Systems 2.43
Multicast addressing by temporary groups must be created before use and will
stop to exit when all members have left the particular multicast group.
They suffer from omission failures. The messages are not guaranteed to be delivered
to the group member in case of omission failures.
The Java API provides a datagram interface to IP multicast through the class
MulticastSocket.
The multicast datagram socket class is useful for sending and receiving IP
multicast packets.
MulticastSender.java
import java.io.*;
import java.net.*;
public class MulticastSender {
2.44 Communication in Distrubuted Sytem
Multicastreceiver.java
import java.io.*;
import java.net.*;
public class MulticastReceiver {
public static void main(String[] args) {
MulticastSocket socket = null;
DatagramPacketinPacket = null;
byte[] inBuf = new byte[256];
try {
//Prepare to join multicast group
socket = new MulticastSocket(8888);
InetAddress address = InetAddress.getByName("224.2.2.3");
socket.joinGroup(address);
while (true) {
inPacket = new DatagramPacket(inBuf, inBuf.length);
socket.receive(inPacket);
String msg = new String(inBuf, 0, inPacket.getLength());
System.out.println("From " + inPacket.getAddress() + " Msg : " + msg);
}
} catch (IOExceptionioe) {
System.out.println(ioe);
}
}
}
setTTL(byte): Set the default time-to-live for multicast packets sent out on this
socket.
Ordering issue:
IP packets do not necessarily arrive in the order in which they were sent. Messages
sent by two different processes will not necessarily arrive in the same order at all the members
of the group. The problem of reliability and ordering is more common in:
Fault tolerance based on replicated services
Discovering services in spontaneous networking
Better performance through replicated data
Propagation of event notifications
An overlay network is a virtual network of nodes and logical links that is built on top
of an existing network with the purpose to implement a network service that is not
available in the existing network.
The overlay network may sometimes change the properties of the underlying network.
The overlay network provides:
Advantages:
They enable new network services to be defined without requiring changes to the
underlying network.
They encourage experimentation with network services and the customization of
services to particular classes of application.
Multiple overlays can be defined and can coexist, with the end result being a more
open and extensible network architecture.
Disadvantages:
They introduce an extra level of indirection.
They add to the complexity of network services.
overlay network offers a service that manages a mapping from keys to values
across a potentially large number of nodes in a completely decentralized
manner (similar to a standard hash table but in a networked environment).
1. It enables them to design and use their own proprietary protocols and
application over the Internet. This enables Skype to encrypt all packet
transmissions.
Distrubuted Systems 2.49
2. Redundant links between Skype peers guarantees robustness. This assures of end-
to-end connection even when network resources are severely limited.
3. The peer-to-peer overlay model provides an elegant solution to the
scalability challenge, given the huge number of interconnected nodes.
4. Skype uses its overlay network to circumvent problems arising from
Network Address Translation traversal and bypass firewalls.
5. Routing and relaying are very flexible; protocols allow peers to autonomously
set up links with the best nodes available.
6. The overlay allows Skype to store a lot of offline data in its peers leading
to reduced storage infrastructure expenses.
7. Employing peer relays improves the quality of VoIP calls.
User connection
They then make contact with a selected super node. To achieve this, each client
maintains a cache of super node identities.
At first login this cache is filled with the addresses of around seven super nodes,
and over time the client builds and maintains a much larger set (perhaps several
hundred).
Super nodes search the global index of users, which is distributed across the super
nodes.
The search is orchestrated by the client‟s chosen super node and involves an
expanding search of other super nodes until the specified user is found.
A user search typically takes between three and four seconds to complete for hosts
that have a global IP address.
Voice connection
Skype establishes a voice connection between the two parties using TCP for
signaling all requests and terminations and either UDP or TCP for the streaming
audio.
History
History is used to refer to a structure that contains a record of reply messages that
have been transmitted by the server.
Connections in HTTP
There are two types of connections in HTTP: Persistent and non persistent
On the same TCP connection the server, The server parses request, responds, and
parses request, responds and waits for new closes TCP connection.
requests.
It takes fewer RTTs to fetch the objects. It takes 2 RTTs to fetch each object.
It has less slow start. Each object transfer suffers from slow start
2.56 Communication in Distrubuted Sytem
HTTP Request Message
Method URL HTTP Headers Message
version body
GET http://www.abc.ac.ind/data.html HTTP/1.1
Remote Procedure Call (RPC) is a protocol that one program can use to request a
service from a program located in another computer in a network without having to
understand network details.
- The parameters used in a function call have to be converted because the client and
server computers use different address spaces.
- Stubs perform this conversion so that the remote server computer perceives the
RPC as a local function call.
Marshals arguments: The client stub packages input arguments into a form
that can be transmitted to the server.
Calls the client run-time library to transmit arguments to the remote address
space and invokes the remote procedure in the server address space.
Unmarshals output argument: The client stub unpacks output arguments and
returns to the caller.
- The server stub procedure unmarshals the arguments in the request message, calls
the corresponding service procedure and marshals the return values for the reply
message.
- The client and server stub procedures and the dispatcher are automatically
generated by an interface compiler from the interface definition of the service.
RMI is closely related to RPC but extended into the world of distributed objects. RMI
is a true distributed computing application interface specially designed for Java, written to
provide easy access to objects existing on remote virtual machines
RMI RPC
RMI uses an object oriented paradigm where RPC is not object oriented and does not deal
the user needs to know the object and the with objects. Rather, it calls specific
method of the object he needs to invoke. subroutines that are already established
With RPC looks like a local call. RPC RMI handles the complexities of passing
handles the complexities involved with along the invocation from the local to the
passing the call from the local to the remote remote computer. But instead of passing a
computer. procedural call, RMI passes a reference to the
object and the method that is being called.
Interfaces Class
Interfaces cannot be instantiated. Classes can be instantiated.
They do not contain constructors. They can have constructors.
They cannot have instance fields (i.e.) all the No constraints over the fields.
fields in an interface must be declared both
static and final.
The interface can contain only abstract They can contain method implementation.
method.
Interfaces are implemented by a class not Classes are extended by other classes.
extended.
Actions :
– Action is initiated by an object invoking a method in another object with or
without arguments.
– The receiver executes the appropriate method and thenreturns control to the
invoking object.
– The following are the effects of actions:
The state of the receiver may be changed.
A new object may be instantiated.
Further invocations on methods in other objects may take place.
Exceptions:
– Exceptions are run time errors.
– The programmers must write code that could handle all possible unusual or
erroneous cases.
2.64 Communication in Distrubuted Sytem
Garbage collection:
b) Distributed objects
Distributed object systems may adopt the client-server architecture where the
objects are managed by servers and their clients invoke their methods using
remote method invocation.
The invocation is carried out by executing a method of the object at the server
and the result is returned to the client in another message.
In this model, each process contains a collection of objects, some of which can
receive both local and remote invocations, whereas the other objects can receive
only local invocations. The core concepts of distributed object model:
The remote object to receive a remote method invocation is specified by the invoker as
a remote object reference. The remote object references may be passed as arguments and
results of remote method invocations.
Remote interfaces: The class of a remote object implements the methods of its
remote interface. Objects in other processes can invoke only the methods that
belong to its remote interface.
Distrubuted Systems 2.65
Exceptions:
Any remote invocation may fail because of exceptions. So RMI should include
exception handling as a part of their implementation.
2.66 Communication in Distrubuted Sytem
Implementation of RMI
Implementation of a RMI requires construction if many modules and the supporting
interfaces.
a) Modules:
The two common modules used are communication module and remote reference
module.
Communication module:
This module implements request-reply protocol.
This module specifies the message type, its requestId and the remote reference of
the object to be invoked.
This specifies only the communication semantics.
The communication module in the server selects the dispatcher for the class of the
object to be invoked, passing on its local reference, which it gets from the remote
reference module in return for the remote object identifier in the request message.
Remote reference module:
This module is responsible for translation between local and remote object
references and for creating remote object references.
This module has a remote object table specific for each process that records the
mapping between local object references and remote object references.
The entries of the table includes:
the remote objects held by the process.
local proxy
The actions of them remote reference module are as follows:
When a remote object is to be passed as an argument for the first time, the
remote reference module creates a remote object reference and is added to the
table.
When a remote object reference arrives in a request or reply message the
remote object table is referred for the corresponding local object reference.
If the remote object reference is not in the table, the RMI software creates a
new proxy and asks the remote reference module to add it to the table.
This module is called by components of the RMI software during marshalling
and unmarshalling remote object references.
Distrubuted Systems 2.67
b) Supporting Components
Servants
A servant is an instance of a class that provides the body of a remote object.
The responsibility of the servant is to handle the remote requests passed on by the
corresponding skeleton.
Servants live within a server process.
They are created when remote objects are instantiated and remain in use until they
are no longer needed and finally servants are garbage collected or deleted.
Dynamic invocation is used in this case which gives the client access to a generic
representation of a remote invocation, which is a part of the infrastructure for RMI.
The client will supply the remote object reference, the name of the method and the
arguments to doOperation and then wait to receive the results.
Dynamic skeletons:
Server programs
the classes for the dispatchers and skeletons, with the implementations of the
classes of all of the servants that it supports.
Client programs
the classes of the proxies for all of the remote objects that it will invoke.
Factory methods
Factory methods are static methods that return an instance of the native class.
Factory method is used to create different object from factory often refereed as
Item and it encapsulate the creation code.
The term factory method is sometimes used to refer to a method that creates
servants, and a factory object is an object with factory methods.
Any remote object that needs to be able to create new remote objects on demand
for clients must provide methods in its remote interface for this purpose. Such
methods are called factory methods, although they are really just normal methods.
Distrubuted Systems 2.69
Binder
A binder in a distributed system is a separate service that maintains a table
containing mappings from textual names to remote object references.
It is used by servers to register their remote objects by name and by clients to look
them up.
Server threads
Whenever an object executes a remote invocation, that execution may lead to
further invocations of methods in other remote objects, which may take sometime
to return.
To avoid this, servers generally allocate a separate thread for the execution of each
remote invocation.
Activation of remote objects
Activation of servers to support remote objects is done by a service called Inetd.
Certain applications demand the objects to persist for longer times.
When the objects are maintained for longer period it is actually waste of resources.
To avoid this the servers could be started on demand as and when needed through
Inetd.
Processes that start server processes to host remote objects are called activators.
Based on this remote objects can be described as active or passive.
An object is said to be active when it is available for invocation.
An object is called passive if is currently inactive but can be made active.
A passive object consists of two parts:
implementation of its methods
its state in the marshalled form.
When activating a passive object, an active object is created from the
corresponding passive object by creating a new instance of its class and initializing
its instance variables from the stored state.
Passive objects can be activated on demand.
Responsibilities of an activator:
Registering passive objects that are available for activation. This is done by
mapping the names of servers and passive objects.
2.70 Communication in Distrubuted Sytem
Persistent objects are managed by persistent object stores, which store their state in
a marshalled form on disk.
The objects are activated when their methods are invoked by other objects.
When activating the object, the invoker will not know whether an object is in main
memory or in a disk.
The persistent objects that are not needed are maintained in the object store (active
or passive state).
The decision of making an active object to passive is done through the following
ways:
in response to a request in the program that activated the objects
at the end of a transaction
when the program exits.
There are two approaches to determine whether an object is persistent or not:
The persistent object store maintains some persistent roots, and any object that
is reachable from a persistent root is defined to be persistent.
The persistent object store provides some classes. If the object belong to their
subclasses, then it is persistent.
Object location
Remote object reference can be done based on the Internet address and port
number of the process that created the remote object.
Some remote objects will exist in different processes, on different computers,
throughout their lifetime.
In this case, a remote object reference cannot act as an address for the objects.
Distrubuted Systems 2.71
When a live reference enters a Java virtual machine, its reference count is
incremented.
The first reference to an object sends a referenced message to the server for the
object.
As live references are found to be unreferenced in the local virtual machine, the
count is decremented.
When the last reference has been discarded, an unreferenced message is sent to the
server.
The Java distributed garbage collection algorithm can tolerate the failure of client
processes.
To achieve this, servers lease their objects to clients for a limited period of
time.
2.72 Communication in Distrubuted Sytem
The lease period starts when the client makes first referenceinvocation to the
server.
It ends either when the time has expired or when the client makes a last reference
invocation to the server.
The information stored by the server (i.e.) the leasecontains the identifier of the
client‟s virtual machine and the period of the lease.
Clients are responsible for requesting the server to renew their leases before they
expire.
Leases in Jini
Jini provides a mechanism for locating services on the network that conform to a
particular (Java) interface, or that have certain attributes associated with them.
Once a service is located, the client can download an implementation of that
interface, which it then uses to communicate with the service.
The Jini distributed system includes a specification for leases that can be used in a
variety of situations when one object offers a resource to another object.
The granting of the use of a resource for a period of time is called a lease.
The object offering the resource will maintain it until the time in the lease expires.
The resource users are responsible for requesting their renewal when they expire.
The period of a lease may be negotiated between the grantor and the recipient in
Jini.
In Jini, an object representing a lease implements the Lease interface.
It contains information about the period of the lease and methods enabling the
lease to be renewed or cancelled.
The arguments and return values in a remote invocation are used with
the following modifications:
1. Whenever an object that implements the Remote interface is
serialized, it is replaced by its remote object reference, which
contains the name of its (the remote object‟s) class.
2. When any object is serialized, its class information is annotated
with the location of the class (as a URL), enabling the class to be
downloaded by the receiver.
Downloading of classes
In Java classes can be downloaded from one virtual machine to another.
If the recipient does not already possess the class of an object passed by value, its
code is downloaded automatically.
If the recipient of a remote object reference does not already possess the class for a
proxy, its code is downloaded automatically.
The advantages are:
1. There is no need for every user to keep the same set of classes in their working
environment.
2. Both client and server programs can make transparent use of instances of new
classes whenever they are added.
RMIregistry
The RMIregistry is the binder for Java RMI.
It maintains a table mapping URL-style names to references to remote objects.
The Naming class is used to access the RMIregistry.
The methods of the naming class is of the general form:
//computerName:port/objectName
where computerName and port refer to the location of the RMIregistry.
The LocateRegistryclass , which is in java.rmi.registry, is used to discover the
names.
The getRegistry()returns an object of typeRegistry representing the remote binding
service:
public static Registry getRegistry() throws RemoteException
Distrubuted Systems 2.75
The following table gives a description of the methods in the Naming class:
Method Description
void rebind (String This method is used by a server to register the identifier
name, Remote obj) of a remote object by name.
void bind (String name, This method is also used to register a remote object by
Remote obj) name, but if the name is already bound to a remote
object reference an exception is thrown.
Server Program
import java.util.Vector;
public class ShapeListServant implements ShapeList
{
private Vector theList; // contains the list of Shapes
private int version;
public ShapeListServant(){...}
public Shape newShape(GraphicalObject g)
{
version++;
Shape s = new ShapeServant( g, version);
theList.addElement(s);
return s;
}
public Vector allShapes(){...}
public intgetVersion() { ... }
}
2.76 Communication in Distrubuted Sytem
Client Program
import java.rmi.*;
import java.rmi.server.*;
import java.util.Vector;
public class ShapeListClient
{
public static void main(String args[])
{
System.setSecurityManager(new RMISecurityManager());
ShapeListaShapeList = null;
try
{
aShapeList = (ShapeList) Naming.lookup("//project.ShapeList");
Vector sList = aShapeList.allShapes();
}
catch(RemoteException e)
{
System.out.println(e.getMessage());
}
catch(Exception e)
{
System.out.println("Client: " + e.getMessage());
}
}
}
Callbacks
Callback refers to a server‟s action of notifying clients about an event. Callbacks can
be implemented in RMI as follows:
The client creates a remote object that implements an interface that contains a
method for the server to call.
The server provides an operation allowing interested clients to inform it of the
remote object references of their callback objects.
Whenever an event of interest occurs, the server calls the interested clients.
Distrubuted Systems 2.77
The dispatcher unmarshals the Method object and its arguments in the array of
Objects from the request message.
The dispatcher then calls the Method object‟s invoke method, supplying the target
and the array of argument values. When the method has been executed, the
dispatcher marshals the result or any exceptions into the reply message.
Programming Model
A group has group members (processes) who can join or leave the group. This is done
through multicast communication. There are three communication modes:
Unicast: Process to process communication
Broadcast: Communication to all the process
Multicast: Communication only to a group of processes
Process Groups and Objects Groups
An object group is a collection of objects that process the same set of invocations
concurrently.
Client objects invoke operations on a single, local object, which acts as a proxy for
the group.
The proxy uses a group communication system to send the invocations to the
members of the object group.
Object parameters and results are marshalled as in RMI and the associated calls are
dispatched automatically to the right destination objects/methods.
Types of group communication
Closed and open groups: A group is said to be closed if only members of the
group may multicast to it A process in a closed group delivers to itself any
message that it multicasts to the group.
Distrubuted Systems 2.79
Failure detection: The service monitors the group members in case of crash and
unreachability. The detector marks processes as Suspected or Unsuspected. The
process is excluded from membership if it is not reachable or crashed.
Channel-based:
The publishers publish events to named channels and subscribers then
subscribe to one of these named channels to receive all events sent
to that channel.
Topic-based (subject-based):
Each notification from the publisher is expressed in terms of a number
of fields, with one field denoting the topic.
Subscriptions are then defined in terms of the topic of interest.
Content-based:
Content-based approaches are a generalization of topic-based
approaches allowing the expression of subscriptions over a range of
fields in an event notification.
Type-based:
This is intrinsically linked with object-based approaches where objects
have a specified type.
In type-based approaches, subscriptions are defined in terms of types of
events and matching is defined in terms of types or subtypes of the
given filter.
Implementation Issues
The publish subscribe model also demands of security, scalability, failure handling,
concurrency and quality of service. This makes this model complex.
The top layer implements matching ensure that events match a given subscription.
Flooding:
Filtering:
Implementation Issues
The important implementation decision for message queuing systems is the choice
between centralized and distributed implementations.
WebSphere MQ
This is a IBM developed middleware based on the concept of message queues.
Queues in WebSphere MQ are managed by queue managers which host and
manage queues and allow applications to access queues through the Message
Queue Interface(MQI).
There are two types of connection can be established: Topic Connection or Queue
Connection.
TopicConnection: support one or more topic sessions
QueueConnection: support one or more queue sessions
Connections can be used to create one or more sessions.
A session is a series of operations involving the creation, production and
consumption of messages related to a logical task.
Header
The header contains all the information needed to identify and route the
message: destination, priority, expiration date, a message ID and a
timestamp.
2.92 Communication in Distrubuted Sytem
This is an abstraction used for sharing data between computers that do not share
physical memory.
Processes access DSM by reads and updates to what appears to be ordinary
memory within their address space.
The programmer need not worry about the message passing.
DSM runtime support has to send updates in messages between computers.
DSM systems must also manage replicated data.
Each computer has a local copy of recently accessed data items stored in DSM, for
speed of access.
Processes can communicate with other Here, a process does not have private
processes. They can be protected from one address space. So one process can alter the
another by having private address spaces. execution of other.
This technique can be used in This cannot be used to heterogeneous
heterogeneous computers. computers.
Synchronization between processes is Synchronization is through locks and
through message passing primitives. semaphores.
Processes communicating via message Processes communicating through DSM
passing must execute at the same time. may execute with non-overlapping
lifetimes.
Efficiency:
All remote data accesses are explicit and Any particular read or update may or may
therefore the programmer is always aware not involve communication by the
of whether a particular operation is in- underlying runtime support.
process or involves the expense of
communication.
2.94 Communication in Distrubuted Sytem
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.
Phase 1: Selecting the tuple to be removed
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 .
6. If only a minority accept the request, this minority are asked to release their locks
and phase 1 repeats.
Phase 2: Removing the selected tuple
1. The requesting site multicasts a remove request to all members of the view citing
the tuple to be removed;
2.96 Communication in Distrubuted Sytem
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
Additional Complexities
Inter-object communication:
This is normally provided by remote method invocation.
Lifecycle management:
Lifecycle management is concerned with the creation, migration and deletion
of objects, with each step having to deal with the distributed nature of the
underlying environment.
Activation and deactivation:
In distributed systems, the numbers of objects may be very large, and hence it
would be waste of resources to have all objects available (active) at any time.
Activation is the process of making an object active in the distributed
environment by providing the necessary resources for it to process incoming
invocations.
Deactivation is rendering an object temporarily unable to process invocations.
Persistence:
Objects have state, and it maintains this state across possible cycles of
activation and deactivation and indeed system failures.
Distributed object middleware must therefore offer persistency management
for stateful objects.
Additional services:
This must provide support for the range of distributed system services
considered in this book, including naming, security and transaction services.
Implicit dependencies:
A distributed object communicates with outside world through interfaces.
The interfaces provide a complete contract for the deploying and use of this
object.
2.98 Communication in Distrubuted Sytem
Advantages of CBT
Independent extensions
Component Market
Component models lessen unanticipated interactions between components
Reduced time to market
Reduced Costs
Disadvantages of CBT:
Time to develop software components takes a big effort.
Components can be pricey.
o a front-end client
o a container holding one or more components that implement the application
or business logic
o system services that manage the associated data in persistent storage.
2.100 Communication in Distrubuted Sytem
The container in EJB issues calls to the associated services to provide the
required properties.
Beans act as:
Container Managed: The transaction manager or security services is
completely hidden from the developer of the associated beans.
Distrubuted Systems 2.101
Bean Managed: The bean developer takes control over these operations
not the transaction manager.
The EJB specification has the following roles:
o bean provider: develops the application logic of the component(s)
o application assembler: assembles beans into application configurations
o deployer: takes a given application assembly and ensures it can be
correctly deployed in a given operational environment;
o service provider: does transaction management
o persistence provider: maps persistent data to databases
o container provider: build on the above two roles and is responsible for
configuring containers with the required level of distributed systems
support in terms of non-functional properties
o system administrator: responsible for monitoring a deployment at
runtime and making any adjustments to ensure its correct operation.
The EJB component model
A bean in EJB is a component offering one or more business interfaces to
potential clients of that component.
A bean is represented by the set of remote and local business interfaces
together with an associated bean class that implements the interfaces.
Two main styles of bean are supported in the EJB specification:
Session beans: A session bean is a component implementing a
particular task within the application logic of a service.
Message-driven beans: Clients interact with session beans using local
or remote invocation.
POJOs and annotations
The task of programming in EJB has been simplified significantly through the use of
Enterprise JavaBean POJOs(plain old Java objects). It consists of the application
logic written simply in Java with no other code relating to it being a bean. Annotations
are then used to ensure the correct behaviour in the EJB context. Enterprise JavaBean
containers in EJB
Beans are deployed to containers, and the containers provide implicit distributed
system management.
The container provides the policies in areas including transaction management,
security, persistence and lifecycle management.
2.102 Communication in Distrubuted Sytem
Attribute Policy
REQUIRED If the client has an associated transaction running, execute
within this transaction; otherwise, start a new transaction.
REQUIRES_NEW Always start a new transaction for this invocation.
SUPPORTS If the client has an associated transaction, execute the method within
the context of this transaction; if not, the call proceeds without any
transaction support.
NOT_SUPPORTED If the client calls the method from within a transaction, then
this transaction is suspended before calling the method and
resumed afterwards – that is, the invoked method is excluded
from the transaction.
MANDATORY The associated method must be called from within a client
transaction; if not, an exception is thrown.
NEVER The associated methods must not be called from within a
client transaction; if this is attempted, an exception is
thrown
Dependency injection:
In dependency injection a third party (container), is responsible for managing and
resolving the relationships between a component and its dependencies.
A component refers to a dependency using an annotation and the container is
responsible for resolving this annotation and ensuring that, at runtime, the
associated attribute refers to the right object.
This is typically implemented by the container usingreflection.
Distrubuted Systems 2.103
Invocation Contexts
Method Description
public Object getTarget() Returns the bean instance associated with the incoming
invocation or event
public Object[] getParameters() Returns the set of parameters associated with the
intercepted business method
public Object proceed() throws Execution proceeds to next interceptor in the chain
Exception (if any) or the method that has been intercepted
2.104 Communication in Distrubuted Sytem
REVIEW QUESTIONS
PART-A
1. What is IPC?
Interprocess communication (IPC) is a set of programming interfaces that allows a
programmer to coordinate activities among different program processes that can run
concurrently in an operating system.
Physical models: It is the most explicit way in which to describe a system in terms
of hardware composition.
Interaction models: This deals with the structure and sequencing of the
communication between the elements of the system
Failure models: This deals with the ways in which a system may fail to operate
correctly
Security models: This deals with the security measures implemented in the
system against attempts to interfere with its correct operation or to steal its
data.
3. Define ULS.
The ultra large scale (ULS) distributed systems is defined as a complex system
consisting of a series of subsystems that are systems in their own right and that come
together to perform a particular task or tasks.
RMI RPC
RMI uses an object oriented paradigm RPC is not object oriented and does not
where the user needs to know the object deal with objects. Rather, it calls specific
and the method of the object he needs subroutines that are already established
to invoke.
With RPC looks like a local call. RPC RMI handles the complexities of passing
handles the complexities involved with along the invocation from the local to the
passing the call from the local to the remote computer. But instead of passing a
remote computer. procedural call, RMI passes a reference to
the object and the method that is being
called.
Interfaces to remote objects are defined using ordinary Java interfaces not with special
IDLs.
Distrubuted Systems 2.119
Interfaces Class
Interfaces cannot be instantiated. Classes can be instantiated.
They do not contain constructors. They can have constructors.
They cannot have instance fields (i.e.) all No constraints over the fields.
the fields in an interface must be declared
both static and final.
The interface can contain only abstract They can contain method
method. implementation.
Interfaces are implemented by a class not Classes are extended by other
extended. classes.
Independent extensions
Distrubuted Systems 2.123
Component Market
Component models lessen unanticipated interactions between components
Reduced time to market
Reduced Costs
Disadvantages of CBT:
Time to develop software components takes a big effort.
PART-B
1. Describe the physical system model.
2. Explain architectural models.
3. Write notes about architectural patterns.
4. Explain the middleware.
5. Describe the fundamental models.
6. Explain about interprocess communication.
7. Describe external data representation and marshaling.
8. Elucidate multicast communication.
9. Explain overlay networks.
10. Write notes on message passing interface.