W Chapter 2
W Chapter 2
W Chapter 2
Architectures
Design
Fundamental Models:
Interaction Model.
Failure Model.
Security Model.
1
Fundamental models:
Software Layers
In the layered view of a system each layer offers its
services to the level above and builds its own
service on the services of the layer below.
Software architecture is the structuring of software
in terms of layers (modules) or services that can be
requested locally or remotely.
Applications
Middleware
Operating system
Platform
Software Layers
Platform:
and
Middleware:
System Architectures
The architecture include:
Client-server model:
Servers partition the set of objects on which the service is based and
distribute them among themselves (e.g. Web data and web servers)
System Architectures
Client
invocation
result
Client
invocation
Server
Server
result
Key:
Process:
Computer:
System Architectures
Service
Server
Client
Server
Client
Server
Centralized Architectures
Figure 2-3. General interaction between
a client and a server.
The Client-Server
Paradigm
Perhaps the best known paradigm for network applications, the
client-server2 model
assigns asymmetric roles to two
collaborating processes.
One process, the server, plays the role of a service provider which
waits passively for the arrival of requests. The other, the client,
issues specific requests to thes e r vserver
and awaits its response.
ic e re q u e s t
a c lie n t p ro c e s s
Server h o st
a se rve r p ro c e ss
a s e rvic e
...
C lient ho st
T h e C lie n t-S e r ve r P ar ad ig m , c o n c e p tu al
The Client-Server
Paradigm - 2
Simple in concept, the client-server model provides an
efficient abstraction for the delivery of network services.
Operations required include those for a server process to
listen and to accept requests, and for a client process to
issue requests and accept responses.
By assigning asymmetric roles to the two sides, event
synchronization is simplified: the server process waits for
requests, and the client in turn waits for responses.
Many Internet services are client-server applications.
These services are often known by the protocol that the
application implements. Well known Internet services
include HTTP, FTP, DNS, finger, gopher, etc.
10
11
System Architectures
Caches and proxy servers:
Cache:
A store of recently used data objects that is closer to the
client process than those remote objects.
When an object is needed by a client process the caching
service checks the cache and supplies the object from
there in case of an up-to-date copy is available.
Proxy server:
Provides a shared cache of web resources for client
machines at a site or across several sites.
Increase availability and performance of a service by
reducing load on the WAN and web servers.
May be used to access remote web servers through a
firewall.
12
System Architectures
Client
Web
server
Proxy
server
Web
server
Client
System Architectures
Peer processes:
Application
Coordinatio
n
code
Application
Coordinatio
n
code
Application
Coordinatio
n
code
A distributed application
based on peer processes
14
Advantage:
Disadvantage:
local
resources
in
the
15
Client
Applet code
Web
server
Client
Applet
Web
server
Web applets
16
Limited applicability.
Network computer or PC
Thin
Client
network
Compute server
Application
Process
re q u e s t
re q u e s t
re s p o n s e
re s p o n s e
pro ce ss 2
22
24
25
and
26
27
Message
P roce ss B
a m essage
M e s s a g e p a s s in g
28
http://java.sun.com/products/jdk/1.2/docs/api/index.h
tml
http://www.sockets.com/
29
Throughput:
The rate at which work is done for all users in a distributed system.
Load balancing:
Dependability issues:
31
Fundamental Models
(Interaction Model)
Fundamental Models
(Interaction Model)
Time for first bit transmitted through a network to reach its destination.
33
Fundamental Models
(Interaction Model)
2.
Computer clocks:
34
Fundamental Models
(Interaction Model)
Fundamental Models
(Interaction Model)
Fundamental Models
(Interaction Model)
37
Fundamental Models
(Interaction Model)
send
X
receive
m1
2
receive
receive
4
send
3
m2
receive
Physical
time
send
receive
receive
m3
A
t1
t2
m1
m2
Fundamental Models
(Failure Model)
Omission failures
Process or channel failed to do something.
Arbitrary failures
Any type of error can occur in processes or channels (worst).
Timing failures
Applicable only to synchronous distributed systems where
time limits may not be met.
39
Fundamental Models
(Failure Model)
Process
Process
sendm
receive
Communication channel
Outgoing message buffer
Fundamental Models
(Failure Model)
Affects
Process
Description
Processhaltsandremainshalted.Otherprocessesmay
detectthisstate.
Crash
Process
Processhaltsandremainshalted.Otherprocessesmay
notbeabletodetectthisstate.
Omission
Channel
Amessageinsertedinanoutgoingmessagebuffernever
arrivesattheotherendsincomingmessagebuffer.
Sendomission
Process
Aprocesscompletesa send,butthemessageisnotput
initsoutgoingmessagebuffer.
Receiveomission Process
Amessageisputinaprocesssincomingmessage
buffer,butthatprocessdoesnotreceiveit.
Arbitrary
Processor Process/channelexhibitsarbitrarybehaviour:itmay
(Byzantine)
channel
send/transmitarbitrarymessagesatarbitrarytimes,
commitomissions;aprocessmaystoportakean
incorrectstep.
41
Fundamental Models
(Failure Model)
Timing failures
ClassofFailure
Affects
Description
Clock
Process
Performance
Process
Performance
Channel
Processslocalclockexceedstheboundsonits
rateofdriftfromrealtime.
Processexceedstheboundsontheinterval
betweentwosteps.
Amessagestransmissiontakeslongerthanthe
statedbound.
42
Fundamental Models
(Security Model)
Access rights
In client server systems: involves authentication of
clients.
Threats to processes:
requests / replies.
problem
of
unauthenticated
Fundamental Models
(Security Model)
Access rights
Object
invocation
Client
Server
result
Principal (user)
Network
Principal (server)
Fundamental Models
(Security Model)
Copy of m
The enemy
m
Process p
Process q
Communication channel
The enemy
45
Fundamental Models
(Security Model)
Principal B
Principal A
Process p
Secure channel
Process q
Secure channels
46
Fundamental Models
(Security Model)
Denial of service
Mobile code:
47