Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
Architecture
- f distributed systems
Netzprogrammierung (Algorithmen und Programmierung V)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
Architecture of distributed systems Netzprogrammierung - - PowerPoint PPT Presentation
Architecture of distributed systems Netzprogrammierung (Algorithmen und Programmierung V) Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16 Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16 Our
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
Netzprogrammierung (Algorithmen und Programmierung V)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
2
Physical model Architectural model
Fundamental model
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
3
Physical model
networks
Architectural model
performed by computational elements
Fundamental model
model
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
4
Widely varying mode of use
some web pages are accessed several million times a day
computers
bandwidth and low latency, e.g. multimedia applications
Wide range of system environments
networks
Internal problems
External threats
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
5
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
6
A physical model is a representation of the underlying hardware elements of a distributed system that abstracts from specific details of the computer and networking technologies employed.
Baseline physical model
computers communicate and coordinate their actions only by passing messages
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
7
usage of local area networking technologies
LAN, with limited Internet connectivity and supported services (e.g., shared local printer, file servers)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
8
intranet ISP desktop computer: backbone satellite link server: ☎ network link: ☎ ☎ ☎
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
9
such as CORBA and Web Services
interoperation
pools of nodes that together provide a given service
where computers are embedded in everyday objects and the surrounding environment (washing machines)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
10
Emergence of ultra-large-scale (ULS) distributed systems Complex systems consisting of a series of subsystems that are systems in their own right and that come together to perform particular task or tasks Example: environmental management system for flood prediction
environmental parameters (running complex event processing)
simulations)
http://www.sei.cmu.edu/library/assets/ULS_Book20062.pdf Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
11
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
12
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
13
An architectural model of a distributed system simplifies and abstracts the functions of the individual components of a distributed system. It deals with the
and
communicate with each other
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
14
What are the entities that are communicating in the distributed system? How do they communicate, or, more specifically, what communication paradigm is used? What (potentially changing) roles and responsibilities do they have in the
How are they mapped on the physical distributed infrastructure (what is their placement)?
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
15
Architectural elements
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
16
In distributed systems the entities that communicate are typically processes. Exceptions:
systems does not provide any abstractions, therefore nodes communicate
threads, so threads are more the endpoints of communications
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
17
Objects
decomposition for the problem domain
Components
via interfaces
function Web services
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
18
Architectural elements
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
19
Interprocess communication Remote invocation Indirect communication
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
20
processes in distributed systems including message parsing-primitives
(socket programming) and support for multicast communication
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
21
Covering a range of techniques based on a two-way exchange between communicating entities Resulting in the calling of a remote operation, procedure or method
underlying message-parsing service to support client- server computing
remote computers can be called as if they are procedures in the local address space
method in a remote object
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
22
Covering a range of techniques based on a two-way exchange between communicating entities Resulting in the calling of a remote operation, procedure or method
parsing service to support client-server computing
called as if they are procedures in the local address space
Direct Communication:
between sender and receiver
to the associated receivers
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
23
Group communication
Publish-subscribe-systems
items of interest (events) to a similarly large number of consumers (subscribers)
Message queues
send messages to a specified queue and consumer processes can receive messages from the queue or being notified
Indirect Communication Techniques
sending to (space uncoupling)
in the same time (time uncoupling)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
24
Group communication
Publish-subscribe-systems
items of interest (events) to a similarly large number of consumers (subscribers)
information to consumers
Message queues
send messages to a specified queue and consumer processes can receive messages from the queue or being notified
Further: Tuple Spaces, Distributed Shared Memory, …
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
25
Two kinds of group communication:
Used for:
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
26
in
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
27
What are the entities that are communicating in the distributed system? How do they communicate, or, more specifically, what communication paradigm is used? What (potentially changing) roles and responsibilities do they have in the overall architecture? How are they mapped on the physical distributed infrastructure (what is their placement)?
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
28
Architectural elements
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
29
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
30
Roles and responsibilities
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
31
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
32
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
33
Client-server offers a direct, relatively simple approach to the sharing of data and
➥ But it scales poorly The centralization of service provision and management implied by placing a service at a single address does not scale well beyond the capacity of the computer that hosts the service and the bandwidth of its connections. Even though, there a several variations of the client-server architecture to respond to this problem but none of them really solve it. There is a need to distribute shared resources much more widely in order to share the computing and communication loads amongst a much larger number of computers and network links.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
34
Roles and responsibilities
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
35
processes running on separate computers
servent
depends entirely on application requirements
for accessing objects are distributed across computers and network links
to further distribute the load and to provide resilience in the event of disconnection of individual computers
computers is more complex then in client- server architecture
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
36
What are the entities that are communicating in the distributed system? How do they communicate, or, more specifically, what communication paradigm is used? What (potentially changing) roles and responsibilities do they have in the overall architecture? How are they mapped on the physical distributed infrastructure (what is their placement)?
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
37
Architectural elements
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
38
Option 1
service is based and distribute them between themselves
manages it own set of resources
Option 2
A service provided by multiple servers
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
39
A cache is a store of recently used data objects that is closer to the objects
proxy server that can be shared by several clients. Process
some existing objects if necessary
up-to-date copy
Web proxy server
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
40
A typical well-known and widely-used example for mobile code are applets.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
41
A mobile agent is a running program (both code and data) that travels from
behalf, e.g. collecting information. Benefits agents provide for creating distributed systems (Lange & Oshima, 1999)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
42
What are the entities that are communicating in the distributed system? How do they communicate, or, more specifically, what communication paradigm is used? What (potentially changing) roles and responsibilities do they have in the overall architecture? How are they mapped on the physical distributed infrastructure (what is their placement)?
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
43
Architectural models
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
45
Applications, services Middleware Operating system Computer and network hardware Platform
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
48
Multi-Tier / n-tier: An extension of the client-server architecture Distributes the traditional server functionality over multiple servers 3-tier Architecture: composed of presentation tier, domain logic tier, data storage tier
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
49
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
50
Involves replicating a server’s functionality over multiple computers Typical example: replicated Web server
pages
fashion Is used to improve scalability (by reducing the load on individual servers) and reliability (by providing redundancy)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
51
Decomposed a typical client-server application into three logical parts (3-tier)
Thin client implementation
server Fat client implementation
Implementations in between will split up the interface or application logic parts over the clients and server in different ways.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
52
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
53
Questions that should be addressed by a system model
Aspects of distributed systems that are considered are Interaction Failure Security
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
54
Fundamental models
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
55
Latency
beginning of its receipt by another
destination
sending and the receiving processes
Bandwidth
given time.
Jitter
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
56
Synchronous distributed systems
The following bounds are defined:
a process has known lower and upper bounds
a channel is received within a known bounded time.
whose drift rate from real time has known bound.
Asynchronous distributed system
There are no bounds on:
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
57
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
58
Fundamental models
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
59
The failure model defines ways in which failure may occur in
Taxonomy of failures of processes and communication channels (Hadzilacos & Toueg, 1994)
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
60
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
61
Class of failure Affects Description Fail-stop Process Process halts and remains halted. Other processes may detect the state. Crash Process Process halts and remains halted. Other processes may not be able 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 a send operation but the message is not put in its outgoing message buffer. Receive-omission Process A message is put in a process’s incoming message buffer but that process does not receive it.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
62
Often called Byzantine failure. This is the worst possible failure semantics, in which any type of error may
Example of an arbitrary failure of a process
processing steps Example of an arbitrary failure of a communication channel
delivered or real messages may be delivered more than once
sequence numbers to detect nonexistent and duplicated messages
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
63
Class of Failure Affects Description Clock Process Process’s local clock exceeds the bounds on its rate of drift from real time. Performance Process Process exceeds the bounds on the interval between two steps. Performance Channel A message’s transmission takes longer than the stated bound.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
64
Fundamental models
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
65
The security of a distributed system can be archived by securing the processes and the channels used for their interactions and by protecting the objects that they encapsulate against unauthorized access.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
66
Access rights are used to specify who (Principal) is allowed to perform the
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
67
Threats to processes
can not tell the principal’s identity behind an invocation
receives the result from an invocation but it is not sure if this is from the intended server
Threats to communication channels
messages as they travel across the network -> Threat to privacy and integrity of information
messages and reply them later, e.g. an invocation message requesting transferring a sum of money from one bank account to another
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
68
Cryptography and shared secrets
proves the senders knowledge of this secret
Authentication
Encryption and authentication are used to build secure channels on top of existing communication services.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
69
Descriptive models for distributed system design Architectural model
Physical model Architectural elements Communicating entities Communication paradigm Roles and res- ponsibilities Placement
Inter-process communication Remote invocation Indirect communication Processes Objects Components Web Services TCP sockets UDP sockets Multi- cast Architectural styles Client-server Peer-to-peer
Multiple server
Proxy/Cache Mobile code
Architectural patterns Fundamen- tal model
Vertical distribution Horizontal distribution Multi-tier Thin/Fat Client Interaction model Failure model Security model
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
70
c/s systems
asynchronous distributed system
distributed computing
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
71
use of descriptive models. Define “Physical Model”, “Architectural Model” and “Fundamental Model”.
paradigm is used? Explain inter-process communication, direct remote invocation and indirect communication.
(what is their placement)?
the elements of the system. What are differences of a synchronous distributed system and asynchronous distributed system in the interaction model?
Discriminate timing failures, omission failures and arbitrary failures (Byzantine failures).
correct operation or to steal its data.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
72
Next class
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16
73
Main resource for this lecture: George Coulouris, Jean Dollimore, Tim Kindberg: Distributed Systems: Concepts and
Further readings Danny B. Lange and Mitsuru Oshima. 1999. Seven good reasons for mobile agents.
Vassos Hadzilacos and Sam Toueg. 1994. A Modular Approach to Fault-Tolerant Broadcasts and Related Problems. Technical Report. Cornell University, Ithaca, NY, USA.
Barry Linnert, linnert@inf.fu-berlin.de, Netzprogrammierung WS 2015/16