You are on page 1of 101

Distributed System

Course Code: CACS352


Year/Sem: III/VI

Instructor : Er. Santosh Rauniyar


NEC Registration no. : 7513

11/27/2022 Distributed_System_01 1
11/27/2022 Distributed_System_01 2
11/27/2022 Distributed_System_01 3
11/27/2022 Distributed_System_01 4
Exam Scheme
• Internal Assessment (40%)
• Theory: 40 Marks

• External Assessment(60%)
• Theory: 60 Marks(3 Hours)

11/27/2022 Distributed_System_01 5
Marks Distribution
Total Marks : 100

Internal Assessment : 40 (Mid Term-10, Pre-Final-10,


Assignment-10, Attendance-10)
Final Board Examination : 60

11/27/2022 Distributed_System_01 6 6
Final Examination Questions Format

[FM = 60, PM = 24, Time = 3 Hrs.]

SN Question Type Number of Marks Total Marks Time


Questions per
Given Question
1 Group – 'A' 10 1 10 x 1 = 10 10 min
Objective Type
Questions(Mult
iple Choice
Questions)
2 Group – 'B' 7 5 6 x 5 = 30 2 hrs 50 min
Short Questions
(Attempt any
SIX questions)
3 Group – 'C' 3 10 2 x 10 = 20
Long Questions
(Attempt any
TWO
questions)

11/27/2022 Distributed_System_01 7 7
Individual Evaluation
1. Attendance – Minimum: 80% (<NQ)
2. Class Performance
i. Assignment,
ii. Unit Test(Unit Wise),
iii. Presentation
iv. Viva

11/27/2022 Distributed_System_01 8
STRUCTURE

•1-2 hours of lectures –approx., per week.


•2 hour of tutorial/lab (approx.),
•Lab work will mostly be individual and in small groups.
•Additional independent study.
•The timings are a guide only.

11/27/2022 Distributed_System_01 9
RESOURCES

•Lectures.
•Books (in lab).
•Books in LRC.
•Internet, you have internet access.
•Periodicals etc.

11/27/2022 Distributed_System_01 10
Reference Books

Distributed systems: principles Distributed Operating Systems


and paradigms I Andrew Concepts and Design
S.Tanenbaum, Maarten Van Steen
By Pradeep K. Sinha, PHI
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 11
 Topics
Looping
to be covered
• Definition of a Distributed System
• Characteristics of Distributed System
• Goals of a Distributed System
• Types of Distributed Systems
• Basics of Operating System and Networking
• Case Study: The World Wide Web

11/27/2022 Distributed_System_01 12
What is Operating System?
An operating system (OS) is system software that manages computer hardware and software
resources and provides common services for computer programs.
Example:

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 13
What is Operating System?
It is a program that acts as an interface between the user and the computer hardware and
controls the execution of all kinds of programs.

User
User 1 User 2 User 3

Software
System Software Application Software

Operating System
Windows Linux Mac

Hardware
CPU RAM I/O

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 14
OS Example

Regular OS

An operating system (OS) is system software that manages computer hardware and software
resources and provides common services for computer programs.
Simple (No rules to follow).
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 15
Evolution of Modern OS
First Generation OS
 System:
 Centralized OS
 Characteristics:
 Process Management
 Memory Management
 I/O Management
 File Management
 Goals:
 Resource Management

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 16
Centralized OS

Memory
T1 P1 F1

P2
F2
P3

T2 P4 D2 D3
D1

Management of processes, P1, P2, P3,


T3 P4 Management of memory, Memory
Management of disks, D1, D2, D3
Management of files, F1, F2
Centralized Management of terminals, T1, T2, T3
OS #3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 17
Evolution of Modern OS
Second Generation OS
 System:
 Network OS(NOS)
 Characteristics:
 Remote access
 Information exchange
 Network browsing
 Goals:
 Interoperability-Sharing of resources between the systems.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 18
Network Operating System

File Server

Client-1 Client-2

Request

Reply

Network

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 19
NOS Example

When you want to interact with others.


