distributed systems principles and paradigms reza rafeh arak university

32
Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Upload: julian-campbell

Post on 29-Dec-2015

228 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Distributed SystemsPrinciples and Paradigms

Reza RafehArak University

Page 2: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

1 INTRODUCTION1.1 DEFINITION AND CHARACTERISTICS OF A DISTRIBUTED SYSTEM 1.2 TYPES OF DISTRIBUTED SYSTEMS  2 ARCHITECTURES 2.1 ARCHITECTURAL STYLES 2.2 SYSTEM ARCHITECTURES  3 PROCESSES , THREADS, MIGRATION

4 COMMUNICATION 4.1 FUNDAMENTALS 4.2 Types of Communication 4.2.1 REMOTE PROCEDURE CALL 4.2.2 MESSAGE-ORIENTED COMMUNICATION 4.2.3 STREAM-ORIENTED COMMUNICATION 4.2.4 MULTICAST COMMUNICATION

5 NAMING 5.1 NAMES, IDENTIFIERS, AND ADDRESSES5.2 Structured Naming5.3 Attribute-Based Naming

Page 3: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

6 Synchronization 6.1 Clock Synchronization6.2 Logical Clocks6.3 Mutual Exclusion6.4 Global Positioning of Nodes6.5 Election Algorithms

7 Consistency and Replication 7.1 INTRODUCTION 7.2 DATA-CENTRIC CONSISTENCY MODELS 7.3 CLIENT-CENTRIC CONSISTENCY MODELS 7.4 REPLICA MANAGEMENT 7.5 CONSISTENCY PROTOCOLS

8 Fault Tolerance8.1 Introduction8.2 Process Resilience8.3 Reliable Client-Server Communication8.4 Reliable Group Communication8.5 Disturbed Commit8.6 Recovery

9 Security9.1 Introduction9.2 Secure Channels9.3 Access Control9.4 Security Management

Page 4: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

10 Disturbed Object-Based Systems 10.1 Architecture10.2 Processes10.3 Communication10.4 Naming10.5 Synchronization10.6 Consistency and Replication10.7 Fault Tolerance 10.8 Security

11 Disturbed File Systems 11.1 Architecture11.2 Processes11.3 Communication11.4 Naming11.5 Synchronization11.6 Consistency and Replication11.7 Fault Tolerance 11.8 Security

Page 5: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

12 Disturbed Web-Based Systems 12.1 Architecture12.2 Processes12.3 Communication12.4 Naming12.5 Synchronization12.6 Consistency and Replication12.7 Fault Tolerance 12.8 Security

13 Disturbed Coordination-Based Systems 13.1 Architecture13.2 Processes13.3 Communication13.4 Naming13.5 Synchronization13.6 Consistency and Replication13.7 Fault Tolerance 13.8 Security

Page 6: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Definition of a Distributed System (1)

A distributed system is:

A collection of independent computers that appears to its

users as a singlecoherent system.

Page 7: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Definition of a Distributed System (2)

A distributed system organized as middleware. The middleware layer extends over multiple

machines, and offers each application the same interface.

Page 8: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Motivation and Goals

• Making resources available– Systems should allow for efficient and controlled access to and sharing of distributed resources

• Hiding distribution– Systems should look as if only a single computer system is running

• Openness– Systems should offer services according to standard rules that describe the syntax and semantics of those Services

• Scalability– Systems should scale with respect to size, geography, and administrative boundaries

Page 9: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

FeaturesTransparency

Page 10: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Degree of Transparency

• A trade-off between a high degree of transparency and the performance of a system

• Full distribution transparency is simply impossible

Page 11: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Openness

• A system • Offer services according to standard rules• Such rules are formalized in protocols

• Interoperability• Different manufacturers can co-exist and work

together • Portability

• System A can be executed, without modification, on a different distributed system B

Page 12: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Scalability:Size scalable: easily add more users & recourses to the system

Geographically scalable: users & resources may lie far apart

Administratively scalable: it can still be easy to manage even if it spans independent administrative organizations

