Download Introduction to Distributed Systems

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Distributed firewall wikipedia , lookup

Service-oriented architecture implementation framework wikipedia , lookup

Distributed operating system wikipedia , lookup

Transcript
Introduction
Distributed Systems
Goals of Distributed Systems
Hardware and Software Concepts
Client-Server Model
CS-495 Distributed Systems
Fabián E. Bustamante, Winter 2004
Distributed System
A distributed system is a collection of (1)
independent computers that (2) appears to its
users as a single coherent system.
e.g.
NOW
Workflow information system
WWW
CS-495 Distributed Systems
2
Goals
To make them worth the effort
– Connecting users and resources
• make easy to access remote resources &
• share them in a controlled way
– Transparency – hide the fact that resources are distributed
– Openness – so that they can be
• Applications can be portable
• Different implementations can interoperate
• DS are flexible and extensible
– Scalability – world-wide connectivity
• Scalable in
– Size - # of users/resources
– Geographic span
– Administratively
CS-495 Distributed Systems
3
Transparency
Kinds of transparency
Transparency
Description
Access
Hide differences in data representation and how a resource is accessed
Location
Hide where a resource is located
Migration
Hide that a resource may move to another location
Relocation
Hide that a resource may be moved to another location while in use
Replication
Hide that a resource may be shared by several competitive users
Concurrency
Hide that a resource may be shared by several competitive users
Failure
Hide the failure and recovery of a resource
Persistence
Hide whether a (software) resource is in memory or on disk
Degree of transparency
CS-495 Distributed Systems
4
Scalability
Impediments to scalability
Concept
Example
Centralized services
A single server for all users
Centralized data
A single on-line telephone book
Centralized algorithms
Doing routing based on complete information
CS-495 Distributed Systems
5
Scaling Techniques
Hiding communication latency – avoid waiting for
responses to remote service request when possible
– Asynchronous communication
– Reduce overall communication
Distribution – split a component into parts & distribute
them across the system
Replication
– Increase availability
– Helps balance the load
– May hide communication latency
CS-495 Distributed Systems
6
Hardware Concepts
Single address space
shared by all
Multiprocessors
Multicomputers
CS-495 Distributed Systems
7
Multiprocessors
Single address space shared by all
– Coherency is easy but scalability a problem
Solution – cache – now coherency is an issue
CS-495 Distributed Systems
8
Multiprocessors – switch-based
Competition for the bus is still an issue
Switch-based systems?
– Crossbar switch & Omega switching network
CS-495 Distributed Systems
9
Multicomputers
Easier to build – problem is interconnection
– Homogenous – System Area Network
• Homogeneous nodes rack mounted and
• Interconnected by a high-performance network (e.g. grid,
hypercube)
– Heterogeneous – both in the nodes and the
interconnection network
• Problem – hiding heterogeneity is hard
CS-495 Distributed Systems
10
Software Concepts
OS for multicomputers/multiprocessors can be
divided in two categories
– Distributed OS – tightly-coupled systems
– Network OS – loosely-coupled systems
From a NOW, to get a distributed system you need
middleware
System
Description
Main Goal
DOS
Tightly-coupled operating system for multi-processors and
homogeneous multicomputers
Hide and manage
hardware resources
NOS
Loosely-coupled operating system for heterogeneous
multicomputers (LAN and WAN)
Offer local services to
remote clients
Middleware
Additional layer atop of NOS implementing generalpurpose services
Provide distribution
transparency
CS-495 Distributed Systems
11
Uniprocessor Operating Systems
OS for distributed systems and uniprocessors are very much
alike
– They act as resource managers for the underlying hardware
– Provide a virtual machine that hide the intricacies of the underlying
hardware
Part of enabling resource sharing is protecting apps from each
other
– Dual mode of operation – monolithic OSs
Microkernels
– Pros and cons
CS-495 Distributed Systems
12
Multiprocessors Operating Systems
From uniprocessors to multiprocessors – a
natural step
Protect OS data structures against concurrent
access to guarantee consistency
– Semaphores
– Monitors
CS-495 Distributed Systems
13
Multicomputer Operating Systems
No shared memory – communication through
message passing
You can
– Exposed message passing to application
– Hide it through distributed shared memory
CS-495 Distributed Systems
14
Distributed Shared Memory
Since MP seems to be more difficult to program for
Distributed Shared Memory
– AS divided into pages
– Pages distributed among
machines
Performance improvements
–
–
–
–
Replicate read-only pages
Replicate all pages
Weaker than strict consistency
Larger pages sizes →
potential problem of false sharing
CPU 1 references page 10
Page 10 is read only and
replication is used
CS-495 Distributed Systems
15
Network Operating System
Various machines interconnected; users can access
remote resources
No assumptions of
– Homogeneous underlying hardware
– Managed as a single system
Pros and Cons
– Harder to use
– Harder to manage
– Very easy to scale
CS-495 Distributed Systems
16
Middleware
Remember the definition of a distributed system
– Distributed OS – not intended to handle independent
machines
– Network OS – does not provide a view of a single coherent
system
Most distributed systems are built from NOS +
middleware
CS-495 Distributed Systems
17
Middleware Models and Services
To make development and integration simple – adopt a
paradigm
–
–
–
–
Everything is a file
Remote Procedure Calls
Distributed Objects
Distributed Documents
Services common to many middleware systems
–
–
–
–
–
Communication
Naming
Persistence
Distributed Transaction
Security
Middleware and openness
CS-495 Distributed Systems
18
Comparison between Systems
Item
Distributed OS
Multiproc.
Multicomp.
Network OS
Middlewarebased OS
a) Degree of transparency
b) Same OS on all nodes
c) Number of copies of OS
d) Basis for communication
e) Resource management
f) Scalability
g) Openness
a) High/Low
e) Global central/global distributed/per node
b) Yes/No
f) No/Yes/So-So
c) 1/N
g) Closed/Open
d) Shared memory/messages/files/model specific
CS-495 Distributed Systems
19
Comparison between Systems
Item
Distributed OS
Network OS
Middlewarebased OS
Multiproc.
Multicomp.
Degree of transparency
Very High
High
Low
High
Same OS on all nodes
Yes
Yes
No
No
Number of copies of OS
1
N
N
N
Basis for communication
Shared memory
Messages
Files
Model specific
Resource management
Global, central
Global, distributed
Per node
Per node
Scalability
No
Moderately
Yes
Varies
Openness
Closed
Closed
Open
Open
CS-495 Distributed Systems
20
Client-Server Model
Clients and Servers as a model for distributed
applications
Layering: general organization of an Internet search
engine into 3 different layers
CS-495 Distributed Systems
21
Multitiered Architectures
The three logical levels → many physical distributions
and potentially multiple tiers
Alternative client-server organizations
CS-495 Distributed Systems
22
Modern Architectures
Distribution can be
– Vertical – what we have seen so far
– Horizontal – distributing the clients and servers
themselves
• Distributed web server.
• P2P system
CS-495 Distributed Systems
23
Hints for Computer System Design
Why it helps?/
Where it helps?
Functionality
Speed
Fault-tolerance
Completeness
Separate normal & worst
case
Safety first
Shed load
End-to-End
End-to-End
Interface
Do one thing well
Don’t generalize
Get it right
Don’t hide power
Use procedure arguments
Leave it to the client
Keep basic interface stable
Keep a place to stand
Make it fast
Split resources
Static analysis
Dynamic translation
End-to-End
Log updates
Make actions atomic
Implementation
Plan to throw one away
Keep secrets
Use a good idea again
Divide and conquer
Cache answers
Use hints
Use brute force
Compute in background
Batch processing
Make actions atomic
Use hints
CS-495 Distributed Systems
24