Architectural models of distributed systems. • placement ... Selected drawings
taken from Coulouris, Dollimore and Kindberg. Distributed ... Presentation
Protocol.
Middleware and Distributed Systems System Models Dr. Martin v. Löwis
Freitag, 14. Oktober 11
System Models (Coulouris et al.) • Architectural models of distributed systems • placement of parts and relationships between them • e.g. client-server, peer-to-peer • Fundamental models • formal description of properties common to all architectural models • addresses correctness, reliability, and security • Selected drawings taken from Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design, Edition 4, © Pearson Education 2005
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
2
MvL 2011
Architectural Models • placement of components across a network of computers • define useful patterns for the distribution of data and workload • interrelationships between components • functional roles, patterns of communication • abstraction: server processes, client processes, peer processes • variation of models, e.g. for client-server architecture • define mobile code to have some part of the application run on the client • support mobile clients to allow matching of clients and servers dynamically
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
3
MvL 2011
Software Layers © Pearson Education 2005
Application Services Middleware Operating System Computer and network hardware
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
4
}
Platform
MvL 2011
Protocol Layers: OSI-RM Application Protocol Application Interface Presentation Interface Session Interface Transport Interface Network Interface Data Link Interface Physical
Presentation Protocol Session Protocol Transport Protocol
Presentation Interface Session Interface
Network Protocol
Transport Interface
Data Link Protocol
Network Interface
Physical Protocol
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
Application Interface
Data Link Interface Physical
5
MvL 2011
Client - Server Model • Client: consumer process, uses remote services / information • Server: provider process, offers a service / information • may in turn be client of another server
© Pearson Education 2005
Server
Client Server
Node Process
Client System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
6
MvL 2011
• potentially large number of participants
Peer 2
Peer 1
• often, home users • communication pattern varies over time
© Pearson Education 2005
Application
Application Peer 3
Sharable objects
Application
• replication necessary to provide resilience in the event of disconnection
Peer 4 Application Peers 5 .... N
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
7
MvL 2011
Variation: Services provided by multiple servers • Services provided by multiple servers Service
© Pearson Education 2005
Server Client
Server
Client Server
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
8
MvL 2011
Variation: Proxy Servers and Caches © Pearson Education 2005
Web server
Client Proxy server
Web server
Client
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
9
MvL 2011
Variation: Mobile Code © Pearson Education 2005
a) client request results in the downloading of applet code
Client Applet code
Web server
b) client interacts with the applet
Client
Applet
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
Web server
10
MvL 2011
Variation: Mobile Agent • running program is moved from node to node (with both code and data) • security challenge to the server: client gets hold of the entire state of the agent • only have non-secret data in the agent • security challenge to the client: client node runs arbitrary server-defined code • need to establish trust in agent code • need to restrict agent's access to local resources (sandboxing)
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
11
MvL 2011
Variation: Thin Clients • Client performs just I/O, no computation © Pearson Education 2005
Compute server
Network computer or PC Thin Client
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
Application Process
network
12
MvL 2011
Interfaces and Objects • Set of operations offered by a process is defined by its interface • more precisely: set of messages it is able to send and receive • often formally specified in interface definitions • object-oriented middleware applications: interfaces get implemented by classes
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
13
MvL 2011
Design Requirements for Distributed Architectures • Various objectives for creation of distributed systems • sharing of computational resources (e.g. cluster computing) • sharing of data • sharing of services • Performance issues: responsiveness, throughput, load balancing • Quality of Service (QoS): reliability, security, performance, adaptability, timecritical data • Dependability: correctness, security, fault tolerance, (maintainability) • Caching and Replication
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
14
MvL 2011
Fundamental Models • Model: abstraction of essential properties of a natural phenomenon, for the purpose of understanding and analysis • make explicit all relevant assumptions • make generalizations concerning what is possible or impossible • Models of distributed systems: Reasoning about • Interaction (e.g. communication involves delays) • Failure (node and network failure threatens correct operation of system) • Security (consider attacks by both internal and external agents)
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
15
MvL 2011
Interaction • Notion of distributed algorithm: • each node has a set of data, and runs a program • state of each node not accessible to any other node • nodes interchange messages • assume that all activity in the system is driven by message reception (may need to consider system boundaries specially) • relative speed of nodes should assumed to be unknown • performance of network: latency, bandwidth, jitter • each node has its own internal clock • with specific drift rate - clock synchronization is necessary System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
16
MvL 2011
Interaction (cntd.) • two variants of interaction: synchronous and asynchronous • synchronous systems: • known lower and upper time bound for each execution step, for each message transmission, and for the clock drift • consequence: can introduce a pulsed execution system • practically difficult to build, may help in simplifying analysis • asynchronous systems: messages can arrive and be sent at any time • event ordering: can usually assume no relative order of reception wrt. sending of messages • exception: messages sent on an order-preserving channel System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
17
MvL 2011
Interaction: Lamport's "Logical Time" (1978) • happens-before relation: e1 happens before e2, iff • e1 is executed by the same process before e2, or • e1 is a send operation, and e2 is the corresponding receive operation, or • there is an e3 such that e1 happens before e3, and e3 happens before e2 • logical time: Assign a number L to each event, such that L(e1) < L(e2) if e1 happens before e2
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
18
MvL 2011
Logical Time (cntd.) © Pearson Education 2005
send X
1
receive m1 2 receive
Y
receive
4 send 3
m2
receive
Physical time
send
Z
receive
receive m3
A t1
Freitag, 14. Oktober 11
m2
receive receive receive t3
t2
System Models | Middleware and Distributed Systems
m1
19
MvL 2011
Failure Model • Omission Failures: process or channels fails to perform an operation • process omission failure (e.g. crash failure) • fail-stop: other processes can detect crash (requires guaranteed delivery of messages) • communication omission failures (message drop) • Arbitrary Failures (Byzantine failure): anything may happen • Timing Failures: • synchronous system: activities not completed within pulse • real-time systems: activity not completed within promised time
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
20
MvL 2011
Failure Model (cntd.) • Masking failures: reconstruct reliable services on top of unreliable ones • through retries, error correction, ... • Reliability of one-to-one communication: • validity (messages are eventually delivered to the receiver) • integrity (received message identical to sent one, and no message is delivered twice)
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
21
MvL 2011
Security Model • securing processes and channels against unauthorized access • protecting objects: access rights given to a principal • assumption of an enemy (aka adversary), capable of (threat model) • sending messages to any process • reading and copying any message between a pair of processs • enemy may operate either legitimitely-connected node, or illegal node
System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
22
MvL 2011
Security Model (cntd.) • threat to processes: may receive messages sent by enemy • may not be able to reliably determine identity of sender • server: may not be able to identify principal • client: may fall to "spoofing" • Threats to communication channels: enemy may • copy, alter, inject, or delete messages • gain information only intended for the communication partner • Other threats: denial of service, trojan horses, ... • Defeating security threats: cryptography, authentication, secure channels System Models | Middleware and Distributed Systems Freitag, 14. Oktober 11
23
MvL 2011