Figure 15.1 A distributed multimedia system

Download Report

Transcript Figure 15.1 A distributed multimedia system

Slides for Chapter 2:
Architectural Models
From Coulouris, Dollimore and Kindberg
Distributed Systems:
Concepts and Design
Edition 4, © Pearson Education 2005
Architecture Model
Architecture model is concerned with the
placement of its parts, namely how components
are mapped to underlying network and the
relationship between them, that is, their
functional roles and patterns of communication
between them.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Architectural Elements
 What are the entities that are communicating in the distributed
system?
 From system perspective, the entities are typically processes and sometimes supplemented
by threads.
 From a programming perspective:
 Objects: objects are accessed via interface, with an associated interface definition
language providing a specification of the methods defined on an object.
 Components: there are many problems with objects, so components has emerged as a
direct response to such weakness. Components resemble objects in that they offer
problem-oriented abstractions for building system and are also accessed through
interface. It requires a strict and explicit assumption for other components, namely
dependency and contract are clear. Its enable third-party development.
 Web service: encapsulate behavior and access through interface. It uses web
standards to represent and discover services. XML-based message exchanges via
Internet-based protocols.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Architectural Elements
 What are the communication paradigm is used in the distributed
system?
 Inter-process communication
 Low-level support for communication between processes, including message-passing
primitive, socket programming, multicast communication
 Remote invocation
 The most common communication paradigm based on a two-way exchange between
entities and resulting in the calling of a remote operation, procedure or method.
 Request-reply protocol is underlying message-passing service to support client-server
computing. A pairwise exchange of message from client to server and from server back
to client.
 Remote procedure call
 Remote method invocation is similar to remote procedure call but in a word of
distributed objects.
 Indirect communication through a third entity allowing a strong degree of decoupling
between senders and receivers. In particular, senders do not need to know who they are
sending to (space uncoupling). Senders and receivers do not need to exist at the same time
( time uncoupling).
 Group communication, publish-subscribe systems, message queues, Tuple space and
distributed shared memory
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Architectural Elements
 What are the Roles and Responsibilities for Communication
Entities?
 It has major implications for the performance, reliability and security
of the resulting system.
 Client and Server: The most often cited when distributed systems are discussed.
The next figure illustrates the simple structure in which client processes interact
with individual server processes in separate host computers.
 Server may in turn be clients of other servers. For instance, web server
is often a client of a local file server that manages the files in which the
web pages are stored. Web servers are clients of DNS service.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Clients invoke individual servers
Client
invocation
result
Server
invocation
result
Server
Client
Key:
Proc ess :
Computer:
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Architectural Elements
 Peer-to-peer system: all of the processes involved in a task or
activity play similar roles, interacting cooperatively as peers without
any distinction between client and server processes. While client
and server model is simple but it scales poorly. The centralization of
service provision and management does not scale well beyond the
capacity of the computer that hosts the service and bandwidth of its
connection.
 The next figure illustrates the form of P2P. Applications are
composed of large number of peer processes running on separate
computers and the pattern of communication depends entirely on
application requirements. Processing and communication loads are
distributed across many computers and links. Some objects are
even duplicated to further distribute the load and increase the error
resilience when some nodes fail.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
A distributed application based on peer processes
P ee r 2
P ee r 1
Applic a tion
Applic a tion
P ee r 3
Sha ra ble
obje c ts
Applic a tion
P ee r 4
Applic a tion
P ee rs 5 .... N
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Model Variations
Several variations on the above models can be
derived from the consideration of the following
factors:
The user of multiple servers and caches to increase
performance and resilience.
The user of mobile code and mobile agents.
Thin client: User’s need for low-cost computers with
limited hardware resources that are simple to
manage.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
A service provided by multiple servers
Servic e
Server
Client
Server
Client
Server
 The servers may partition the set of objects on which the service is
based and distributed them between them, or they may maintain
replicated copies of them.
 Web provides a common example of partitioned data
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Web proxy server
Web
s erver
Client
P roxy
s erver
Web
s erver
Client
 Cache is a store of recently used data objects that is closer than the
object themselves.
 Proxy server and caches: web proxy server provides a shared
cache of web resources for the client machines at a site or across
several sites. The purpose is to increase the availability and
performance of the service by reducing the load on the wide-area
network and web server. . Proxy server can take on other roles. For
example, they may be used to access remote web server through a
firewall.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Mobile code and Mobile agent
a) c lient reques t res ults in the downl oadi ng of applet c ode
Client
Applet c ode
Web
s erver
b) c lient interac ts with the appl et
Client
Web
s erver
Applet
 Mobile code can be downloaded from one node to the other. Applet is
one example.
 The advantages of applet is good interactive response since it
does not suffer from the delays due to the changing network
bandwidth.
 Mobile agent is a running program including both code and data that
travels from one computer to another carrying out a task on someone’s
behalf, eventually
returning with the results.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Thin clients and compute servers
Compute server
Network computer or PC
Thin
Client
network
Application
Process
 Thin client refers to a software layer that supports a window-based
user interface on a computer that is local to the user while executing
application programs on a remote computer.
 Instead of downloading the code onto local computer, it runs them on
