Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lect 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Lecture 2

Distributed Systems
Types and Architectures

By: Dr. Aymen J. Salman


2019-2020
Topics for Today

• Types of Distributed Systems


– Distributed Computing Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures

Source: Textbook: Distributed Systems 1.3.2 – 2.2

2
Types of Distributed Systems
High performance
distributed Distributed
computing Information
systems Systems

Distributed
Pervasive
Systems

3
High performance distributed
computing systems
• Parallel Computing
• Cluster Computing
• Grid Computing

4
Parallel computing
• High-performance distributed computing started with
parallel computing

• Multiprocessor and Multicore versus Multicomputer

5
Distributed shared memory systems
Observation: Example: Distributed Shared Memory (DSM)
1. Map all main-memory pages (from
Multiprocessors different processors) into one single
easier to program virtual address space.
than multicomputers, 2. If process at processor A addresses
page P located at processor B, the OS at
but have problems A traps and fetches P from B, just as it
when increasing the would if P had been located on local
disk.
number of processors
(or cores). Problem:
• Performance of DSM could never
Solution: Implement a compete with that of multiprocessors
shared-memory • Failed to meet the expectations of
model on top of a programmers.
multicomputer • Has been widely abandoned by now.

6
Cluster Computing
Essentially a group of high-end systems connected through a LAN
• Homogeneous: same OS, near-identical hardware
• Single managing node

7
Grid Computing
The next step: lots of nodes from everywhere:
• Heterogeneous
• Dispersed across several organizations
• Can easily span a wide-area network

Note
To allow for collaborations, grids generally use virtual
organizations. In essence, this is a grouping of users (or
better: their IDs) that will allow for authorization on
resource allocation.

8
Architecture for Grid Computing
Application: Contains actual grid
applications in a single organization.

Collective: Handles access to


multiple resources: discovery,
scheduling, replication.

Resource: Manages a single resource,


such as creating processes or reading
data.

Connectivity: Communication/transaction protocols,


e.g., for moving data between resources. Also
various authentication protocols.

Fabric: Provides interfaces to


local resources (for querying state
and capabilities, locking, etc.)

9
Grid’s History
• Was a hit about 10 years ago → Past its prime
• Divided into
– Cloud computing
– Edge/Fog Computing

10
Cloud Computing

11
Clouds: Four Layers
1. Hardware: Processors, routers, power and cooling systems.
Customers normally never get to see these.

2. Infrastructure: Deploys virtualization techniques. Evolves


around allocating and managing virtual storage devices and
virtual servers.

3. Platform: Provides higher-level abstractions for storage and


such.
– Example: Amazon S3 storage system offers an API for (locally
created) files to be organized and stored in “buckets”.

4. Application: Actual applications, such as office suites (text


processors, spreadsheet applications, presentation
applications). Comparable to the suite of apps shipped with
OSes.

12
Distributed
Information Systems

13
Integrating applications
Situation: Organizations have many networked applications,
but achieving interoperability is painful.
Basic approach:
• A networked application is one
that runs on a server making its
services available to remote Next step
clients. Allow direct application-
• Simple integration to- application
– Clients combine requests communication, leading
for (different) applications to Enterprise Application
– Send them Integration (EAI)
– Collect responses
– Present a coherent result to the user.

14
Example EAI: (Nested) Transactions
• Issue: All or nothing
Atomic Happens indivisibly (seemingly)
Consistent Does not violate system invariants
Isolated No mutual interference
Durable Commit means changes are
permanent

Primitive Description
BEGIN TRANSACTION Mark the start of a transaction
END TRANSACTION Terminate the transaction and try to commit
ABORT TRANSACTION Kill the transaction and restore the old values
READ Read data from a file, a table, or otherwise
WRITE Write data to a file, a table, or otherwise

15
Transaction Processing Monitor
Observation
In many cases, the data involved in a transaction is distributed across
several servers. A TP Monitor is responsible for coordinating the
execution of a transaction

16
Middleware and EAI
Problem
A TP monitor doesn’t separate apps from their databases.
Also needed are facilities for direct communication
between apps.

Middleware offers communication facilities for integration


• Remote Procedure Call (RPC): Requests are sent through local
procedure call, packaged as message, processed, responded through
message, and result returned as return from call.
• Message Oriented Middleware (MOM): Messages are sent to logical
contact point (published), and forwarded to subscribed applications.
17
How to integrate applications
• File transfer: Technically simple, but not flexible:
– Figure out file format and layout
– Figure out file management
– Update propagation, and update notifications.

