Tenta (fundamentala delar) Flashcards

Klara tentan :)

1
Q

How would you define software architecture?

A

Software architecture refers to the fundamental structures of a software system. The architecture is concerned with the major components, their relationships, and how they interact with each other.

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

What is the role of a software architect?

A

A software architect designs and oversees the high-level structure of software systems, making key decisions on frameworks and technologies based on the project’s needs. They ensure the system’s scalability, performance, and security, guide development teams, manage risks, and maintain communication with stakeholders to align technical solutions with business objectives.

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

How are UML diagrams used within software architecture?

A

UML diagrams are tools used to communicate architecture, they can provide a visual representation of quality attributes, component interactions, design decisions, and more (these come from software architecture).

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

Mentioned benefits of Software Architecture?

A

Clarity and Common Vision: Architecture provides a shared understanding of the system’s structure, behavior, and design decisions. It helps developers align their work towards a common goal.

Quality Attributes: Architecture addresses non-functional requirements like performance, scalability, security, and maintainability. These aspects are essential for building a robust and successful system.

Risk Mitigation: An architectural approach identifies potential risks early and allows proactive risk management. This minimizes the chances of costly issues arising later in the development process.

Adaptation and Evolution: An architectural foundation allows the system to adapt to changing requirements and technology trends. It supports incremental development while ensuring consistency.

Communication: Architecture documentation serves as a communication tool for developers, stakeholders, and non-technical parties. It helps everyone understand the system’s structure and design choices.

Decision Support: A software architect provides guidance on making design decisions that align with the project’s goals and long-term vision. This doesn’t constrain developers but helps them make informed choices.

Scalability: Architecture plans for scalability, ensuring that the system can handle increased loads and data volumes as the user base grows.

Time and Cost Savings: Clear architecture reduces rework by providing a well-thought-out structure. It streamlines development and prevents ad-hoc changes that could lead to technical debt.

Maintainability: A well-designed architecture makes the system easier to maintain over its lifecycle. It ensures that changes or enhancements can be made without disrupting the entire codebase.

Alignment with Business Goals: Architecture aligns technical decisions with business objectives, ensuring that the software supports the organization’s needs.

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

Does experienced teams need a software architect?

A

Experience is valuable, but even experienced developers can benefit from a coherent architectural vision. A software architect helps align decisions with overall goals, ensures consistency, and identifies potential risks or trade-offs. They don’t dictate every detail but provide guidance to create a well-structured and maintainable system.

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

What are some strengths of UML diagrams?

A

UML diagrams are great tools to describe the software architecture, by describing relationships between classes. This way we better know the structure of the code and all dependencies.

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

What are some weaknesses of UML diagrams?

A

They don’t show important architectural decisions, and are not to be used as a alternative to software architecture. UML diagrams also represent static behavior in its diagram, not dynamic behavior, which is vital to understanding architecture.

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

What are some key aspects of BDUF (Big Design up-front)?

A

BDUF is a traditional approach to software development where the entire software architecture is designed and planned upfront before any coding begins.

  • Entire software architecture is designed and planned upfront before any coding changes.
  • BDUF Delays feedback until a later stage
  • BDUF often leads to a rigid architecture that might not accommodate changes easily.
  • BDUF can lead to long planning and design phases, delaying the actual delivery of software to end-users.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are some key aspects of Agile?

A

Agile software development is characterized by its iterative and incremental approach, focusing on delivering working software in short cycles while allowing for flexibility and adaptation.

  • In Agile, the understanding is that requirements evolve over time as users provide feedback and the market changes.
  • Agile emphasizes the ability to adapt to changing requirements and priorities.
  • Agile encourages continuous feedback through iterative cycles.
  • Agile focuses on delivering small, functional increments quickly.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does BDUF’s core ideas clash with the ones of Agile software development

A

BDUF assumes that all requirements are known and planned before development begins, and after this, that plan will be followed. Agile on the other hand emphasizes its ability to change, as customers and markets give feedback for the change.

BDUF often leads to long planning and design phases, which potentially can delay the delivery of software/product to end-users. Whilst Agile focuses on delivering small, functional increments quickly.

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

How does Big-Design-Up-Front (BDUF) clash with agile software development principles?

A

BDUF assumes that the entire design should be completed and perfected before implementation starts, which conflicts with agile’s iterative and incremental approach. Agile promotes adaptive planning and evolutionary development, emphasizing flexibility in response to changes, contrary to BDUF’s rigid structure.

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

