Architectural Patterns Flashcards

1
Q

What types of Architectural patterns (systems) are differentiated?

A
  • Adaptable systems
  • Interactive systems
  • From Chaos to Structure systems
  • Distributed Systems
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name Adaptable systems:

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

Describe Dependency injection from the perspective of adaptable systems

A
  • pattern provides an independent building block for the purpose of managing lifecycles of instances and deciding which specific classes are instantiated at runtime: assembler
  • can be regarded as ‘universal factory’
  • via meta-information specific implementations of abstract services are generated or determined
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name interactive systems architecture patterns

A
  • Model-View-Controller Pattern (MVC)
  • Model-View-Presenter Pattern (MVP)
  • Presentation-abstraction-control (PAC)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Name Patterns to create structure from chaos

A
  • Blackboard Pattern
  • Layered-Architecture Pattern
  • Pipes and Filters Pattern
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the Layered Architecture Pattern

A
  • layers of the same level of abstraction, encapsulate operations
  • closed layers, so that effects of subsequent changes only affect that layer
  • information exchange via interfaces, called services
  • higher layer uses services provided by below layer
  • communication across multiple layers is usually not permitted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What can be drawbacks of a layered architecture?

A
  • if requests are just passed through layers without additional logic a lot of unnecessary overhead is created
  • adding a data field has a vertical effect, affecting all layers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the Pipes and Filters Pattern

A
  • Filters transform data passed to them, processing units
  • pipes work as conncetion between filters, data channels
  • filters don’t know about other filters
  • free sequencing of multiple filters and pipes independent of each other -> higher reusability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What aspects are decoupled in a Pipes and Filters Pattern?

A
  • chronologically (direct or time-shifted)
  • transport mechanism / format
  • dynamic determination of next filter: parallelism, load sharing, optional filters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What can be drawbacks of the Pipes and Filters pattern?

A
  • error states during can be complicated to deal with
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the Blackboard Pattern elements?

A

Three elements:
- blackboard
- KnowledgeSolution(s)
- Controller

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

In the Blackboard Pattern, what is the Blackboard responsible for?

A
  • manages the solutions approaches or solution elements of the Knowledge Sources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In the Blackboard Pattern what are the KnowledgeSources?

A
  • one or more independent KnowledgeSources
  • analyze problems from a particular point of view and send solution proposals to Blackboard
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In the Blackboard Pattern what is the Controller?

A
  • controler components
  • monitors the Blackboard
  • where necessary controls the execution of KnowledgeSources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe the Blackboard Pattern

A
  • complex problem with many facets gets analysed via multiple KnowledgeSources
  • Blackboard is used to find best possible solution or solution-mix
  • by KnowledgeSources proposed solutions can be approximate or incomplete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are examples for the Blackboard Pattern?

A
  • image processing
  • image recognition
  • voice recognition
  • system monitoring
17
Q

Describe challenges of distributed systems

A
  • split-brain problem
  • disrupted network connection can lead to inconsistencies
  • failure handling needs to be explicitly addressed
  • latendy is not stable
  • exact temporal sequence of events is impossible to reconstruct
18
Q

What is the Split Brain problem in Distributed Systems?

A
  • because of a network failure inconsistencies and problems may arise, what the true state of the system should be
19
Q

What Patterns are used in Distributed Systems?

A
  • Broker pattern
  • Service-Oriented Architecture
  • modularization
  • microservices
20
Q

Describe the Broker pattern

A
  • only availability of another service is relevant for a system, not physical locality
  • broker works as switching center for all other services, central point of communication
  • services need to register with the broker
  • requests are directed to broker, redirected by him to the target system
  • responses flow again through the broker
21
Q

Describe the Service-Oriented Architecture Pattern

A
  • services consume interfaces of each other after searching for target services in the service directory
  • these interfaces are functional and have low-granularity
  • interfaces are also contractual
  • services should be idempotent, stateless, transactional, self-contained
22
Q

What are important roles in the Service Oriented Architecture Pattern?

A

Service Directory/directory service:
- publishes services registered by service providers

Service providers:
- offers services and registers them with directory service

Service Consumer:
- searches for services in service directory
- after finding them there calls their interfaces directly
- establishes a link with service provider

23
Q

How are Architecture Pattern and Design Patterns different?

A
  • line is blurred
  • Architectural patterns usually help in decomposition and composition of components
  • Design patterns are more often used to support the implementation of functionality
24
Q

What is important about services in SOA?

A

each service:
- has a defined scope
- can be accessed from other components or services
- works as a module capable of delivering the input/output requested

25
Describe how Resource oriented Architecture differs in terms of interface design from SOA
- api is decomposed in terms of resources first instead of services - often implemented in form of RESTful web services
26
What important principle does Interface design follow? What does it say?
Principle of Information Hiding: - complexity of a system should be encapsulated - from outside seen as black-box - interaction only via defined interfaces - only subset of total information necessary for task should be disclosed
27
In the Model-View-Controller Pattern, what are the tasks of the elements?
- Model: takes care of the data, encapsulates the business logic - View: manages the views on the model - Controller: processes user events, triggers updates of the view components
28
How is the Model-View-Presenter pattern different than the Model-View-Controller?
- model is controlled by the presenter - model knows neither the view nor the presenter - view has extremely simple design - view contains no logic, solely responsible for the presentation and receipt of user input - presenter link view and model - controls logic flow between layers - collects all application use cases, accepts user input from view, calls methods in model, sets data in view
29
What is the base principle of the Presentation-abstraction-Control (PAC)?
- structure of ai broken down into hierarchically cooperative 'agents' - each agents consists of controller, abstraction and view - controller is the agents interface to next higher- or lower-level agents and controls area of responsibility - functionality is provided my intermediate levels to lower-level UI elements