Introduces Network.
Hard compared to regular OS (have to follow rules E.g., traffic rules).
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 20
NOS Example

Printer connected to a computer Print


Printer
Server
Print

× Print

Client-1 Client-2 Client-3 Client-4

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 21
Evolution of Modern OS
Third Generation OS
 System:
 Distributed OS(DOS)
 Characteristics:
 Global View of Computational power, file system, name space, etc.
 Goals:
 Single computer view of multiple heterogeneous computer systems.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 22
Distributed Operating System
“A Distributed system is collection of independent computers which are connected through
network.”

Systems processors
are differ in size and
functions

Communication
Network

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 23
Distributed Operating System

I have my own
Memory,
Processor and LAN
other Hardware MAN
WAN
Physically
separate Independent

Networked Communicating
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 24
Distributed Operating System
Definition by Coulouris, Dollimore, Kindberg and Blair
“A distributed system is defined as one in which components at networked computers
communicate and coordinate their actions only by passing messages.”
“A Distributed system is collection of independent computers which are connected through
network.”

This system looks to its users like an ordinary centralized operating system but runs on
multiple, independent central processing units (CPUs).
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 25
Distributed Operating System
A great example of distributed system is the web page of TU University.

www.TU.edu.np
User Internet

Web Server

School of School of Diploma


Computer Science Engineering

School of
Engineering
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 26
Distributed Operating System

Scenario-1: Want to process


RAM: 4GB
Increase RAM
RAM: 8GB
500GB Data size to 8GB
Vertical Scaling