What are the impacts of introducing caching and concurrency on security, availability, and maintainability?

A

Caching can improve performance but may introduce stale data issues affecting data integrity and security. Concurrency improves responsiveness but can lead to complex issues like race conditions, affecting both security and maintainability. Both need careful handling to balance performance with other quality attributes.

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

What does S stand for in SOLID? And what does it say?

A

Single Responsibility Principle (SRP): Every class or module should have one, and only one, reason to change. This means it should have only one job or responsibility. By adhering to this principle, each component or class can be understood and modified independently without affecting other parts of the system.

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

What does O stand for in SOLID? And what does it say?

A

Open/Closed Principle (OCP): Software entities (classes, modules, functions, etc.) should be open for extension but closed for modification. This means you should be able to change a component’s behavior without altering its source code, typically by using interfaces or abstract classes. This facilitates adding new functionality without endangering existing functionality.

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

What does L stand for in SOLID? And what does it say?

A

Liskov Substitution Principle (LSP): Objects of a superclass should be replaceable with objects of its subclasses without affecting the correctness of the program. This principle ensures that a subclass can stand in for its superclass without errors or unexpected behavior, promoting reliability and reusability of code.

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

What does I stand for in SOLID? And what does it say?

A

Interface Segregation Principle (ISP): No client should be forced to depend on methods it does not use. This principle advocates for creating smaller, more specific interfaces rather than a large, general-purpose interface. This way, implementing classes only need to be concerned with the methods that are applicable to them.

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

What does D stand for in SOLID? And what does it say?

A

Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules; both should depend on abstractions. Additionally, abstractions should not depend upon details; details should depend upon abstractions. This principle reduces the direct coupling between high-level and low-level components, making the system easier to modify and scale.

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

How can you manage service availability challenges in a distributed system with third-party dependencies?

A

To handle potential unavailability or latency in third-party services, implement fallback mechanisms such as caching previous responses, using circuit breakers to detect failures, and providing default responses to ensure continuity. This ensures the system remains robust and minimizes user impact.

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

What is Continuous Architecture?

A

CA is an architectural approach that gives six principles guiding how to architect a software system, no matter if it is rapid delivery cycles (agile) or more traditional methods (BDUF).

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

What are Information Systems?

A

Interrelated components working together to support the processes in an organization. These components are hardware, software, data and people which interact and communicate.

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

What are Microservices?

A

Microservices is an architectural style in which a large application is built as a suite of small, independent services, each running in its own process and communicating with lightweight mechanisms.

This approach allows for greater flexibility, scalability, and easier maintenance compared to traditional monolithic architectures.

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

Is it true that Software Architecture is about fundamental software structures AND about making fundamental design decisions?

A

Yes.

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

What are the three categories of Requirements?

A

Functional requirements: What is the system supposed to do?

Quality attribute requirements: How well is the system supposed to do these things?

Constraints: What will be some inevitable, non-negotiable requirements?

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

What are some quality attributes? Name five:

A

Performance

Reliability

Security

Modifiability

Scalability

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

What method is used to achieve the desired quality attributes?

A

We use Architectural tactics, design decisions that influence how a system (or a part of it) addresses a certain quality attribute.

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

What are faults, errors and failures?

A

A fault is a abnormal condition of a part of the system, might cause the system to behave unexpectedly

A failure is an observable deviation from the expected behavior of a system

An error is an intermediate state of the system between a faults occurrence and it becoming visible as a fault

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

What is availability? And what does high availability mean?

A

Availability is the ability of a system to mask or repair faults, such that the entire outage period does not exceed a required value over a time period.

In layman terms; If the system goes down for 10 seconds, every hour, it has a low availability. But 10 seconds every year, would be high availably. IF it is defined as so.

28
Q

How can we check for- and detect faults?

A

We can use a Monitor, with one or more of the following tactics:

Monitor: A monitor is a component responsible for checking for failures in one or more other components.

What tactics the Monitor uses:

Ping/Echo: Monitor sends a ping to a component, if echo is not received in time window, that component is considered to have failed.

Heartbeat: Component emits a periodic signal to another component to indicate it is still functioning. Same here, if not received in time to Monitor, considered failed.

Heartbeat with Watchdog: Monitor has a timer that gets counted down, when the heartbeat is received, the timer is reset.