the remote powerful server, which has the capacity to run large number
of applications simultaneously. It is usually a cluster or at least multiprocessor machine.
 The main drawback is in highly interactive graphical activities such as
CAD and imaging processing, where the delay are increased by the
need to transfer image and vector information between the link.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Architectural Patterns:
1: Software and hardware service layers in distributed systems
Applic ations, services
Middleware
Operating s ys tem
Platform
Computer and network hardware
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Software and Hardware service layers
Platform: the lowest-level hardware and
software layers are often referred to as a
platform, which provides services to the layers
above them. Intel x86/Windows, Intel 86/Linux,
PowerPC/Mac OS X are such examples.
Middleware: a layer of software whose purpose
is to mask heterogeneity and to provide a
convenient programming model to application
programmers. Java RMI, web services and
CORBA are such examples
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Architectural Patterns:
2: Two-tier and three-tier architectures
Complementary to layering. Tiering
is a technique to organize
functionality of a given layer and
place this functionality into servers
and on to physical node.
1. The presentation logic, which is
concerned with handling user
interaction and updating the view
of the applications as presented
to the user.
2. The application logic, which is
concerned with the detailed
application-specific processing
associated with the application.
3. The data logic, which is
concerned with the persistent
storage of the application,
typically in a database
management system.
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
1
6
Fundamental Models
 It deals with a more formal description of the properties that are
common in all of the architectural models.
 Since no global time in a distributed system, so the clocks on
different computers do not necessarily give the same time as one
another.. Messages communications can be affected by delays and
suffer from a variety of failures and vulnerable to security attacks.
 Issues can be addressed by the following three models:
 The interaction model deals with performance and with difficulty of
setting time limits.
 The failure model attempts to give a precise specification of the faults
that can be exhibited by processes and communication channels.
 The security model discusses the possible threats to processes and
communication channels. It introduces the concept of a secure channel,
which is secure against those threats.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Fundamental Models
 All system models have some common fundamental properties. The
following models are used to capture these:
Interaction: Processes communicate with messages and
coordinate via synchronization and ordering of activities. The
message delays are often of considerable duration, the
coordination between processes is limited by lack of global
clock.
Failure: The correct operation is threatened whenever a fault
occurs in any of the computers and network. We should define
types of faults in order to tolerate them for the system to
continue to run correctly.
Security: The modular feature of distributed system and their
openness eposes them to attack by both eternal and internal
agents. Security model defines and classifies the forms of attack
in order resist them.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Two variations of interaction model
It is hard to set time limits on the time taken for
process execution, message delivery or clock drift.
Two opposing extreme positions provide a pair of
simple models: the first has a strong assumption of
time an the second makes no assumption about time.
Synchronous distributed system: Lower and upper bounds
are defined for the time to execute each step of a process;
each message transmitted over a channel; each process
has a local clock whose drift rate from real time has a
bound.
Asynchronous distributed system including Internet: no
bounds can be defined.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 2.8
Real-time ordering of events
s end
X
receive
1
m1
2
Y
receive
4
s end
3
m2
receive
Physic al
ti me
receive
s end
Z
receive
receive
m3
A
t1
t2
m1
m2
receive receive receive
t3
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 2.9
Processes and channels
proc es s p
proc es s q
send m
receive
Communic ation c hannel
Outgoing mess age buffer
Incoming mess age buffer
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 2.10
Omission and arbitrary failures
Class of failure Affects
Fail-stop
Process
Description
Process halts and remains halted. Other processes may
detect this state in synchronous system using timeout.
Crash
Process Process
halts and remains halted. Other processes may
.
not be able to detect this state.
Omission
Channel A message inserted in an outgoing message buffer never
arrives at the other end’s incoming message buffer.
Send-omission Process A process completes send,but
a
the message is not put
in its outgoing message buffer.
Receive-omissionProcess A message is put in a process’s incoming message
buffer, but that process does not receive it.
Arbitrary
Process orProcess/channel exhibits arbitrary behaviour: it may
(Byzantine)
channel send/transmit arbitrary messages at arbitrary times,
commit omissions; a process may stop or take an
incorrect step.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 2.12
Objects and principals
Acc es s rights
invocation
Client
result
Princi pal (us er)
Network
Server
Princi pal (s erver)
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Objec t
Security
 The security of a distributed system can be achieved by
securing the processes and the channels used for their
interactions and by protecting the objects against
unauthorized access.
 Access right specify who is allowed to perform the
operations of an object. So we include users as the
beneficiaries of access right. The invocation and result
should have an authority which is called principle.
 The server checks the identify of principle for each
invocation and see if it has the access right.
 The client may check the identify of the principle behind
the server to ensure the results come from the required
server.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 2.13
The enemy
Copy ofm
The enemy
Processp
m’
m
Processq
Communication channel
Enemy can copy, alter or inject messages as they travel across the network. Such
Attack present a threat to the privacy and integrity of information and the integrity
Of the system.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 2.14
Secure channels
PrincipalB
PrincipalA
Processp
Secure channel
Processq
Secure channel can be used to defeat the threat to communication channel
based on cryptography and authentication.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005