Professional Documents
Culture Documents
Prerequisite:None
Operating Systems) Knowledge of
Java, C/C++ programming
Textbook and Course Material
Distributed Systems:
Principles and Paradigms, 3/e,
Andrew S. Tanenbaum,
Maarten van Steen, ISBN 0-13-
239227-5, Prentice Hall, 2017.
e-learning platform
Assignment and Project submissions
Learning outcomes
Students who complete this course successfully are
expected to:
gain extensive knowledge on principles and concepts of
distributed computing systems including the middleware,
peer-to-peer distributed algorithms, communication,
coordination, consistency, replication and fault-tolerance.
understand key mechanisms and models for distributed
system design and analysis.
learn how to implement and evaluate distributed services
using software tools and distributed platforms.
practice with design and implementation of distributed
cloud services and algorithms.
4
Course Components
Observation
Aiming at full distribution transparency may be too much:
There are communication latencies that cannot be hidden
Completely hiding failures of networks and nodes is (theoretically and
practically) impossible
You cannot distinguish a slow computer from a failing one
You can never be sure that a server actually performed an operation
before a crash
Full transparency will cost performance, exposing distribution of the
system
Keeping replicas exactly up-to-date with the master takes time
Immediately flushing write operations to disk for fault tolerance
Degree of distribution transparency
Design Goal 3: Openness of Distributed
Systems
Policies vs Mechanisms
On Strict Separation b/n Policy and
Mechanism
Design Goal 4: Scale in Distributed
Systems
Size Scalability
Formal Analysis
Formal Analysis of Size scaling problem
Formal Analysis
Problem with Geographical Scaling
Problem with Administrative Scaling
Techniques for scaling
Observation
If we can tolerate inconsistencies, we may reduce the need for global
synchronization, but tolerating inconsistencies is application dependent.
Architecture Styles
(Self Study)
Architectural styles
Basic idea
A style is formulated in terms of
(replaceable) components with well-defined interfaces
the way that components are connected to each other
the data exchanged between components
how these components and connectors are jointly configured into a
system.
Connector
A mechanism that mediates communication, coordination, or cooperation
among components. Example: facilities for (remote) procedure call,
messaging, or streaming.
40
Styles of Architecture Cont.
• Layered Architecture
• Object Oriented and Service Oriented
• RESTful architectures
• Publish-subscribe architectures
Layered architecture
Different layered organizations
Request/Response
downcall One-way call
Handle
Upcall
Layer N-2
Layer N-2
Layer 2
Layer N-3
Layer 1
Observation
This layering is found in many distributed information systems, using traditional
database technology and accompanying applications.
Application Layering
User-interface
User interface
level
HTML page
Keyword expression containing list
HTML
generator Processing
Query Ranked list level
generator of page titles
Ranking
Database queries algorithm
State
Object Object
Method
Method call
Object
Object
Object
Interface
Encapsulation
Objects are said to encapsulate data and offer methods on that data without
revealing the internal implementation.
RESTful architectures
Essence
View a distributed system as a collection of resources, individually managed by
components. Resources may be added, removed, retrieved, and modified by (remote)
applications.
1. Resources are identified through a single naming scheme
2. All services offer the same interface
3. Messages sent to or from a service are fully self-described
4. After executing an operation at a service, that component forgets everything about
the caller
Basic operations
Operation Description
PUT Create a new resource
GET Retrieve the state of a resource in some representation
DELETE Delete a resource
POST Modify a resource by transferring a new state
Example: Amazon’s Simple Storage
Service
Essence
Objects (i.e., files) are placed into buckets (i.e., directories). Buckets cannot be
placed into buckets. Operations on ObjectName in bucket BucketName require
the following identifier:
http://BucketName.s3.amazonaws.com/ObjectName
Typical operations
All operations are carried out by sending HTTP requests:
Create a bucket/object: PUT, along with the URI
Listing objects: GET on a bucket name
Reading an object: GET on a full URI
Publish-Subscribe Architectures
Subscribe Notification
Publish Subscribe Data
delivery
delivery
Event bus
Publish
Component
System
Architectures
• Centralized
• Distributed
Centralized Architectures
Multi-tiered Centralized Architectures
terminal only displays whatever server
sends
client can send requests
in 3-tiered,
separate these
two
Being client and server at the same time
Alternative organizations
data sharding