Sanity checking: Monitor tests the outputs/responses of component to see if they are plausible. This requires knowledge of the components internal structure, the state of the system, etc.

29
Q

What is redundancy? What is active vs passive redundancy?

A

Redundancy is: The technique of duplicating critical components or functions of a system with the intention of increasing reliability of the system, typically involving functional backup in case one part fails.

Passive redundancy, also known as cold redundancy, involves having backup components that remain offline until they are needed.

Active redundancy, or hot redundancy, involves backup components that run simultaneously with the primary component.

30
Q

What is performance?

A

Its all about TIME!

About managing a system’s resources, to achieve acceptable timing behavior.

31
Q

What are the two tactics for achieving performance?

A

Control resource demand: Adjust the system’s need for resources (popular choice is to use a queue)

Manage resources: Adjust available resources (can be done by parallelization, just duplicate components that compute shit)

It’s really that easy.

32
Q

To manage resources and improve performance, we can use Caching. What is caching?

A

Parts of data is duplicated in a way that it can be accessed more quickly.

Read access: data is first looked for in the cache and, if found, read from there
(cache hit). Only otherwise (cache miss), it is read from the original data store.
Some old data in the cache is replaced by the new data.
 Write access: different policies for how cache and data store are synchronized
(write through vs. write back)

Chatgpt:
Caching is a technique used in computing to store copies of files or data in temporary storage locations for quick access. The primary goal of caching is to improve data retrieval performance by reducing the need to access the underlying slower storage layer.

33
Q

What is ment by Coupling? And why do we aim for low coupling between modules?

A

It is the degree to which two modules interdepend.

If you have high coupling, the highly coupled modules may:

  • Cause ripple effects in dependent modules
  • May cause systems to be harder to be composed
    *May reduce reusability and increase effort in testing
34
Q

Give two examples of high (tight) coupling between modules, and two examples of low (loose) coupling.

A

High coupling:
- Two modules share the same global data.
- A module accesses another’s internal data or state

Loose coupling:
- Two modules communicate via parameters
- Two modules communicate via complex data structures that are way too large.

35
Q

If module A is dependent on module B, does this mean that they are coupled?

A

If A is dependent to B it is also coupled to it. Coupling is a degree, which expresses how strongly linked A and B are, and hence how difficult it is to change this dependency.

36
Q

What is Cohesion?

A

We know that coupling is about the dependency between modules. Cohesion on the other hand is the internal structure of modules.

Cohesion is the degree to which the elements in a module belong together. Hence, we aim for high cohesion!

37
Q

Why is low cohesion bad?

A

Low cohesion leads to a range of issues including reduced maintainability, increased complexity, and poor reusability, all of which negatively impact the quality and efficiency of software development and maintenance. High cohesion, where modules have a single, well-defined responsibility, promotes cleaner, more understandable, and more reliable code.

38
Q

What is Information Hiding?

A

The basic idea is to encapsulate implementation details, to protect them from access from the outside

39
Q

What is the Law of Demeter?

A

Objects should only communicate with objects in their immediate environment.

40
Q

We know that a component can depend on other components. But it should also be independently _______ and ______.

A

independently developable and deployable.

41
Q

What are the two main Component Cohesion Principles?

A

The Reuse/Release Equivalence Principle (REP): Modules that are reusable must also be released together as a single, cohesive unit.

A reusable module should be versioned and managed independently to ensure consistent integration and updates.

The Common Reuse Principle (CRP): Classes that are used together should be packaged together to avoid unnecessary dependencies.
Only package classes in the same module if they are always reused together to minimize redundant dependencies.

Don’t force users of a component to depend on things they don’t need

Need the 3D engine? You get the whole game

42
Q

What are the two main Component Coupling Principles?

A

The Acyclic Dependencies Principle (ADP): The dependency graph of components should have no cycles to ensure the system is easier to maintain and understand.
Breaking cycles in dependencies prevents issues like circular dependencies, which can complicate the build process and lead to runtime errors.

The Stable Dependencies Principle (SDP): A component should only depend on components that are more stable than itself to reduce the risk of frequent changes.
Stability is achieved by minimizing changes, so depending on stable components ensures that the dependent components remain robust and less prone to breakages.

“The SDP says: less stable components should depend on more stable ones and not vice versa.”

43
Q

What is a Pattern?

A

