This document summarizes key aspects of distributed system architecture from Chapter Two. It discusses software and system architectures, architectural styles including layered, object-based, data-centered, and event-based. It also covers centralized architectures like client-server and multi-tiered architectures. Decentralized architectures through vertical and horizontal distribution are described as well. Specific examples like internet search engines and stock broker systems are provided to illustrate architectural concepts.
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
DADIMOS College Introduction to Distributed Systems Chapter Two Architectural Styles
1. DADIMOS College
Department of Computer Science
Introduction to Distributed System
Chapter Two
Architecture
By Kelil Mohammed
2. Introduction
Distributed systems are often complex pieces of
software, of which the components are by definition
dispersed across multiple machines
The organization of distributed systems is mostly about
the software components that constitute the system.
Software Architectures
describe the organization and interaction of software
components; focuses on logical organization of
software (component interaction, etc.)
6/22/2023 By Kelil M. 2
3. Introduction…cont’d
System Architectures
describe the placement of software components on
physical machines
The realization of an architecture may be centralized
(most components located on a single machine),
decentralized (most machines have approximately the
same functionality), or hybrid (some combination).
• i.e., System Architecture can be realized in:
Centralized or
Decentralized or
Hybrid
6/22/2023 By Kelil M. 3
4. Architectural style
Architectural style is formulated in terms of
components, the way that components are
connected to each other, the data exchanged between
components, and finally how these elements are
jointly configured into a system.
is the logical organization of distributed systems into
software components
6/22/2023 By Kelil M. 4
5. Architectural style…cont’d
A component is a modular unit with well-defined
interfaces that is replaceable and reusable within its
environment
A connector is a mechanism that mediates
communication, coordination, or cooperation among
components
e.g., facilities for RPC(remote procedure call),
message passing, or streaming data
In other words, a connector allows for the flow of
control and data between components.
6/22/2023 By Kelil M. 5
6. Types of Architecture style
The basic idea of architectural style is to organize
logically different components, and distribute those
components over the various machines.
Layered architectures
Object-based architectures
Data-centered architectures
Event-based architectures
6/22/2023 By Kelil M. 6
7. Layered Architecture
Each layer uses previous layer to implement new
functionality that is exported to the layer above.
Components are organized in a layered fashion where a
component at layer N is allowed to call components at
the underlying layer N-1, but not the other way around;
e.g., network layers
The advantage of using this approach is that, the calls
always follow a predefined path, and that components in
each layer can be easily replaced or modified without
affecting the entire architecture.
6/22/2023 By Kelil M. 7
9. Object Based Architecture
Each of the components are referred to as objects where
each object can interact with other objects through a given
connector or interface.
Each objects are connected through a remote procedure call
(RPC) mechanism (client-server paradigm)
component = object
connector = RPC or RMI
6/22/2023 By Kelil M. 9
10. Data Centered Architecture
based on a data center, where the primary communication
happens via a central data repository.
This common repository can be either active or passive.
this is more like a producer consumer problem.
communication between objects happen through this shared
common storage.
This supports different components (or objects) by providing
a persistent storage space for those components (such as a
MySQL database).
All the information related to the nodes in the system are
stored in this persistent storage.
6/22/2023 By Kelil M. 10
12. Event Based Architecture
Components communicate through the propagation of
events
When an event is generated, it will be sent to the bus
system.
With this, everyone else will be notified telling that
such an event has occurred.
So, if anyone is interested, that node can pull the event
from the bus and use it.
Sometimes these events could be data, or even URLs to
resources.
So the receiver can access whatever the information is
given in the event and process accordingly.
6/22/2023 By Kelil M. 12
14. Event Based…cont’d
Publish/subscribe approach:
For distributed systems, event propagation is generally
associated with what are known as publish/subscribe
systems
components (processes) can publish events and
subscribe to events
Events are delivered to subscriber once published by
publisher
Processes publish events after which the middleware
ensures that only subscribed processes will receive
them.
6/22/2023 By Kelil M. 14
15. Event Based…cont’d
Decoupled in space:
communicating components need not explicitly refer to each
other
Coupled in time:
communicating components must execute at the same time
Event Based architectural style is based on the publisher-
subscriber architecture.
Between each node there is no direct communication or
coordination.
Instead, objects which are subscribed to the service
communicate through the event bus.
6/22/2023 By Kelil M. 15
16. Event Based…cont’d
The event based architecture supports, several communication
styles.
Publisher-subscriber
Broadcast
Point-to-Point
Decouples sender & receiver; asynchronous communication
An event can be defined as "a significant change in state".
For example, when a consumer purchases a car, the car's
state changes from "for sale" to "sold". A car dealer's system
architecture may treat this state change as an event to be
produced, published, detected and consumed by various
applications within the architecture.
6/22/2023 By Kelil M. 16
17. Event Based…cont’d
The major advantages of event-based architecture is that
the Components are decoupled in space - loosely coupled.
They need not explicitly refer to each other.
For example, If we have an alarm system that records
information when the front door opens, the door itself
doesn't know that the alarm system will add information
when the door opens, just that the door has been
opened.
6/22/2023 By Kelil M. 17
18. System Architecture
The logical organization of distributed systems into
software components or how are components organized
in a system
Deciding on software components, their interaction, and
their placement leads to an instance of a software
architecture, also called a system architecture.
6/22/2023 By Kelil M. 18
19. Centralized Architectures
Client Server Architecture
Based on client-server interaction/request-reply behaviour.
Server: is a process that implements a service.
example: file system service, database service).
Client: is a process that requests a service from a server.
6/22/2023 By Kelil M. 19
20. Cont’d…
Communication between a client and a server can be
implemented by means:
Simple connectionless protocol
Connection oriented protocol.
Connectionless protocol:
A client/server communication can be by a connectionless
protocol if the underlying network is fairly reliable; efficient
since there is no much overhead
But assuring reliability is difficult
the client cannot detect whether the original request
message was lost, or that transmission of the reply failed.
6/22/2023 By Kelil M. 20
21. 6/22/2023 By Kelil M. 21
Connection oriented protocol:
A client/server communication can be by connection-
oriented protocol if the underlying network is unreliable
Establishing and terminating connections is expensive
Not entirely appropriate in a local-area network due to
relatively low performance
Works perfectly fine in wide-area network.
Relatively costly, especially when request/reply messages
are small.
Example: TCP/IP connections
22. The Client /Server architecture has a centralized security
database.
This database contains security details like credentials and
access details.
Users can't log in to a server, without the security
credentials.
So, it makes this architecture a bit more stable and secure
than Peer to Peer.
The stability comes where the security database can allow
resource usage in a much more meaningful way.
But on the other hand, the system might get slow, as the server
only can handle a limited amount of workload at a given time.
6/22/2023 By Kelil M. 22
23. Advantages and Disadvantages of centralized
System Architecture
Advantages:
Easier to Build and Maintain
Better Security
Stable
Disadvantages:
Single point of failure
Less scalable
6/22/2023 By Kelil M. 23
24. Application Layering
No clear distinction between a client and a server; for
instance a server for a distributed database may act as a
client when it forwards requests to different file servers
Many client‐server applications are organized into three
layers:
The user-interface level
The processing level
The data level
6/22/2023 By Kelil M. 24
25. Application Layering …
User‐interface level: contains user interface applications
character based screen (CLI) or graphical window (GUI)
Processing level: contains the core functionality of the
application.
Data level: contains the data (database or file system) that a
client wants to manipulate through the application.
It is responsible for keeping data consistent across different
applications
example: bank case
6/22/2023 By Kelil M. 25
26. 6/22/2023 By Kelil M. 26
Example 1. The general organization of an Internet search
engine into three different layers shown on slide #25
Interface: type in a keyword string
Processing level: processes to generate DB queries,
rank replies, format response
Data level: database of web pages
28. Cont’d...
Example 2. Stock broker's decision support system
Interface: likely more complex than simple search
Processing: programs to analyze data; rely on
statistics, AI perhaps, may require large simulations
Data level: DB of financial information
Example 3. Desktop "office suites"
Interface: access to various documents, data,
Processing: word processing, database queries,
spreadsheets,.
Data : file systems and/or databases
6/22/2023 By Kelil M. 28
29. Multi-Tiered Architectures
• Single-tiered: dumb terminal/mainframe configuration
• Two-tiered: client/single server configuration
• Three-tiered: each layer on separate machine
Physically Two-Tired architecture
6/22/2023 By Kelil M. 29
30. Cont’d...
The server tier in two-tiered architecture becomes more and
more distributed
A single server is no longer adequate for modern information
systems
This leads to three-tiered architecture
• Server may acting as a client
6/22/2023 By Kelil M. 30
31. Decentralized Architectures
Vertical distribution: is achieved by placing logically different
components on different machines.
It splits up a server’s functionality over multiple computers
Improves scalability
Horizontal distribution: replicates a server’s functionality over
multiple computers
Avoids single- point of failure and allows load balancing
Improves scalability and reliability
• E.g., replicated web server
Read about the different approaches of peer-to-peer
6/22/2023 By Kelil M. 31
======= End of Chapter Two ======