L6 Architectural Styles Flashcards

1
Q

What is a control model?

A

Are concerned with the control flow between sub-systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Centralised control model?

A

One sub-system has overall responsibility for control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an Event-based system?

A

Each sub-system can respond to externally generated events from other sub-systems or the system’s environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the two principal of event-driven models?

A
  1. Broadcast models – an event is broadcast to all sub-systems. Any sub-system which can handle the event may do so;
  2. Interrupt-driven models – used in real-time systems where interrupts are detected by an interrupt handler and passed to some other component for processing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain the Broadcast model on event-driven models

A

Sub-systems register an interest in specific events. When these occur, control is transferred to the sub-system which can handle the event (publisher-subscriber pattern)

A control policy is not embedded in the event or message handler.
- Sub-systems decide on events of interest to them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain the Interrupt-driven systems

A

Used in real-time system where fast response to an event is essential

  • there are a known number of interrupt types with a handler defined for each type
  • when an interrupt of a particular type is received, a control is transferred to its handler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an Architectural styles?

A

Specific templates which are general and reusable when considering the way to structure system architecture:
○ mechanism/template for structuring system architectures
○ each template can be used for different types of software
○ stylised description of good design practice, which has been tried and tested in different environments
○ include information about when they are and when they are not useful
○ choice of a suitable style depends on the requirements (e.g. what is more important, security or speed?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the architectural styles you know?

A
  1. Client-Server
  2. Repository
  3. Plug-in
  4. Layered
  5. Pipe and filter
  6. Microservice
  7. Model View Controller (MVC)
  8. Service Oriented Architecture (SOA)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the things that need to be considered when choosing an architectural style?

A
  • Performance ( Localise critical operations and minimise communications. Use large rather than fine-grain components)
  • Security (Use a layered architecture with critical assets in the inner layers)
  • Safety (Localise safety-critical features in a small number of sub-systems)
  • Availability (Include redundant components and mechanisms for fault tolerance)
  • Maintainability (Use fine-grain, replaceable components)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What would happen if use large-grain components in our architecture

A

Performance improved, but maintainability is reduced.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What would happen if we introduce redundant components?

A

It will improves availability but makes security more difficult

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What would happen if we localise safety-related features?

A

It means that it will have more communication, hence performance is degraded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What would happen if we use small-grain components?

A

Improve reusability but degrade performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain the input-process-output architecture

A
  1. User performs an action which is transferred in a request model via a delivery mechanism (e.g. web server)
  2. Interactor receives the request model through an input boundary
  3. Interactor decides which actions to take based on the request model and executes entities accordingly
  4. Interactor generates a result model (POJO) and prepares to send it across the boundary back to the user
  5. The response is transferred through the boundary to the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Explain why architectural boundary is fundamental to architectural design

A
  • Enable separation and independence between sub-systems (e.g. UI and business logic)
  • Make maintenance, deployment and testing simpler and faster
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the benefits of input-process-output architecture

A
  1. Business logic is decoupled from the presenter (UI)
  2. If UI changes or breaks, business logic won’t be affected
  3. UI can be replaced with virtually anything
  4. Business logic can be tested without the need for UI
  5. Tests can run fast and independently
17
Q

What is a plug-in architectural style

A

● Plug-in is a component that provides some service within the overall system
● All plug-ins have to conform to the system’s plug-in contract
○ An interface by which the system decides what a plug-in must implement
● The view/presenter ”plugs in” into the sub-system
● The view can be replaced with virtually anything (e.g. tests or web)

Allows the system to extend its functionalities. A plug-in depends on the system, however, the system does not depend on the plug-in. As long as the interface to which the plug-in “plugs in” is stable, the plugin will work

18
Q

What is an example of a Plug-in architectural style

A

Visual Studio Code extensions

19
Q

When should we use a Plug-in architectural style?

A

When it is important to allow the extensibility of the system and customizability.

20
Q

What is the advantage and disadvantage of plug-in architectural style?

A

Advantage:
- System is extensible and modular (each plug-in is a modules for itself and should be decoupled from other plug-ins)

Disadvantage:
- When developing the plug-in architecture it is important to consider what actions plug-ins are allowed to do, mean security can be an issue if not properly dealt with.

21
Q

Explain a brief description of the Layered architectural style

A

Organizes the system into layers with related functionality associated with each layer. A layer provides services to the layer above it so the lowest-level layers represent core services that are likely to be used throughout the system

● Number of layers is arbitrary
● Each layer only relies on the facilities and services offered by the layer immediately beneath it
● Architecture is changeable and portable so long as interfaces stay unchanged
● Each layer can be developed by different teams independently

22
Q

List the layers in the Layered architectural style from the highest to the lowest

A
  1. User Interface
  2. User Interface Management Authentication and Authorization
  3. Core Business Logic/Application Functionality System Utilites
  4. System Support (OS, Database etc.)
23
Q

What is an example of a Layered architectural style system

A

A layered model of a system for sharing copyright documents held in different libraries.

24
Q

When to use Layered architectural style

A
  • Used when building new facilities on top of existing systems;
  • When the development is spread across several teams with each team responsible for a layer of functionality;
  • When there is a requirement for multi-level security.
25
Q

What is the advantage and disadvantage of the Layered architectural style?

A

Advantage:
Allows replacement of entire layers so long as the interface is maintained. Redundant facilities (e.g., authentication) can be provided in each layer to increase the dependability of the system.

Disadvantage:
In practice, providing a clean separation between layers is often difficult and a high-level layer may have to interact directly with lower-level layers rather than through the layer immediately below it.
Performance can be a problem because of multiple levels of interpretation of a service request as it is processed at each layer.

26
Q

Explain what is a Repository architectural style

A

All data in a system is managed in a central repository that is accessible to all system components. Components do not interact directly, only through the repository.

● Suitable when components need to share their data with other components
● Used in command and control systems, management information systems, IDEs, etc.
● Organising tools around a repository is an efficient way to share large amounts of data (no need to transmit directly from one component to another)
● Integrating new components may be tricky as they must comply with the agreed repository schema
● Distributing components over multiple systems is difficult

27
Q

What is an example of a Repository architectural style?

A

An IDE where the components use a repository of system design information. Each software tool generates information which is then available for use by other tools.

28
Q

When should we use Repository architectural style?

A

When we have a system in which large volumes of information are generated that has to store for a long time.
May also use in data-driven systems where the inclusion of data in the repository triggers an action or tool.

29
Q

What is the advantage of Repository architectural style?

A

Components can be independent - they do not need to know the existence of other components.
Changes made by one component can be propagated to all components.
All data can be managed consistently (e.g., backups done at the same time) as it is all in one place.

30
Q

What is the disadvantage of the Repository architectural style?

A

The repository is a single point of failure so problems in the repository affect the whole system.
May be inefficiencies in organizing all communication through the repository. Distributing the repository across several computers may be difficult.

31
Q

Explain what Client-server architectural style

A

In a client-server architecture, the functionality of the system is organized into services, with each service delivered from a separate server. Clients are users of these services and access servers to make use of them.

32
Q

What is an example of the Client-server architectural style?

A

A film and video/DVD library server that is connected through the internet communicates with multiple clients concurrently.

33
Q

When to use Client-server architectural style?

A

Used when data in a shared database has to be accessed from a range of locations. Because servers can be replicated, may also be used when the load on a system is variable.

34
Q

What is the advantage of the Client-server architectural style?

A

Servers can be distributed across a network. General functionality (e.g., a printing service) can be available to all clients and does not need to be implemented by all services.

35
Q

Centralised control
Call-return model for sequential systems

A
36
Q

Centralised Control
Manager model for concurrent system

A
37
Q

Performance vs Security

A
38
Q

Trade-off between performance and security

A
39
Q

Efficiency vs Availability

A