Want to process
500GB Data RAM: 4GB
Add more
Processors/Systems
Scenario-2:
DOS(Disk
Horizontal Scaling RAM: 4GB RAM: 4GB RAM: 4GB
Operating
System

Divide/Distribute the workload

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 27
Examples of Distributed Systems
From the definition, Distributed Systems also looks the same as single system.
Let us say about Google Web Server, from users perspective while they submit the searched
query, they assume google web server as a single system.
Just visit google.com, then search.
However, under the hood Google builds a lot of servers even distributes in different
geographical area to give you a search result within few seconds.
So the Distributed Systems does not make any sense for normal users.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 28
Examples of Distributed Systems

Telephone networks and cellular


Computer network such internet
networks

ATM machines Mobile


Computing
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 29
Examples of Distributed Systems
 Web Search Engines:
 Major growth industry in the last decade.
 10 billion per month for global number of
searches.
 e.g. Google distributed infrastructure

Massively multiplayer online games:


 Large number of people interact through the
Internet with a virtual world.
 Challenges include fast response time, real-
time propagation of events.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 30
Assignment - 1
Differentiate between Centralized Operating System and Distributed Operating System.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 31
Centralized System Distributed System

One component with non-autonomous parts Multiple autonomous components

Component shared by users all the time Components are not shared by all users

All resources accessible Resources may not be accessible

Software runs in a single process Software runs in concurrent processes on different processors

Single Point of control Multiple Points of control

Single Point of failure Multiple Points of failure

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 32
Most popular social networks worldwide as of April 2021

Number of active users monthly (in


millions)
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 33
Why Distributed Operating System?
Facebook, currently, has 2.7 billion active monthly users.
Google performs at least 2 trillion searches per year.
About 500 hours of video is uploaded in Youtube every minute.
A single system would be unable to handle the processing. Thus, comes the need for
Distributed Systems.
The main answer is to cope with the extremely higher demand of users in both processing
power and data storage.
With this extremely demand, single system could not achieve it.
There are many reasons that make distributed systems is viable such as high availability,
scalability, resistant to failure, etc.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 34
Why Distributed Operating System?
It is Challenging/Interesting.
Partial Failures
 Network
 Node failures
Concurrency
 Nodes execute in parallel.
Parallel Computing
 Messages travel asynchronously.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 35
Why Distributed System? –Objectives of DS
1.Cost: Better price/performance as long as commodity hardware is used for the component
computers.
2.Reliability: By having redundant components the impact of hardware and software faults
on users can be reduced.
3.Inherent distribution: Naturally and physically distributed
4.Transparency: The end users can be concealed or hidden from the actual separation of the
distributed system so that the user feels that everything is transparent to everyone.
5.Scalability:Resources such as processing and storage capacity can be increased
significantly.
6.Dependability:The dependence of a system on another system can be achieved to solve a
particular task jointly.
7.Performance:By using the combined processing and storage capacity of many nodes,
performance levels can be reached that are beyond the range of centralized machines.
8.Flexibility: Easily can be added or removed a node
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 36
Network OS vs Distributed OS
Network Operating System Distributed Operating System

A network operating system is made up of A distributed operating system is an ordinary


software and associated protocols that allow a centralized operating system but runs on
set of computer network to be used together. multiple independent CPUs.
Environment users are aware of multiplicity of Environment users are not aware of
machines. multiplicity of machines.
Control over file placement is done manually It can be done automatically by the system
by the user. itself.
No implicit sharing of loads. Sharing of loads between nodes(load
balancing).
Network OS is highly scalable. (A new machine Distributed OS is less scalable. (The process to
can be added very easily.) add new hardware is complex.)

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 37
Network OS vs Distributed OS
Network Operating System Distributed Operating System

Performance is badly affected if certain part of It is more reliable or fault tolerant i.e.
the hardware starts malfunctioning. distributed operating system performs even if
certain part of the hardware starts
malfunctioning.

Remote resources are accessed by either Users access remote resources in the same
logging into the desired remote machine or manner as they access local resources.
transferring data from the remote machine to
user's own machines.

Easy to Implement Difficult to Implement.


Low Transparency High Transparency

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 38
Distributed System Goals
The following are the main goals of distributed systems:
The relative simplicity of the software - Each processor has a dedicated function.
Incremental growth - If we need 10 percent more computing power, we just add 10 percent
more processors.

Reliability and availability - A few parts of the system can be down without disturbing
people using the other parts.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 39
Distributed System Goals
Openness: An open distributed system is a system that offers services according to standard
rules that describe the syntax and semantics of those services.
 It should be easy to configure the system out of different components.

Making Resources Accessible - Main goal of a distributed system


 make it easy for the users (and applications) to access remote resources
 to share them in a controlled and efficient way.
 Resources - anything: printers, computers, storage facilities, data, files, Web pages,
and networks, etc.
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 40
Advantages of Distributed Systems over Centralized Systems
Economics: A collection of microprocessors offer a better price/performance than
mainframes. It is an cost effective way to increase computing power.

Speed: A distributed system may have more total computing power than a mainframe.
Inherent distribution: Some applications are inherently distributed. Ex. a supermarket chain,
Banking, Airline reservation.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 41
Advantages of Distributed Systems over Centralized Systems
Reliability: If one machine crashes, the system as a whole can still survive. Higher availability
and improved reliability.
 Ex. control of nuclear reactors or aircraft.

× Load Transfer

Data sharing: Allow many users to access to a common database.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 42
Advantages of Distributed Systems over Centralized Systems
Resource Sharing: Expensive peripherals such as color laser printers, photo-type setters and
massive archival storage devices are also among the few things that should be sharable.

Communication: Enhance human-to-human communication, e.g., email, chat.


Flexibility: Spread the workload over the available machines

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 43
Disadvantages of Distributed Systems over Centralized System
Software:
 Would be complex.
Network problem:
 Network saturation.
 Malfunctioning of network.
Security:
 Possibility of security violation since the private data are visible to others over the
network.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 44
Classification of Distributed System

Based on Hardware

Based on number
of instructions and
DataStream

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 45
Classification based on Hardware
Even though all distributed system consist of multiple CPUs, there are several different ways
the hardware can be organized, specially in terms of how they are interconnected and
communicate.
Parallel & Distributed
Computers

Tightly Coupled Loosely Coupled

Multiprocessor Multicomputer
(Shared Memory) (Private Memory)

Bus based Switched Bus based Switched

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 46
Tightly-Coupled OS(Shared Memory)
Shared Memory Machine: The n processors shares physical address space. Communication
can be done through shared memory.

P P P P

Interconnect (Bus Line)

Shared Memory

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 47
Tightly-Coupled OS(Shared Memory)
Shared Memory Machine: The n processors shares physical address space. Communication
can be done through shared memory.

A=10+10
A=A+10
A=20 Read
A=20A

P P P P

Interconnect (Bus Line)

A=10
A=20
10

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 48
Loosely-Coupled OS(Private Memory)
Private Memory Machine: Each processors has its own local memory. Communication can
be done through Message passing.

M M M M

A=10A
Read P P P P A=20A
Read

Read
A=20A

Interconnect (Bus Line)

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 49
Classification based on Hardware
Loosely-Coupled OS Tightly-Coupled OS

Each processors has its own local memory. The n processors shares physical address
space.
Communication can be done through Message Communication can be done through shared
passing. memory.
Manages heterogeneous multicomputer Manages multiprocessors & homogeneous
Distributed Systems. multicomputer.
Similar to “local access feel” as a non- Provides local services to remote clients via
distributed, standalone OS. remote logging
Data migration or computation migration Data transfer from remote OS to local OS via
modes (entire process or threads) FTP (File Transfer Protocols)
Distributed Operating System (DOS) Network Operating System (NOS)

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 50
Classification based on Instruction & DataStream
According to Flynn’s classification can be done based on the number of instruction streams
and number of data streams.

Flynn’s
Classification

SISD SIMD MISD MIMD

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 51
Classification based on Instruction & DataStream
Single instruction stream single data stream (SISD)
 One Program counter and one path to data memory.
 A computer is capable of executing one instruction at a time operating on one piece of
data.
 An ordinary (Sequential) computer.

Instruction Pool +
Data Stream

A B
PU

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 52
Classification based on Instruction & DataStream
Single instruction stream, multiple data streams (SIMD)
 One Program counter and multiple paths to data memory.
 A computer is capable of executing one instruction at a time, but operating on different
pieces of data.

Instruction Pool +

A B PU
+
Data Stream

C D +
PU

E F
PU

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 53
Classification based on Instruction & DataStream
Multiple instruction streams, single data stream (MISD)
 No more computers fit this model.
 Uncommon architecture which is generally used for fault tolerance.

+ Instruction Pool *

A B A B
Data Stream

PU PU

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 54
Classification based on Instruction & DataStream
Multiple instruction streams, Multiple data stream (MIMD)
 A group of independent computers, each with its own program counter, program, and
data.
 A computer that can run multiple processes or threads that are cooperating towards a
common objective.

+ Instruction Pool *

A B A +B *
PU PU
Data Stream

C D C D
PU PU

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 55
Classification based on Instruction & DataStream
All distributed systems are MIMD, We divide all MIMD computers into two groups:
 Have shared memory, usually called multiprocessors.
 Do not have shared memory, called multicomputer.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 56
Issues in Designing a Distributed System

Transparency Reliability Flexibility

Performance Scalability Heterogeneity

Security

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 57
Brief (Issues in Designing a Distributed System)
Transparency Provide a single system image to its user.

Reliability Degree of Fault tolerance should be low.

Flexibility Ease of Modification and Enhancement.

Performance Performance should be better than Centralized system.

Scalability Capability of a system to adopt increased service load.

Heterogeneity It consist of dissimilar hardware or software systems.

Security Must be protected against destruction and unauthorized access.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 58
Types of Distributed Systems

Distributed Systems

Distributed Distributed Distributed Pervasive


Computing Systems Information Systems Systems

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 59
Distributed Computing Systems
An important class of distributed systems is the one used for higher performance
computing tasks.
Here, Computers in a network communicate via message passing.
Two Types of Distributed Computing Systems:
 Cluster Computing Systems
 Grid Computing Systems

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 60
Cluster Computing Systems
A collection of similar workstations or PCs connected by a high‐ speed local‐area
network (LAN)
It is homogenous given that each node runs the same OS.
The ever increasing price / performance ration of computers makes it cheaper to
build a supercomputer by putting together many simple computers, rather than
buying a high-performance one.
Also, robustness is higher, maintenance and incremental addition of computing
power is easier
Usage
 Parallel programming
 Typically, a single computationally-intensive program is run in parallel on multiple
machines

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 61
An Example of Cluster Computing Systems

Master node Computer node Computer node Computer node

Management Component Component Component


application Of Of Of
parallel parallel parallel
application application application
Parallel libs

Local OS Local OS Local OS Local OS

Remote access Standard network


network
High-speed network

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 62
Grid Computing Systems
A characteristic feature of cluster computing is its homogeneity.
In most cases, the computers in a cluster are largely the same, they all have the same
operating system, and are all connected through the same network.
In contrast, grid computing systems have a high degree of heterogeneity: no
assumptions are made concerning hardware, operating systems, networks,
administrative domains, security policies, etc.
A key issue in a grid computing system is that resources from different organizations
are brought together to allow the collaboration of a group of people or institutions.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 63
Architecture of a Grid Computing System
Fabric layer
 Interface to local resources at a specific site. Applications

Connectivity layer
 Communication protocols for grid transactions Collective layer
spanning over multiple resources, plus security
protocols for authentication
Connectivity
Resource layer Resource layer
layer
 Management of single resources—e.g., access
control Fabric layer
Collective layer
 Handling access to multiple resources—resource
discovery, allocation,
Application layer
 Applications operating in the virtual organization.
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 64
Grid Middleware layer
collective, connectivity, and resource layers.
Provide access to and management of resources that are potentially dispersed across
multiple sites.
Shift toward a service-oriented architecture in which sites offer access to the various
layers through a collection of Web services
Led to the definition of an alternative architecture known as the Open Grid Services
Architecture (OGSA).
Consists of various layers and many components, making it rather complex.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 65
Distributed Information Systems
Evolved in organizations that were confronted with a wealth of networked
applications, but for which interoperability turned out to be problematic.
Many of the existing middleware solutions are the result of working with an
infrastructure in which it was easier to integrate applications into an enterprise-wide
information system.
Several levels at which integration took place:
 Several non-interoperating servers shared by a number of clients: distributed queries,
distributed transactions. Example : Transaction Processing Systems
 Several sophisticated applications – not only databases, but also processing components
– requiring to directly communicate with each other. Example. Enterprise Application
Integration (EAI)

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 66
Transaction Processing Systems
A transaction is a collection of operations on the state of an object (database, object
composition, etc.) that satisfies the following properties (ACID):
 Atomicity: All operations either succeed, or all of them fail. When the transaction
fails, the state of the object will remain unaffected by the transaction.
 Consistency: A transaction establishes a valid state transition.
 Isolation: Concurrent transactions do not interfere with each other. It appears to
each transaction T that other transactions occur either before T, or after T, but
never both.
 Durability: After the execution of a transaction, its effects are made permanent

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 67
Distributed Transactions(flat and nested)
Flat Transactions Nested Transactions

A
X T11 A
T T1 H
B
Y T T12 B
T21 C
T2 K
C
D
D T22
Z F
 A flat client transaction completes each of its
requests before going on to the next one.  In a nested transaction, the top-level transaction can
open sub transactions, and each sub transaction can
 Therefore, each transaction accesses servers’ open further sub transactions down to any depth of
objects sequentially nesting
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 69
Nested Transactions
 A nested transaction is made of a number of sub transactions.
Nested transaction

Subtransaction Subtransaction

Airline database Hotel database

Two different (independent) databases


 The top-level transaction may fork off children that run in parallel with one another,
on different machines, to gain performance or simplify programming.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 70
TP(Transaction Processing) Monitor
In the early days of enterprise middleware systems, the component that handled
distributed (or nested) transactions formed the core for integrating applications at
the server or database level.
This component was called a Transaction processing monitor or TP monitor for short.
Reply
Server
Transaction
Request
Request
Request
Client
TP monitor Server
application
Reply
Reply
Request
Reply Server

Its main task was to allow an application to access multiple server/databases by


offering it a transactional programming mode
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 71
Popular TP Monitor Products
TUXEDO from BAE Systems

Microsoft Transaction Server (MTS)

 IBM CICS (Customer Information Control System)

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 72
Enterprise Application Integration
The more applications became decoupled from
the databases they were built upon, the more
evident it became that facilities were needed to
integrate applications independent from their
databases.
Application components should be able to
communicate directly with each other and not
merely by means of the request/reply behavior
that was supported by transaction processing
systems.
Result: Middleware as a communication
facilitator in enterprise application integration

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 73
Enterprise Application Integration

Client Client
application application

Communication middleware

Server-side Server-side Server-side


application application application

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 74
Communication Middleware
Several types of communication middleware exist.
Remote procedure calls (RPC) - an application component can send a request to another
application component by doing a local procedure call, which results in the request being
packaged as a message and sent to the callee.
Remote method invocations (RMI) – An RMI is the same as an RPC, except that it operates
on objects instead of applications.
Problems with RPC and RMI:
 The caller and callee both need to be up and running at the time of communication.
 They need to know exactly how to refer to each other.
Results: Message-oriented middleware (MOM) - applications send messages to logical
contact points, often described by means of a subject.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 75
Distributed Pervasive Systems
Above distributed systems characterized by their stability: nodes are fixed and have a more
or less permanent and high-quality connection to a network.
Mobile and embedded computing devices: instability is the default behavior.
We are now confronted with distributed systems in which instability is the default behavior.
The devices in these, what we refer to as distributed pervasive systems.
They are often characterized by being small, battery-powered, mobile, and having only a
wireless connection, although not all these characteristics apply to all devices.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 76
Health Care Systems
Personal systems built around a Body Area Network
Possibly, minimizing impact on the person like, preventing free motion

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 77
Features and Requirements of Distributed Pervasive Systems
Features:
 General lack of human administrative control ·
 Devices can be configured by their owners
 They need to automatically discover their environment and fit in as best as possible

Requirements for pervasive applications


 Embrace contextual changes
 Encourage ad hoc composition
 Recognize sharing as the default

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 78
CASE STUDY: The World Wide Web
WWW stands for World Wide Web. A technical
definition of the World Wide Web is : all the resources
and users on the Internet that are using the Hypertext
Transfer Protocol (HTTP).
A broader definition comes from the organization that
Web inventor Tim Berners-Lee helped found,
the World Wide Web Consortium (W3C).
The World Wide Web is the universe of network-
accessible information, an embodiment of human
knowledge.
In simple terms, The World Wide Web is a way of
exchanging information between computers on the
Internet, tying them together into a vast collection of
interactive multimedia resources.
Note: Internet and Web is not the same thing: Web
uses internet to pass over the information.
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 79
CASE STUDY: The World Wide Web
The World Wide Web [www.w3.org I, Berners-Lee 1991] is an evolving system for publishing
and accessing resources and services across the Internet. Through commonly available web
browsers, users retrieve and view documents of many types, listen to audio streams and
view video streams, and interact with an unlimited set of services.
The Web began life at the European center for nuclear research (CERN), Switzerland, in 1989
as a vehicle for exchanging documents between a community of physicists connected by the
Internet [Berners-Lee 1999]. A key feature of the Web is that it provides a hypertext
structure among the documents that it stores, reflecting the users’ requirement to organize
their knowledge. This means that documents contain links (or hyperlinks) – references to
other documents and resources that are also stored in the Web.
The Web is an open system: it can be extended and implemented in new ways without
disturbing its existing functionality.
 First, its operation is based on communication standards and document or content
standards that are freely published and widely implemented.
 Second, the Web is open with respect to the types of resource that can be published
and shared on it.
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 80
WWW Operation

WWW works on client- server


approach. Following steps explains how
the web works:

1.User enters the URL


(say, http://www.ambition.com) of the
web page in the address bar of web
browser.

2.Then browser requests the Domain


Name Server for the IP address
corresponding to www.ambition.com.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 81
WWW Operation

3.After receiving IP address, browser


sends the request for web page to the
web server using HTTP protocol which
specifies the way the browser and web
server communicates.
4.Then web server receives request using
HTTP protocol and checks its search for
the requested web page. If found it
returns it back to the web browser and
close the HTTP connection.
5.Now the web browser receives the
web page, It interprets it and display the
contents of web page in web browser’s
window.
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 82
WWW Operation

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 83
Components of WWW
1.Client/Browser
2.Server
3. URL
4. HTML
5. XML

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 84
1.Client/Browser
 The Client/Web browser is basically a program that is used to communicate with the
webserver on the Internet.
 Each browser mainly comprises of three components and these are:
 Controller
 Interpreter
 Client Protocols
 The Controller mainly receives the input from the input device, after that it uses the
client programs in order to access the documents.
 After accessing the document, the controller makes use of an interpreter in order to
display the document on the screen.
 An interpreter can be Java, HTML, javascript mainly depending upon the type of the
document.
 The Client protocol can be FTP, HTTP, TELNET.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 85
2.Server
 The Computer that is mainly available for the network resources and in order to provide
services to the other computer upon request is generally known as the server.
 The Web pages are mainly stored on the server.
 Whenever the request of the client arrives then the corresponding document is sent to
the client.
 The connection between the client and the server is TCP.
 It can become more efficient through multithreading or multiprocessing. Because in this
case, the server can answer more than one request at a time.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 86
3.URL
URL is an abbreviation of the Uniform resource locator.
It is basically a standard used for specifying any kind of information on the Internet.
In order to access any page the client generally needs an address.
To facilitate the access of the documents throughout the world HTTP generally makes use of
Locators.
URL mainly defines the four things:
 Protocol It is a client/server program that is mainly used to retrieve the document. A
commonly used protocol is HTTP.
 Host Computer It is the computer on which the information is located. It is not
mandatory because it is the name given to any computer that hosts the web page.
 Port The URL can optionally contain the port number of the server. If the port number is
included then it is generally inserted in between the host and path and is generally
separated from the host by the colon.
 Path It indicates the pathname of the file where the information is located.
#3170719 (DS)  Unit 1 – Fundamentals of Distributed System
Prof. Umesh H. Thoriya 87
4.HTML
HTML is an abbreviation of Hypertext Markup Language.
 It is generally used for creating web pages.
 It is mainly used to define the contents, structure, and organization of the
web page.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 88
5.XML
XML is an abbreviation of Extensible Markup Language. It mainly helps in order to define the
common syntax in the semantic web.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 89
Features of WWW
Given below are some of the features provided by the World Wide
Web:

 Provides a system for Hypertext information


 Open standards and Open source
 Distributed.
 Mainly makes the use of Web Browser in order to provide a single interface
for many services.
 Dynamic
 Interactive
 Cross-Platform

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 90
Advantages of WWW
Given below are the benefits offered by WWW:

 It mainly provides all the information for Free.


 Provides rapid Interactive way of Communication.
 It is accessible from anywhere.
 It has become the Global source of media.
 It mainly facilitates the exchange of a huge volume of data.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 91
Disadvantages of WWW
There are some drawbacks of the WWW and these are as follows;

It is difficult to prioritize and filter some information.


There is no guarantee of finding what one person is looking for.
There occurs some danger in case of overload of Information.
There is no quality control over the available data.
There is no regulation.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 92
CASE STUDY: The World Wide Web

WWW is the huge collection of pages of information linked to each other around one globe.
Web page is the collection of text, images, video, audio, animation and hyperlink.

There are two types of web:


 1. Static web: Information site. Eg. Personal website
 2. Dynamic web: Interactive site. Eg. Commercial website, Government website

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 93
CASE STUDY: The World Wide Web
The Web has moved beyond these simple data resources to encompass services, such as
electronic purchasing of goods. It has evolved without changing its basic architecture. The
Web is based on three main standard technological components:

• the Hyper Text Markup Language (HTML), a language for specifying the contents and
layout of pages as they are displayed by web browsers;
• Uniform Resource Locators (URLs), also known as Uniform Resource Identifiers (URIs),
which identify documents and other resources stored as part of the Web;
• a client-server system architecture, with standard rules for interaction (the HyperText
Transfer Protocol – HTTP) by which browsers and other clients fetch documents and other
resources from web servers. The below figure shows some web servers, and browsers
making requests to them. It is an important feature that users may locate and manage their
own web servers anywhere on the Internet.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 94
CASE STUDY: The World Wide Web

Figure: Web servers and web browsers

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 95
CASE STUDY: The World Wide Web
HTML • The Hyper Text Markup Language [www.w3.org II] is used to specify the text and
images that make up the contents of a web page, and to specify how they are laid out and
formatted for presentation to the user. A web page contains such structured items as
headings, paragraphs, tables and images. HTML is also used to specify links and which
resources are associated with them.
Users may produce HTML by hand, using a standard text editor, but they more commonly
use an HTML-aware ‘wysiwyg’ editor that generates HTML from a layout that they create
graphically. A typical piece of HTML text follows:
 <IMG SRC = “http://www.cdk5.net/WebExample/Images/earth.jpg”> 1
 <P> 2
 Welcome to Earth! Visitors may also be interested in taking a look at the 3
 <A HREF = “http://www.cdk5.net/WebExample/moon.html”>Moon</A>. 4
 </P> 5

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 96
CASE STUDY: The World Wide Web
URLs • The purpose of a Uniform Resource Locator [www.w3.org III] is to identify a resource.
Indeed, the term used in web architecture documents is Uniform Resource Identifier (URI),
but in this, the better-known term URL will be used when no confusion can arise. Browsers
examine URLs in order to access the corresponding resources.
Sometimes the user types a URL into the browser. More commonly, the browser looks up
the corresponding URL when the user clicks on a link or selects one of their ‘bookmarks’; or
when the browser fetches a resource embedded in a web page, such as an image.

URL is the global address of web documents on www.


URL are unique in nature may not have any copy.
There are two types of URL.
 1.Protocol
 2.Resource name

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 97
CASE STUDY: The World Wide Web
An HTTP URL has two main jobs:
 (i) to identify which web server maintains the resource, and
 (ii) to identify which of the resources at that server is required.

Figure shows three browsers issuing requests for resources managed by three web servers.
The topmost browser is issuing a query to a search engine.
The middle browser requires the default page of another web site.
The bottommost browser requires a web page that is specified in full, including a path name
relative to the server.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 98
CASE STUDY: The World Wide Web
Publishing a resource:
 While the Web has a clearly defined model for accessing a resource from its
URL, the exact methods for publishing resources on the Web are dependent
upon the web server implementation.
 In terms of low-level mechanisms, the simplest method of publishing a
resource on the Web is to place the corresponding file in a directory that
the web server can access.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 99
CASE STUDY: The World Wide Web
 Web application: Web applications are run into browser through URL.
 Types:
1. Service Oriented: it is used to implement web services. It is coded into CGI, JSP,
ASP, etc.
 JSP stands for Java Server Pages, which helps developers to create dynamically
web pages based on HTML, XML, or other types.
 ASP stands for Active Server Pages, which is used in web development to
implement dynamic web pages.
 CGI stands for Common Gateway Interface, It is a technology that enables a web
browser to submit forms and connect to programs over a webserver. It is the
best way for a webserver to send forms and connect to programs on the server .

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 100
CASE STUDY: The World Wide Web
2. Presentation oriented:
 It provides client side services. They are coded using HTML, XML, JavaScript,
etc.
 Web architecture:
 WWW follows the 2 tier architecture.
 It is combination of webserver and web client.
 Webserver produce and deliver the information.
 Web client retrieve and display information.

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 101
Assignment 2
Differentiate between Internet and WWW.
Difference between Search Engine and
Website

#3170719 (DS)  Unit 1 – Fundamentals of Distributed System


Prof. Umesh H. Thoriya 102

You might also like