You are on page 1of 59

20CS5903 - PRINCIPLES OF DISTRIBUTED SYSTEMS

UNIT 1 - INTRODUCTION

System Models: Introduction, Architectural Models, Fundamental Models.


Various Paradigms in Distributed Applications, Remote Procedure Call,
Remote Object Invocation, Message-Oriented Communication, Unicasting,
Multicasting and Broadcasting, Group Communication.

COURSE OUTCOME: Understand the design principles in distributed


systems and the architectures for distributed systems.
Distributed system
• In Distributed Systems jobs are distributed among several processors. The processors are
interconnected by a computer network.

• A distributed system is a collection of independent computers that appears to its users as


a single coherent system. A distributed system is one in which components located at
networked communicate and coordinate their actions only by passing message.

• A distributed system is a network of interconnected computers or nodes that work


together to achieve a common goal. In a distributed system, the nodes can be located in
different physical locations and can communicate and coordinate with each other
through various mechanisms such as message passing, remote procedure calls, or shared
memory.
Middleware
• Software that acts as a bridge between an operating system or
database and applications, especially on a network.

• Middleware is to act as a real-time translator between different


applications
Distributed systems are 
systems that consist of multiple components that communicate and co
ordinate over a network to achieve a common goal
.
Examples of distributed systems include:
•The internet (World Wide Web)
•Telecommunication networks (including cellular networks and the fabric
of the internet)
•Graphical and video-rendering systems
•Electronic banking systems
•Sensor networks
Applications Area of Distributed System:
•Finance and Commerce: Amazon, eBay, Online Banking, E-Commerce websites.
•Information Society: Search Engines, Wikipedia, Social Networking, Cloud
Computing.
•Cloud Technologies: AWS, Salesforce, Microsoft Azure, SAP.
•Entertainment: Online Gaming, Music, YouTube.
•Healthcare: Online patient records, Health Informatics.
•Education: E-learning.
•Transport and logistics: GPS, Google Maps.
•Environment Management: Sensor technologies.
DS deals with two aspects
• Deals with hardware- The Machines linked in a distributed systems
are autonomous

• Deals with software- It gives an impression to the users that they are
dealing with a single system.
Features of DS
• Communication is hidden from the user
• Resource sharing is possible in ds
• DS act as fault tolerant systems
Need of DS
•Share resource is main motivation of distributed systems.

•They reduce the risks involved with having a single point


of failure, reliability and fault tolerance.

•They increase a software's efficiency by delegating and


coordinating processes between multiple devices.
Characteristics of distributed system
• Programs are executed concurrently, support for resource sharing.
• Openness
• Concurrency
• Scalability
• Fault Tolerance (Reliability)
• Transparency
• Components can fail independently (isolation, crash)
Advantages of Distributed Systems
1. Performance
2.Distribution
3.Reliability (fault tolerance)
4.Incremental growth
5.Sharing of data/resources
6.Communication
Disadvantages of Distributed Systems
1.Difficulties of developing distributed software

2.Networking problems

3.Security problems
Significances of DS
• Concurrency
Example: Sharing resources such as web pages or files when necessary
• No global clock
Programs need to cooperate and coordinate their actions by exchanging messages.
Limit to the accuracy
Only communication is sending by messages.
• Independent Failures
Each component of the system can fail independently and leaving the others still
running
Examples of DS
• The Internet
• An Intranet
• Mobile & Ubiquitous computing
Main Motivation
• Sharing of resources
Example: WEB

• Resources may be managed by servers and accessed by clients.


The Internet
• The internet is a very large distributed systems
• Programs running on the computers communicate by passing
messages
• ISP provide modem links and other types of connections to individual
users and small organizations.
Intranet
• It is the portion of the internet that is separately administered and
has a boundary that can be configured to enforce local security
polices.
• It consists of several LAN eg: police, military organization
• It is connected to the internet via router.
• 3 main issues
• File service- sharing data to multiple users.
• Firewall- protect unauthorized access
• cost
Mobile & Ubiquitous computing
• The portability of the devices such as laptop, PDA mobile phone,
refrigerator together with their ability to connect conveniently to
networks in different places makes mobile computing possible.

• Hand held devices, PDAs, digital cameras, pagers, mobile phones.


• Ubiquitous computing is the harnessing of many small cheap
computational devices.

• Provides privacy and other security guarantees to users and the


environment that they visit.
Challenges
• Heterogeneity –run on different network, hardware, os and programming
language.
• Openness- extensible
• Security- resource has three components
i) confidentiality
ii) Integrity
iii) Availability
2 challenges
i) DoS – traffic eg: exam results or more request code
ii) Security of mobile- email attachment
• Scalability- large number of users to be handled
• Failure handling
Fault occur in software, hardware programs
Techniques are:
a) Detection failures
b) Masking failures
c) Tolerating failures
d) Recovery from failures
e) Redundancy
• Concurrency
Several clients will attempt to access a shared resources at the same time.
Eg: university results
• Transparency
Collection of independent components
a) Access transparency
b) Location transparency
c) Concurrency transparency
d) Replication transparency
e) Failure transparency
f) Mobility transparency
g) Performance transparency
h) Scaling transparency
Architectural Model
• Software layers
• System Architecture
• Variations on the client server model
• Interfaces and objects
Software layer
• It is refered as the structuring of software as layers on modules in a
single computer.
Applications, Services
Middleware
OS
Computer and network hardware
System Architecture
• Client Server model - eg: facebook, Instagram, youtube
• Peer to Peer model- end-to-end eg: bluetooth
Fundamental Models

