![Page 1: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/1.jpg)
DISTRIBUTED SYSTEMS
CHAPTER 2
ARCHITECTURES
1
DR. TRẦN HẢI ANHTham khảo bài giảng của PGS. TS. Hà Quốc Trung
![Page 2: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/2.jpg)
2
Organization of a distributed system: distinction
between the logical organization and the physical
realization
The logical organization: the collection of software
components that constitute the system software
architecture
The physical realization: instantiate and place
software components on real machines system
architecture
![Page 3: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/3.jpg)
Outline3
1. Architectural styles
2. System architectures
3. Architectures versus Middleware
![Page 4: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/4.jpg)
1. Architectural styles4
![Page 5: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/5.jpg)
Architectural styles5
Layered architectures
Object-based architectures
Data-centered architectures
Event-based architectures
![Page 6: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/6.jpg)
1.1. Layered achitectures
Each layer has its own
task
Transparency
6
Layered fashion
![Page 7: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/7.jpg)
Layered architectures (con’t)7
Application
Presentation
Session
Transport
Network
Data link
Physical
OSI model
General DS architecture with Middleware
![Page 8: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/8.jpg)
1.2. Object-based architectures8
-Component: Object
- Connector: (Remote) Procedure
call
- Object Client & Object server
-E.g. CORBA
![Page 9: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/9.jpg)
1.3. Event-based architectures9
• Communicate through the
propagation of events (optionally
carry data)
• Publish/Subscribe systems
• Processes are loosely coupled
![Page 10: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/10.jpg)
1.4. Data-centered architecture 14
- Communicate
through a common
repository
![Page 11: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/11.jpg)
1.5. Microservices15
Monolithic microservices
build an application as a suite of small services, each running in its own process and are independently deployable.
Benefits:
Simpler To Deploy
Simpler To Understand
Reusability Across Business
Faster Defect Isolation
Minimized Risk Of Change
![Page 12: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/12.jpg)
Microservices17
![Page 13: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/13.jpg)
Microservices18
![Page 14: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/14.jpg)
Problem19
![Page 15: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/15.jpg)
Container Orchestration tools20
Amazon ECS (EC2 Container Service)
Azure Container Service (ACS)
Cloud Foundry’s Diego
CoreOS Fleet
Docker Swarm
Kubernetes
![Page 16: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/16.jpg)
Kubernetes21
API
K
K
K
KBs
Cluster
Services
Master nodeWorker
Worker
Worker
App1 config
Pod1:
+ Cont1
+ Cont2
Rep=3
Pod2:
+Cont3
Rep=2
P1-
R1
P1-
R2
P1-
R3
P2-
R1
P2-
R2
![Page 17: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/17.jpg)
I. Centralized architectures
II. Decentralized architectures
III. Hybrid architectures
2. System architectures22
![Page 18: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/18.jpg)
2.1. Centralized architectures23
2.1.1. Client-server architectures
2.1.2. Application layering
2.1.3. Multitiered architectures
![Page 19: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/19.jpg)
2.1.1. Client-server architecture24
-Client:
- Send the requests, receive the results, show to the users
-Server:
- Listen; receive the request, processing, reply
-Connected or unconnected
-Issues:
- Register the server
- Idempotent
- Stateful of Stateless server
![Page 20: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/20.jpg)
2.1.2. Application layering25
The user-interface level
The processing level
The data level
![Page 21: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/21.jpg)
Organization of a search engine26
![Page 22: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/22.jpg)
2.1.3. Multitiered architectures27
![Page 23: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/23.jpg)
28
![Page 24: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/24.jpg)
Cloud & Fog computing29
![Page 25: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/25.jpg)
2.2. Decentralized Architectures31
No role of client and server
Use Overlay network
Structured/Unstructured P2P architectures
![Page 26: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/26.jpg)
Overlay network32
![Page 27: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/27.jpg)
2.2.1. Structured P2P 33
Overlay network is constructed using a
deterministic procedure.
DHT (Distributed Hash Table)
![Page 28: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/28.jpg)
Chord system34
- Logically organized in a
ring
- Succ(k)
- Function LOOKUP(k)
- When a node wants to
join the system
- When a node wants to
leave the system
![Page 29: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/29.jpg)
CAN system (Content Addressable
Network)35
![Page 30: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/30.jpg)
2.2.2. Unstructured P2P architecture36
Randomized algorithms for constructing an overlay
network.
Each node maintains a list of neighbors
Data items are assumed to be randomly placed on
nodes locating a specific data item needs
flooding the network
=>superpeers
![Page 31: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/31.jpg)
2.3. Hybrid architectures37
Edge-Server Systems
Collaborative Distributed Systems
![Page 32: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/32.jpg)
Edge-Server Systems38
![Page 33: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/33.jpg)
Content Delivery Network39
![Page 34: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/34.jpg)
Collaborative Distributed Systems40
BitTorrent system
![Page 35: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/35.jpg)
3. Architectures versus Middleware41
![Page 36: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/36.jpg)
Where does Middleware fit in?42
Position of middleware
E.g. CORBA (object-based architecture), TIB/Rendezvous (event-based architecture)
Benefit: designing applications may become simpler
Drawback: no longer be optimal for application developers
Solutions:
make several versions of a middleware system
separate between policies and mechanisms easy to configure, adapt and customize middleware
![Page 37: DISTRIBUTED SYSTEMS CHAPTER 2 ARCHITECTURES...Container Orchestration tools 20 Amazon ECS (EC2 Container Service) Azure Container Service (ACS) Cloud Foundry’s Diego CoreOS Fleet](https://reader034.vdocuments.mx/reader034/viewer/2022042806/5f694c1bea002e289e4b0dc0/html5/thumbnails/37.jpg)
Interceptors
software
construct
break the usual
flow of control
and allow other
code to be
executed
43