CCT Unit - 1
CCT Unit - 1
1. Architectural Models
2. Interaction Models
3. Fault Models
1. Architectural Models
Architectural model describes responsibilities distributed between system
components and how are these components placed.
a)Client-server model
☞ 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.
2. Interaction Model
Interaction model are for handling time i. e. for process execution,
message delivery, clock drifts etc.
• Synchronous distributed systems
Main features:
• Lower and upper bounds on execution time of processes can be set.
• Transmitted messages are received within a known bounded time.
• Drift rates between local clocks have a known bound.
Important consequences:
1. In a synchronous distributed system there is a notion of global
physical time (with a known relative precision depending on the
drift rate).
2. Only synchronous distributed systems have a predictable behavior in
terms of timing. Only such systems can be used for hard real-time
applications.
3. In a synchronous distributed system it is possible and safe to use
timeouts in order to detect failures of a process or communication
link.
☞ It is difficult and costly to implement synchronous distributed systems.
• Asynchronous distributed systems
☞ Many distributed systems (including those on the Internet) are
asynchronous. - No bound on process execution time (nothing can be
3. Fault Models
☞ Failures can occur both in processes and communication channels. The
reason can be both software and hardware faults.
☞ Fault models are needed in order to build systems with predictable
behavior in case of faults (systems which are fault tolerant).
☞ such a system will function according to the predictions, only as long
as the real faults behave as defined by the “fault model”.
REMOTE INVOCATION
REQUEST-REPLY PROTOCOLS
Dr.A.Vanitha Katharine, ASP/MCA, PSNACET 8 | Page
The protocol we describe here is based on a trio of communication
primitives, doOperation, getRequest and sendReply, as shown in Figure
Advantages of Remote
stub
The stub is an object, acts as a gateway for the client side. All the
outgoing requests are routed through it. It resides at the client side and
represents the remote object. When the caller invokes method on the
stub object, it does the following tasks:
1. It initiates a connection with remote Virtual Machine (JVM),
2. It writes and transmits (marshals) the parameters to the remote
Virtual Machine (JVM),
3. It waits for the result
4. It reads (unmarshals) the return value or exception, and
5. It finally, returns the value to the caller.
skeleton
1. The skeleton is an object, acts as a gateway for the server side
object. All the incoming requests are routed through it. When the
}
//B.JAVA
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
int t=a+b;
return t;
}
}
//C.JAVA
import java.rmi.*;
import java.rmi.server.*;
public class C
{
try
{
B b=new B();
Naming.rebind("AdditionApplication",b);
}
catch(Exception e)
{
}
}
}
//D.JAVA
import java.rmi.*;
public class D
{
try
{
String s="rmi://localhost/AdditionApplication";
A a1=(A) Naming.lookup(s);
int result=a1.add(12,4);
catch(Exception e){}
}
1. Broadcast Communication :
When the host process tries to communicate with every process
in a distributed system at same time. Broadcast communication
comes in handy when a common stream of information is to be
delivered to each and every process in most efficient manner
possible. Since it does not require any processing whatsoever,
communication is very fast in comparison to other modes of
2. Multicast Communication :
When the host process tries to communicate with a designated
group of processes in a distributed system at the same time. This
technique is mainly used to find a way to address problem of a high
workload on host system and redundant information from process in
system. Multitasking can significantly decrease time taken for message
handling.
TOTAL ORDERING
– Requires messages are delivered same order by each process
– But this order may have no relation to causality or message
sending order
– Can be modified to be FIFO, total or Causal total orders
What is causality ?
Causality is fully based on HAPPEN BEFORE RELATIONSHIP.
• Taking single PC only if 2 events A and B are occurring one by
one then TS(A) < TS(B). If A has timestamp of 1, then B should
have timestamp more than 1, then only happen before
relationship occurs.
• Taking 2 PCs and event A in P1 (PC.1) and event B in P2 (PC.2)
then also the condition will be TS(A) < TS(B). Taking example-
Concurrent Event –
This means that not every process occurs one by one, some processes
are made to happen simultaneously i.e., A || B.