comp28112 lecture 2 architectures of distributed systems fundamental models
TRANSCRIPT
20 Apr 2023 COMP28112 Lecture 3 2
Architectures of Distributed Systems
• Tightly coupled– Highly integrated machines that may look as a single
computer.
• Loosely coupled (share nothing)– Client-Server– Peer-to-Peer– A Key differentiation based on the Programming Interface:
• Distributed Objects
• Web Services• Read “Web Services are not Distributed Objects”, Internet Computing, Nov-Dec. 2003,
http://www.allthingsdistributed.com/historical/archives/000343.html
20 Apr 2023 COMP28112 Lecture 3 3
Tightly coupled systems• Distributed shared memory (DSM)provides the
illusion of a single shared memory: it spares the programmer the concerns of message passing.
I n st r u c to r ’ s G u id e fo r C o u lo u r i s , D o l l i m o r e a n d K i n d b e r g D i st r ib u te d S y ste m s : C o n c e p t s a n d D e si g n E d n . 3 © A d d i so n - W e sle y P u b l i s h e r s 2 0 0 0
F ig u r e 1 8 .1T h e d is t r ib u te d s h a r e d m e m o r y a b s t r a c t io n
Phys icalmemory
Processaccess ing DSM
DSM appears asmemory in address
space of process
Phys icalmemory
Phys icalmemory
Dis tributed shared memory
20 Apr 2023 COMP28112 Lecture 3 4
Issues with Distributed Shared Memory• Machines are still connected by a network:
– Minimize network traffic– Reduce the latency between request and completion
• How to keep track of the location of shared data• How to overcome delays when accessing remote data• How to make shared data concurrently accessible• Replicate shared data on multiple machines:
– Need memory coherence
• Lots of research in the context of building parallel computers – see Chapter 18 in Coulouris et al book.
20 Apr 2023 COMP28112 Lecture 3 5
Architectural Styles(talking about loosely-coupled systems)
Based on the logical organization of the components of distributed systems:
• Layered architectures• Object-based architectures• Data-centered architectures• Event-based architectures
20 Apr 2023 COMP28112 Lecture 3 6
The layered architectural style
See Figure 2-1 in Tanenbaum and Van Steen book
20 Apr 2023 COMP28112 Lecture 3 7
The object-based architectural style
See Figure 2-1 in Tanenbaum and Van Steen book
20 Apr 2023 COMP28112 Lecture 3 8
The Event-Based architectural style
• See Figure 2-2 in Tanenbaum and Van Steen book
20 Apr 2023 COMP28112 Lecture 3 9
Shared-Data Space Architectural Style
• See Figure 2-2 in Tanenbaum and Van Steen book
20 Apr 2023 COMP28112 Lecture 3 10
System Architectures of Distributed Systems
In str uc to r ’ s G uid e fo r C o ulo ur i s, D o ll im o re and K ind b er g D i str ib u ted S y ste m s: C o nc ep t s a nd D e si g n E d n . 4 © P ea r so n E d uc a tio n 2 0 0 5
F ig u re 2 .1S o ftw a re a n d h a rd w a re s e rv ic e la y e rs in d is tr ib u te d s ys te m s
Applications, services
Computer and network hardware
Platform
Operating system
Middleware
20 Apr 2023 COMP28112 Lecture 3 11
Middleware
• Middleware: a software layer that provides a programming abstraction to mask the heterogeneity of the underlying platforms (networks, languages, hardware, …)– E.g., CORBA, Java RMI
• But… the end-to-end argument implies that some aspects of communication support cannot always be abstracted away from applications.
20 Apr 2023 COMP28112 Lecture 3 12
The end-to-end argument
“The function in question can completely and correctly be implemented only with the knowledge and help of the application standing at the end points of the communication system. Therefore, providing that questioned function as a feature of the communication system itself is not possible. (Sometimes an incomplete version of the function provided by the communication system may be useful as a performance enhancement.)”
• See Coulouris pages 33-34 and http://www.reed.com/dpr/locus/Papers/EndtoEnd.html
20 Apr 2023 COMP28112 Lecture 3 13
Client-Server Model
I n s t r u c t o r ’ s G u i d e f o r C o u l o u r i s , D o l l i m o r e a n d K i n d b e r g D i s t r i b u t e d S y s t e m s : C o n c e p t s a n d D e s i g n E d n . 4 © P e a r s o n E d u c a t i o n 2 0 0 5
F i g u r e 2 . 2C l i e n t s i n v o k e i n d i v i d u a l s e r v e r s
S erver
Client
Client
invocation
result
S erverinvocation
result
P rocess:K ey:
Computer:
20 Apr 2023 COMP28112 Lecture 3 14
Client-Server Model• Characteristics of a server:
– Passive (slave)
– Waits for requests
– Upon receipts of requests, it processes them and sends replies
– Can be stateless (does not keep any information between requests) or stateful (remembers information between requests)
• Characteristics of a client:– Active (master)
– Sends requests
– Waits for and receives server replies
20 Apr 2023 COMP28112 Lecture 3 15
Peer-to-Peer (P2P)
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Figure 2.3A distributed application based on peer processes
Application
Application
Application
Peer 1
Peer 2
Peer 3
Peers 5 .... N
Sharableobjects
Application
Peer 4
Earlier Example:•Usenet NewsOther examples:•Napster, Gnutella, Freenet, …
20 Apr 2023 COMP28112 Lecture 3 16
Client-Server vs P2P
• Client-Server– Widely Used
– Functional Specialisation
– Asymmetrical
– Tends to be centralised
– Tends to scale poorly
• P2P– Symmetrical, computers
have same “rights”– Truly Distributed
– Share / exploit resources with a large number of participants
– Resource discovery is a challenge
20 Apr 2023 COMP28112 Lecture 3 17
Variations on a theme…
• Sometimes we need to consider:– The use of multiple servers to increase performance
and resilience– The use of mobile code– Users’ need for low-cost computers– Requirements to add and remove mobile devices
20 Apr 2023 COMP28112 Lecture 3 18
Multiple Servers
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Figure 2.4A service provided by multiple servers
Server
Server
Server
Service
Client
Client
20 Apr 2023 COMP28112 Lecture 3 19
Proxies and Caches
I n s t r u c t o r ’ s G u i d e f o r C o u l o u r i s , D o l l i m o r e a n d K i n d b e r g D i s t r i b u t e d S y s t e m s : C o n c e p t s a n d D e s i g n E d n . 4 © P e a r s o n E d u c a t i o n 2 0 0 5
F i g u r e 2 . 5W e b p r o x y s e r v e r
Client
Proxy
Web
server
Web
server
serverClient
20 Apr 2023 COMP28112 Lecture 3 20
Mobile Code…
I n s t r u c t o r ’ s G u i d e f o r C o u l o u r i s , D o l l i m o r e a n d K i n d b e r g D i s t r i b u t e d S y s t e m s : C o n c e p t s a n d D e s i g n E d n . 4 © P e a r s o n E d u c a t i o n 2 0 0 5
F ig u r e 2 . 6W e b a p p le t s
a) c lient request results in the downloading of applet code
Web server
ClientWeb
serverApplet
Applet code
Client
b) c lient interacts with the applet
20 Apr 2023 COMP28112 Lecture 3 21
Thin Clients
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Figure 2.7Thin clients and compute servers
ThinClient
ApplicationProcess
Network computer or PCCompute server
network
20 Apr 2023 COMP28112 Lecture 3 22
Design Requirements• Performance
– Responsiveness– Throughput– Load balancing
• Quality of Service• Caching and Replication• Dependability
– Correctness– Security – Fault-Tolerance
20 Apr 2023 COMP28112 Lecture 3 23
Fundamental Models• Models include all the essential ingredients that we
need to consider in order to understand and reason about some aspects of a system’s behaviour.
• A way of abstracting from reality.• Aspects that we need to capture include:
– Process Interaction – Failure– Security
Managing concurrency and failure underlies many of the problems we face!
20 Apr 2023 COMP28112 Lecture 3 24
Factors affecting process interaction
• Performance of communication channels
• Computer Clocks and Timing Events
• Two variants of the process interaction model:– Synchronous systems:
• Process Execution Speeds: has known lower and upper bound
• Message transmitted delay: bounded
• Clock drift rates: drift rate from real time has a known bound
– Asynchronous systems:• All the above may take an arbitrarily long time.
20 Apr 2023 COMP28112 Lecture 3 25
Event Ordering
I n s t r u c t o r ’ s G u i d e f o r C o u l o u r i s , D o l l i m o r e a n d K i n d b e r g D i s t r i b u t e d S y s t e m s : C o n c e p t s a n d D e s i g n E d n . 4 © P e a r s o n E d u c a t i o n 2 0 0 5
F ig u r e 2 . 8R e a l - t im e o r d e r in g o f e v e n t s
send
receive
send
receive
m 1 m 2
2
1
3
4X
Y
Z
Phys ical time
Am 3
receive receive
send
receive receive receivet1 t2 t3
receive
receive
m 2
m 1
20 Apr 2023 COMP28112 Lecture 3 26
Failures in distributed systems
• What can go wrong?– (see Figure 2.10 in Coulouris)
• How to mask failures?– Read about checksums in network protocols
20 Apr 2023 COMP28112 Lecture 3 27
In Summary...• Different Architectures have different solutions
• Managing Concurrency, Failures, and Security underlies many of the problems we face.
• Reading:– Coulouris, Chapter 2; Tanenbaum, Sec. 2.1, 2.2 (skim through the rest
of Chapter 2)
– Read the text associated with the figures from Coulouris et al and Tanenbaum et al textbooks that are shown in this handout.
• Next time: Remote procedure calls.