Page 13: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Scalability

Page 14: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Scalability

Characteristics of decentralized algorithms:

• No machine has complete information about the system state.

• Machines make decisions based only on local information.

• Failure of one machine does not ruin the algorithm.

• There is no implicit assumption that a global clock exists.

Page 15: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Scaling Techniques

• Three techniques for scaling• Hiding communication latencies• Distribution • Replication

Page 16: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Scaling Techniques (1)

1.4

The difference between letting:

a) a server or

b) a client check forms as they are being filled

Page 17: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Scaling Techniques (2)

1.5

An example of dividing the DNS name space into zones.

Page 18: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Pitfalls when Developing Distributed Systems

• The network is reliable.• The network is secure.• The network is homogeneous.• The topology does not change.• Latency is zero.• Bandwidth is infinite.• Transport cost is zero.• There is one administrator

Page 19: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Types of Distributed Systems: 

1- Distributed Computing Systems : Focus on computation Cluster Computing Systems Grid Computing Systems

2- Distributed Information Systems:Focus on interoperability Transaction Processing Systems Enterprise Application Integration (Exchange info via RPC or RMI)

3- Distributed Pervasive Systems (usually small, battery-powered systems, Mobile & wireless): Focus on mobile, embedded, communicating Home Systems (e.g. Smart phones, PDAs) Electronic Health care systems (Heart monitors, BAN: Body Area Networks) Sensor Networks (distributed Databases connected wirelessly)

Page 20: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Cluster Computing Systems

- Hooking up a collection of simple computers via high-speed networks to build a supercomputing environment - Mostly homogenous - Example: server clusters at Banks

Page 21: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Grid Computing Systems

- have a high degree of heterogeneity-Users and recourses from different organizations are brought together to allow collaboration (i.e. a V.O. = Virtual Organization) - Members belonging to the same V.O. have access rights to a common set of recourses (e.g. Police, FBI, and some local agencies may form a computing grid)

Page 22: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Transaction Processing Systems (1)

BEGIN_TRANSACTIONsalary1 = doctor1.getSalary()doctor1.setSalary(salary1 + bonus)salary2 = doctor2.getSalary()doctor2.setSalary(salary2 - bonus)END_TRANSACTION

Page 23: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Transaction Processing Systems (2)

Characteristic:• Atomic: The transaction happens

indivisibly.

• Consistent: The transaction does not violate system invariants.

• Isolated: Concurrent transactions do not interfere with each other.

• Durable: Once a transaction commits, the changes are permanent.

Page 24: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Transaction Processing Systems (3)

Page 25: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Transaction Processing Systems (4)

Page 26: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Enterprise Application Integration

-RPC (Remote Procedure Call) -RMI (Remote Method Invocation)

Page 27: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Distributed Pervasive Systems

• Embrace contextual changes• (a phone now is a web access device. A

device must continuously be aware of the fact that its environment may change)

• Encourage ad hoc composition• (used differently by different users, e.g.

PDA)

• Recognize sharing as the default• (easily read, store, manage, and share info)

Page 28: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Electronic Health Care Systems (1)

• Where and how should monitored data be stored?

• How can we prevent loss of crucial data?

• What infrastructure is needed to generate and propagate alerts?

• How can physicians provide online feedback?

• How can extreme robustness of the monitoring system be realized?

• What are the security issues and how can the proper policies be enforced?

Page 29: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Electronic Health Care Systems (2)

Monitoring a person in a pervasive electronic health care system, using (a) a local hub or - (b) a continuous wireless connection.

Page 30: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Sensor Networks (1)• How do we (dynamically) set up

an efficient tree in a sensor network?

• How does aggregation of results take place? Can it be controlled?

• What happens when network links fail?

Page 31: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Sensor Networks (2)

Organizing a sensor network database, while storing and processing data (a) only at the operator’s site or …

Page 32: Distributed Systems Principles and Paradigms Reza Rafeh Arak University

Sensor Networks (3)

Organizing a sensor network database, while storing and processing data … or (b) only at the sensors.