A general reusable solution to a known common problem.

44
Q

MVC stands for M_____, V_____ and C______

What roles do these parts hold?

A

Model:
Holds data, state and the application logic. It knows almost nothing about the controllers or views.

View:
Presents the output. It does this by sending its response to the controller, who then presents it to the user.

Controller:
Interprets the user input and sends requests to the model, THEN to the view, and lastly presents the response to the user.

45
Q

What are the pros and cons of the Remote Procedure Invocation pattern?

A

Pros include simplicity, order of replies, ease of testing, and familiarity. Cons include challenges with availability and the limitation to request/response communication.

46
Q

What issue can arise with synchronous communication leading to blocking resources?

A

Synchronous communication can lead to services blocking resources while waiting for responses, causing a ripple effect of delays and unresponsiveness

47
Q

What does the Circuit Breaker pattern address?

A

It addresses the issue of failing services by monitoring failure rates and temporarily halting communication to prevent system overload

48
Q

What is the role of message channels in asynchronous communication?

A

Message channels provide a means for senders and receivers to register and communicate, abstracting the actual transport mechanism

49
Q

What are the pros and cons of asynchronous messaging?

A

Pros include loose coupling, message buffering, and flexible communication. Cons include potential performance bottlenecks, single points of failure, added complexity, and design issues

50
Q

What factors should be considered when choosing a message broker?

A

Factors include supported languages, messaging standards, message order preservation, delivery guarantees, persistence, scalability, durability, latency, and competing message consumers

51
Q

What does the ‘A’ in ACID properties stand for and what does it ensure?

A

Atomicity; it ensures that either all operations in a transaction are executed, or none are, leaving no intermediate state visible.

52
Q

What does the ‘C’ in ACID properties stand for and what does it ensure?

A

Consistency: Transactions only lead from one consistent state of the data to
another one
Example: for each created order, there must be a valid ticket

53
Q

What does the ‘I’ in ACID properties stand for and what does it ensure?

A

Isolation: Despite concurrent transactions, the result of each transaction must be
same as if they were executed sequentially
Example: concurrent orders payed via the same card cannot exceed
available balance

54
Q

What does the ‘D’ in ACID properties stand for and what does it ensure?

A

The result of a complete transaction survives a system crash

55
Q

Why is ensuring ACID properties more difficult in microservices?

A

Because microservices might need distributed transactions, which involve manipulations of data in several databases, making it harder to ensure ACID properties

56
Q

What problem arises in microservices when coordination messages are essentially blocking calls?

A

An unresponsive microservice instance (MSi) blocks other participating services, reducing overall system availability

57
Q

According to the CAP theorem, what three properties can a distributed system only guarantee TWO of?

A

Consistency, Availability, and Partition tolerance

58
Q

What is an example of a CA (Consistency and Availability) system?

A

A relational database management system (RDBMS) with ACID transactions is an example of a CA system

59
Q

What is the main idea of the Saga pattern in microservices?

A

A Saga is a sequence of local transactions coordinated via events, where compensating transactions are performed to undo changes if a local transaction fails

60
Q

What are ‘compensatable transactions’ in the context of the Saga pattern?

A

They are transactions followed by ones that can go wrong, and they can be undone by compensating transactions if needed.

61
Q

How is coordination achieved through choreography in microservices?

A

Coordination is achieved via events without central coordination, where services react to events published by other services.

62
Q

What is a benefit of orchestration in microservices?

A

It results in simpler dependencies, less coupling, and improved separation of concerns by coordinating via the command API of services with a Saga orchestrator in one of the services.

63
Q

What is a drawback of using choreography for coordination in microservices?

A

It can lead to more difficult understanding, cyclic dependencies, and the risk of tight coupling despite the intended loose coupling via events

64
Q

What pattern is recommended for complex services in microservices architecture?

A

The Domain Model pattern

65
Q

Why is MVC used?

A

To split a large application into different, smaller parts that all have a specific purpose.

66
Q

What are pipes and filters?

A

The Pipes and Filters architectural pattern is used to structure systems that process a stream of data.

Pipes act as conduits for the data, connecting outputs of one filter to inputs of another, ensuring a smooth flow of data.

Ex:

Chunk creation:

Input (pipe): Spectogram data
Filter: Breaks spectogram data into series of overlapping chunks (acoustic frames)
Output (pipe): Series of acoustic frames

67
Q
A