• Fundamental Models are concerned with a formal description of


the properties that are common in all of the architectural models.
• Models addressing time synchronization, message delays, failures,
security issues are addressed as:

• Interaction Model – deals with performance and the difficulty of


setting of time limits in a distributed system.

• Failure Model – specification of the faults that can be exhibited by


processes

• Secure Model – discusses possible threats to processes and


communication channels.
Interaction model
• In this model the computations occurs within processes.

• The processes interact by passing messages to achieve


communication and coordination between processes
Contd….
• The two significant factors affecting interacting processes in a
distributed system are:

• 1) Communication performance
• 2) Global notion of time.
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
Timing failure:

It is a failure of a process, or part of a process,

in a synchronous distributed system or real-

time system to meet limits set on execution

time, message delivery, clock drift rate, or clock

skew.
Security model
• 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.
Remote Procedure Call
• 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.
•  A procedure call is also sometimes known as a function call or a subroutine call.
•  The requesting program is a client and the serviceproviding program is the
server.
•  When program statements that use RPC are compiled into an executable
program, a stub is included in the compiled code that acts as the representative of
the remote procedure code.
•  the server includes a runtime program and stub that interface with the remote
procedure itself.
RPC
STUBS
• When the calling process calls a procedure, the action performed by that
procedure will not be the actual code as written, but code that begins
network communication.
•  It has to connect to the remote machine, send all the parameters down to
it, wait for replies, do the right thing to the stack and return. This is the
client side stub.
•  The server side stub has to wait for messages asking for a procedure to
run.
•  It has to read the parameters, and present them in a suitable form to
execute the procedure locally. After execution, it has to send the results back
to the calling process.
HOW RPC WORKS?
• An RPC is analogous to a function call. Like a function call, when an
RPC is made, the calling arguments are passed to the remote
procedure and the caller waits for a response to be returned from the
remote procedure.
•  The client makes a procedure call that sends a request to the server
and waits.
•  When the request arrives, the server calls a dispatch routine that
performs the requested service, and sends the reply to the client.
•  After the RPC call is completed, the client program continues. RPC
specifically supports network applications.
Contd…
RPC APPLICATION
DEVELOPMENT
• To develop an RPC application the following steps are needed: •
1) Specify the protocol for client server communication
2) Develop the client program
3) Develop the server program
 The programs will be compiled separately.
 The communication protocol is achieved by generated stubs and
these stubs and rpc (and other libraries) will need to be linked in.
Contd…
STUB
• The client calls the local stub procedure. The stub packages up the parameters into a network
message. This is called marshaling.
• Networking functions in the O/S kernel are called by the stub to send the message.
• The kernel sends the message(s) to the remote system. This may be connection-oriented or
connectionless.
• A server stub unmarshals the arguments from the network message.
• The server stub executes a local procedure call.
• The procedure completes, returning execution to the server stub.
• The server stub marshals the return values into a network message.
• The return messages are sent back.
• The client stub reads the messages using the network functions.
• The message is unmarshalled. And the return values are set on the stack for the local process.
Remote Object Invocation
• Middleware layers
Distributed Objects
Issues in implementing RMI
• Parameter Passing
• ❒ Request-Reply Protocol
• ❍ Handling failures at client and/or server
• ❒ Supporting persistent objects, object adapters, dynamic
invocations, etc.
Handling failures
Types of failure
❍ Client unable to locate server
❍ Request message lost
❍ Reply message lost
❍ Server crashes after receiving a request
❍ Client crashes after sending a request
GROUP COMMUNICATION
• Group communication is a service where a message is sent to a group
and then this message is delivered to all members of the group.
• There are t
• Unicast: Process to process communication
• Broadcast: Communication to all the process
• Multicast: Communication only to a group of processes hree
communication modes:
Unicast
• Unicast is the term used to describe communication where a piece of
information is sent from one point to another point. In this case there
is just one sender, and one receiver.
Broadcast
• Multicast is the term used to describe communication where a piece
of information is sent from one or more points to a set of other
points. In this case there is may be one or more senders, and the
information is distributed to a set of receivers (theer may be no
receivers, or any other number of receivers).
MULTICAST COMMUNICATION

Multicast (one-to-many or many-to-many distribution) is group


communication where information is addressed to a group of
destination computers simultaneously.
The following are the characteristics of
multicasting:
• Fault tolerance based on replicated services
• Finding the discovery servers in spontaneous networking
• Better performance through replicated data
• Propagation of event notifications
Multicasting

You might also like