first commit
This commit is contained in:
commit
d679edc5a5
5 changed files with 1102 additions and 0 deletions
313
topic_8.md
Normal file
313
topic_8.md
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
## What does the **Structural View** of a software architecture show?
|
||||
|
||||
---
|
||||
|
||||
🏗️ It is a **static view** (like a class diagram) that shows component types, ports, connectors, and architecture stereotypes.
|
||||
%%%
|
||||
What is the primary focus of the **Dynamic View** in software architecture?
|
||||
|
||||
---
|
||||
|
||||
🎬 It shows all possible **interactions** between objects in the system.
|
||||
%%%
|
||||
What does the **Deployment View** represent?
|
||||
|
||||
---
|
||||
|
||||
🌍 It shows the **physical configuration** of the system, including how software is mapped to hardware.
|
||||
%%%
|
||||
What are the defining characteristics of a **Sequential Software Architecture**?
|
||||
|
||||
---
|
||||
|
||||
🧵
|
||||
|
||||
1. **Single thread** of control.
|
||||
2. **All objects are passive**.
|
||||
3. Used by cyclic executives.
|
||||
%%%
|
||||
Name three major benefits of **Concurrent Software Architectures**.
|
||||
|
||||
---
|
||||
|
||||
🚀
|
||||
|
||||
1. Threads can run while others are **blocked** for events.
|
||||
2. Supports **multi-core** or distributed systems.
|
||||
3. Multiple input streams can be handled in **parallel**.
|
||||
%%%
|
||||
How do components in a **Component-Based Architecture** interact?
|
||||
|
||||
---
|
||||
|
||||
🔌 They are treated as **black boxes** that communicate through **well-defined interfaces**.
|
||||
%%%
|
||||
In a Component-Based system, what is a **Subsystem**?
|
||||
|
||||
---
|
||||
|
||||
🧩 A **Composite Component** (a component that contains other components).
|
||||
%%%
|
||||
|
||||
## When applying **Separation of Concerns**, what is the rule regarding objects on **separate nodes**?
|
||||
|
||||
---
|
||||
|
||||
🌐 They should be placed in **separate subsystems**.
|
||||
%%%
|
||||
Where should **Control objects** and the **Entity objects** they interact with be located?
|
||||
|
||||
---
|
||||
|
||||
📦 They should both be part of the **same subsystem**.
|
||||
%%%
|
||||
|
||||
## What is the rule for **Clients and Services** in subsystem structuring?
|
||||
|
||||
---
|
||||
|
||||
↔️ They should be in **separate subsystems**.
|
||||
%%%
|
||||
What are the defining features of a **Control Subsystem**?
|
||||
|
||||
---
|
||||
|
||||
🕹️
|
||||
|
||||
- Receives inputs from and sends outputs to the **external environment**.
|
||||
- It is usually **state-dependent**.
|
||||
- It interacts with other subsystems as needed.
|
||||
%%%
|
||||
What is the role of a **Coordinator Subsystem**?
|
||||
|
||||
---
|
||||
|
||||
🤝 It coordinates the actions of **multiple control subsystems** in a complex system.
|
||||
%%%
|
||||
What may a **User-Interaction Subsystem** contain for performance optimization?
|
||||
|
||||
---
|
||||
|
||||
🗄️ It may contain **Entity objects** for local storage and **caching**.
|
||||
%%%
|
||||
What is the difference between **Data Collection** and **Data Analysis** subsystems?
|
||||
|
||||
---
|
||||
|
||||
📊
|
||||
|
||||
- **Data Collection**: Gathers data from the environment and may perform **data reduction**.
|
||||
- **Data Analysis**: Provides **reports and analysis**; often operates in non-real-time.
|
||||
%%%
|
||||
How does a **Service Subsystem** differ from other subsystems in terms of behavior?
|
||||
|
||||
---
|
||||
|
||||
🛠️ It **does not initiate actions** on its own; it only provides services to other subsystems upon request.
|
||||
%%%
|
||||
What is the interface rule regarding **External Components**?
|
||||
|
||||
---
|
||||
|
||||
🔌 An external component should only interface to **one single subsystem**.
|
||||
%%%
|
||||
|
||||
## How does the scale of a **Design Pattern** compare to a single Class?
|
||||
|
||||
---
|
||||
|
||||
🏗️ It is a **larger-grained** form of reuse; it involves **multiple classes** and their specific interactions rather than just one.
|
||||
%%%
|
||||
What are **Idioms** in the context of software patterns?
|
||||
|
||||
---
|
||||
|
||||
💻 They are **low-level patterns** tailored to a **specific programming language**.
|
||||
%%%
|
||||
What is the difference between **Design Patterns** and **Architectural Patterns**?
|
||||
|
||||
---
|
||||
|
||||
📏
|
||||
|
||||
- **Design Patterns**: A small group of collaborating objects (e.g., Gang of Four).
|
||||
- **Architectural Patterns**: Larger-grained, addressing the structure of **major subsystems**.
|
||||
%%%
|
||||
What is a **Design Anti-Pattern**?
|
||||
|
||||
---
|
||||
|
||||
⚠️ **Bad code** or poor design solutions that are seen repeatedly.
|
||||
|
||||
%%%
|
||||
What is the difference between **Strict** and **Loose** Layered architectures?
|
||||
|
||||
---
|
||||
|
||||
🥞
|
||||
|
||||
- **Strict**: A layer can only use services from the layer **immediately below** it.
|
||||
- **Loose**: A layer can use services from **any** lower layer.
|
||||
%%%
|
||||
|
||||
## How does **Centralized Control** manage system inputs and outputs?
|
||||
|
||||
---
|
||||
|
||||
🎯 There is only **one control component**: all inputs flow into it, and all outputs originate from it (e.g., a Nuclear Power Station).
|
||||
%%%
|
||||
|
||||
## What defines **Distributed Collaborative Control**?
|
||||
|
||||
---
|
||||
|
||||
🤝 Multiple peer controllers manage subsets of the system and **exchange events** for coordination (e.g., Air Traffic Control).
|
||||
%%%
|
||||
|
||||
## What is the key restriction in **Distributed Independent Control**?
|
||||
|
||||
---
|
||||
|
||||
🧱 While control is distributed, there is **no communication** or coordination between the various control components (e.g., Railway crossings).
|
||||
%%%
|
||||
|
||||
## What characterizes a **Hierarchical Control** pattern?
|
||||
|
||||
---
|
||||
|
||||
👑 A **top-level coordinator** component sends commands to and receives responses from lower-level distributed controllers (e.g., a Telephone Switch).
|
||||
%%%
|
||||
In a **Master/Slave** pattern, what are the three main rules for the Slaves?
|
||||
|
||||
---
|
||||
|
||||
⛓️
|
||||
|
||||
1. Slaves **do not interact** with each other.
|
||||
2. Slaves **do not have** their own control objects.
|
||||
3. They only respond to the Master, who integrates their results.
|
||||
%%%
|
||||
|
||||
## What occurs in the **Synchronous Object Access** pattern?
|
||||
|
||||
---
|
||||
|
||||
🤝 Two or more **active objects** share data through a **passive object**. Because the data is shared, **mutual exclusion (mutex)** is strictly required.
|
||||
|
||||
%%%
|
||||
What is a classic example of the **Synchronous Object Access** pattern?
|
||||
|
||||
---
|
||||
|
||||
🏭 The **Producer-Consumer** problem (where both access a shared buffer entity).
|
||||
%%%
|
||||
How does the **Asynchronous Message Communication** pattern affect the sender?
|
||||
|
||||
---
|
||||
|
||||
📨 The sender (Producer) sends the message and **continues immediately** without waiting. Messages may queue at the consumer.
|
||||
|
||||
%%%
|
||||
What is a major risk of **Asynchronous Message Communication**?
|
||||
|
||||
---
|
||||
|
||||
⚠️ If the producer sends data faster than the consumer can receive it, **messages will be dropped** (buffer overflow).
|
||||
%%%
|
||||
How does **Bidirectional Asynchronous** messaging differ from standard asynchronous messaging?
|
||||
|
||||
---
|
||||
|
||||
🔄 The sender needs a reply but **not immediately**. Multiple messages can be sent before a response (like an ACK) is required.
|
||||
**Example:** TCP protocol.
|
||||
|
||||
%%%
|
||||
What happens to a client during a **Synchronous Message with Reply**?
|
||||
|
||||
---
|
||||
|
||||
🛑 The client sends a message and **blocks** (stops execution) until the server processes the request and sends a reply back.
|
||||
**Examples:** RPC (Remote Procedure Call) or RMI.
|
||||
|
||||
%%%
|
||||
In the **Asynchronous Message with Callback** pattern, what is the limit on outstanding requests?
|
||||
|
||||
---
|
||||
|
||||
📞 Only **one request** can be outstanding at a time. The client continues running but expects a response via a callback later.
|
||||
|
||||
%%%
|
||||
What is the primary benefit of the **Synchronous Message without Reply** pattern?
|
||||
|
||||
---
|
||||
|
||||
⏱️ It **throttles the producer**: the producer blocks until the consumer receives the message, preventing the producer from overwhelming a slow consumer.
|
||||
|
||||
---
|
||||
|
||||
## What is the main advantage and disadvantage of **Asynchronous Communication**?
|
||||
|
||||
⚖️
|
||||
|
||||
- **(+) More Parallelism**: The sender doesn't wait and keeps working.
|
||||
- **(-) Buffer Loss**: Data can be lost if the sender is faster than the receiver.
|
||||
%%%
|
||||
Why does **Synchronous Communication** involve less data copying on the same node?
|
||||
|
||||
---
|
||||
|
||||
📋 Because the sender and receiver can **share the same address space**, whereas asynchronous usually requires copying data into a message buffer and then out again.
|
||||
%%%
|
||||
Is the "reduced parallelism" of Synchronous Communication always a disadvantage?
|
||||
|
||||
---
|
||||
|
||||
🤔 **Not necessarily.** While it reduces parallel execution, the resulting "blocking" behavior naturally synchronizes the timing of the two components (throttling).
|
||||
%%%
|
||||
|
||||
## What are the two types of **Transparency** provided by a **Broker Pattern**?
|
||||
|
||||
---
|
||||
|
||||
🕵️
|
||||
|
||||
1. **Location Transparency**: The client only needs to know the broker's location; the server can move.
|
||||
2. **Platform Transparency**: The server can run on different hardware or software platforms.
|
||||
%%%
|
||||
|
||||
## In a **Broker Pattern**, what are the two ways a Broker can handle a client's request?
|
||||
|
||||
---
|
||||
|
||||
🔄
|
||||
|
||||
1. **Query once**: The broker provides the server's information, and the client contacts the server directly.
|
||||
2. **Intermediary**: The broker acts as a middleman and forwards the requests to the server.
|
||||
%%%
|
||||
What is the primary "cost" or disadvantage of using a **Broker**?
|
||||
|
||||
---
|
||||
|
||||
⏳ **Overhead**: The client must perform an extra step (asking the broker) before it can actually access the server.
|
||||
%%%
|
||||
What is the difference between **Broadcast** and **Subscription** message patterns?
|
||||
|
||||
---
|
||||
|
||||
📡
|
||||
|
||||
- **Broadcast**: Messages are sent to **everyone**; recipients must filter out what they don't want.
|
||||
- **Subscription**: Recipients **register** for specific messages; they only receive what they asked for.
|
||||
%%%
|
||||
|
||||
## Which well-known design pattern is used to implement **Subscription/Notification**?
|
||||
|
||||
---
|
||||
|
||||
🔔 The **Observer Pattern**: A publisher sends messages to a group without needing to know specific individual recipients.
|
||||
%%%
|
||||
What is the main downside of the **Broadcast** pattern in a network?
|
||||
|
||||
---
|
||||
|
||||
🚦 It creates **more message traffic**, as data is pushed to every potential recipient regardless of interest.
|
||||
Loading…
Add table
Add a link
Reference in a new issue