• Shared database: Much more flexible, but still requires


common data scheme next to risk of bottleneck.

• Remote procedure call: Effective when execution of a


series of actions is needed.

• Messaging: RPCs require caller and callee to be up and


running at the same time. Messaging allows decoupling in
time and space.
18
Distributed Pervasive
Systems

19
Distributed Pervasive Systems
Observation
Emerging next-generation of distributed systems in which nodes are
small, mobile, and often embedded in a larger system characterized
by the fact that the system naturally blends into the user’s
environment.

Three (overlapping) subtypes


• Ubiquitous computing systems: pervasive and continuously present,
i.e., there is a continuous interaction between system and user.

• Mobile computing systems: pervasive, but emphasis is on the fact that


devices are inherently mobile.

• Sensor (and actuator) networks: pervasive, with emphasis on the


actual (collaborative) sensing and actuation of the environment.

20
Ubiquitous Computing Systems
Basic Characteristics:
• Distribution: Devices are networked, distributed, and accessible
in a transparent manner

• Interaction: Interaction between users and devices is highly


unobtrusive

• Context awareness: The system is aware of a user’s context in


order to optimize interaction

• Autonomy: Devices operate autonomously without human


intervention, and are thus highly self-managed

• Intelligence: The system as a whole can handle a wide range of


dynamic actions and interactions
21
Mobile Computing Systems
Distinctive features

Myriad of different mobile A device’s location changes


devices → smartphones, over time → change of local
tablets, GPS devices, services, reachability, etc.
remote controls, active
badges Keyword: discovery.

Communication may
become more difficult: no
stable route, also no
guaranteed connectivity
→ disruption-tolerant
networking
Keyword: Offline support

22
Mobility patterns
Issue Successful strategy
What is the relationship • Alice’s world consists of friends
and strangers.
between information
• Alice wants to get a message to
dissemination and Bob: Hand it out to all her friends
human mobility? • Friend passes message to Bob at
first encounter
Basic idea: When you
encounter someone, Observation:
exchange of information • This strategy works because
(pocket-switched (apparently) there are relatively
networks). closed communities of friends.

23
Sensor Networks

Characteristics
The nodes to which sensors are attached are:
• Many (10s-1000s)
• Simple (small memory/compute/communication
capacity)
• Often battery-powered (or even battery-less)

24
Sensor networks as distributed databases

25
So Far
• Types of Distributed Systems
– Distributed Computing Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures

26
Architectural Styles
Basic Idea
Organize into logically different components and distribute
those components over the various machines

(a) Layered style is used for client-server system


(b) Object-based style for distributed object systems (RESTful or SOAP
Architectures)
27
Architectural Styles
Observation
Decoupling processes (“anonymous”) and removing time
constraints (“asynchronous”) led to alternative styles.

(a) Publish/Subscribe [anonymous]


(b) Shared dataspace [anonymous and asynchronous]
28
So Far
• Types of Distributed Systems
– Distributed Computing Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures

29
Centralized Architectures
Basic Client-Server Model
Characteristics:
• There are processes offering services (servers)
• There are processes that use services (clients)
• Clients and servers can be on different machines
• Clients follow request/reply model with respect to using services

30
Application Layering
Traditional three-layered view
• User-interface layer contains units for an application’s
user interface
• Processing layer contains the functions of an application,
i.e. without specific data
• Data layer contains the data that a client wants to
manipulate through the application components

Observation
This layering is found in many distributed information
systems, using traditional database technology and
accompanying applications

31
Application Layering

32
Multi-Tiered Architectures
Single-tiered: dumb terminal/mainframe configuration
Two-tiered: client/single server configuration
Three-tiered: each layer on a separate machine

Traditional two-tiered configurations:

33
Decentralized Architectures
Observation
In the last couple of years we have been seeing a
tremendous growth in peer-to-peer systems
• Structured P2P: nodes are organized following a specific
distributed data structure
• Unstructured P2P: nodes have randomly selected
neighbors
• Hybrid P2P: some nodes are appointed special functions
in a well-organized fashion

Note
In virtually all cases, we are dealing with overlay networks:
data is routed over connections setup between the nodes
(via application level multicasting)
34
Conclusion
• Types of Distributed Systems
– Distributed Computing Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures

35

You might also like