Software Architecture June 2019
Software Architecture June 2019
Quality attributes are a key part of software architecture documentation and are
typically documented in the following sections:
Non-Functional Requirements
Quality attributes are a type of non-functional requirement that specify how the
system should behave, rather than what it should do. They are documented
alongside functional requirements to provide a complete picture of the system's
expected behavior.
Quality Attribute Scenarios
Quality attribute scenarios are used to specify the quality attributes in more
detail. They describe a stimulus, the environment the stimulus occurs in, the
artifact stimulated, the response, and the response measure. For example, a
reliability scenario could be: "Upon failure of a single server, the system should
transparently fail over to a backup server with no more than 1 minute of
downtime."
Views and Perspectives
Quality attributes are considered when designing the various views of the
architecture, such as the logical view, process view, development view, and
physical view. Specific quality attributes may drive decisions in each view. For
example, the physical view may be influenced by performance and availability
attributes.
Architectural Decisions
The architectural decisions made during the design process are driven by the
need to satisfy the quality attributes. Documenting the rationale behind key
decisions helps explain how the architecture supports the quality attributes.
Architectural Patterns and Tactics
Specific architectural patterns and tactics are chosen to address quality
attributes. For example, using a load balancer is a tactic to address
performance and scalability. Documenting the patterns and tactics used
helps show how quality attributes are being achieved.In summary, quality
attributes are a critical part of software architecture documentation and
should be specified alongside functional requirements, elaborated through
quality attribute scenarios, considered in each architectural view, used to
drive architectural decisions, and realized through the choice of patterns
and tactics. Documenting them thoroughly helps ensure the architecture
meets the stakeholders' needs.
Q3) B)What are views in documentation? Define module view and
connector view
In software architecture documentation, "views" refer to different perspectives
or representations of the architecture that focus on specific aspects or concerns
of the system. Each view provides stakeholders with a structured way to
understand and analyze different facets of the architecture without
overwhelming them with unnecessary detail. Two common types of views are
the module view and the connector view:
1. Module View:
o Definition: The module view focuses on the decomposition of the
system into modules or components and their relationships.
o Purpose: It provides a structural perspective, showing how the
system is organized into manageable units (modules) and how
these modules interact with each other.
o Contents: Typically includes diagrams such as component
diagrams, package diagrams, or module dependency diagrams.
These diagrams illustrate the modules or components of the system
and their dependencies, interfaces, and interactions.
2. Connector View:
o Definition: The connector view emphasizes the interactions and
communication paths between modules or components within the
system.
o Purpose: It helps stakeholders understand how data flows, how
components communicate, and how different parts of the system
collaborate to achieve functionality.
o Contents: Connector views often include diagrams like
communication diagrams, sequence diagrams, or deployment
diagrams. These diagrams highlight the connectors
(communication channels, protocols, interfaces) between modules
and show the flow of control or data between them.
Key Points to Remember:
Abstraction and Focus: Both module and connector views abstract away
unnecessary details, focusing on specific aspects relevant to different
stakeholders.
Complementary Views: Together, these views provide a comprehensive
understanding of the architecture, addressing both the structural (module
view) and behavioral (connector view) aspects of the system.
Documentation Clarity: Using these views ensures that the
documentation is structured and organized, making it easier for
stakeholders to grasp and discuss different aspects of the architecture
effectively.
4)A) In architecture documentation, Explain pipe and filters.
Pipe and Filter Architecture
The Pipe and Filter architecture is a software design pattern that organizes
processing tasks into sequential stages, or "pipes," where each stage filters and
transforms data step-by-step. This modular approach allows components
(filters) to work independently, enhancing scalability and reusability.Key
Components
Pumps: Data sources that push data into the system to start the flow through the
pipeline
Filters: Independent components that perform specific processing tasks like
transforming, validating, or aggregating data before passing it to the next filter
Pipes: Channels that connect filters and transport data from one to the next
Sinks: Endpoints where the final processed data is collected
Characteristics
Modularity: Each filter is a standalone component that performs a specific
task, allowing for easy understanding, development, and maintenance
Reusability: Filters can be reused across different systems or within the same
system, reducing duplication
Composability: Filters can be composed in various sequences to create
complex processing pipelines
Scalability: Supports parallel processing by running multiple instances of filters
to handle larger data volumes
Maintainability: Isolating functions into separate filters simplifies debugging
and updating
Design Principles
Separation of Concerns: Each filter focuses on a single task, simplifying
development, testing, and maintenance
Loose Coupling: Filters interact only through pipes, minimizing dependencies
and enabling flexibility
Single Responsibility: Filters have one reason to change, promoting modular
design
Benefits
Flexibility: Filters can be added, removed, or rearranged with minimal impact
on the overall system
Scalability: Parallel pipelines can be used to increase throughput and handle
larger data volumes
Maintainability: Changes to one filter do not affect others, making updates and
bug fixes easier to manage
Examples
Unix shell commands: cat input.txt | grep "text" | sort > output.txt
Java IO libraries: Use the Decorator pattern to compose filters
C++ Ranges: Directly support the Pipe and Filter pattern in C++20
The Pipe and Filter architecture is well-suited for data processing tasks,
compilers, and applications requiring structured and sequential data
transformation. Its modular design promotes flexibility, reusability, and
maintainability, making it a popular choice for many software systems.
Q4)B) Explain what is MODEL-VIEW-CONTROLLER (MVC)
The Model-View-Controller (MVC) is an architectural pattern that separates
an application into three main logical components: the model, the view, and the
controller. Each of these components are built to handle specific development
aspects of an application. MVC is one of the most frequently used industry-
standard web development framework to create scalable and extensible projects.
MVC Components
Following are the components of MVC −
Model
The Model component corresponds to all the data-related logic that the user
works with. This can represent either the data that is being transferred between
the View and Controller components or any other business logic-related data.
For example, a Customer object will retrieve the customer information from the
database, manipulate it and update it data back to the database or use it to render
data.
View
The View component is used for all the UI logic of the application. For
example, the Customer view will include all the UI components such as text
boxes, dropdowns, etc. that the final user interacts with.
Controller
Controllers act as an interface between Model and View components to process
all the business logic and incoming requests, manipulate data using the Model
component and interact with the Views to render the final output. For example,
the Customer controller will handle all the interactions and inputs from the
Customer View and update the database using the Customer Model. The same
controller will be used to view the Customer data.
Benefits of MVC
Separation of Concerns: By dividing the application into distinct components,
MVC promotes organized code and reduces complexity, making it easier to
manage and modify.
Modularity: Each component can be developed, tested, and maintained
independently, facilitating parallel development by different team members.
Reusability: Components can be reused across different applications or
projects, enhancing efficiency and reducing redundancy in code.
Scalability: The architecture supports the development of complex applications,
allowing for easier scaling and integration of new features over time.
Conclusion
MVC is a powerful design pattern that streamlines the development process by
clearly defining the roles of different components within an application. Its
structured approach not only enhances maintainability and scalability but also
supports collaborative development, making it a popular choice among
developers for building modern web applications
Software architecture is
Software design is about designing about the complete
individual modules/components. architecture of the overall
Scope system.
Software architecture
Software design defines the
defines the fundamental
detailed properties.
Properties properties.
Software architecture
Software design avoids uncertainty.
Uncertainty manages uncertainty.
Aspect Software Design Software Architecture
Software architecture is
Software design is more about on
more about the design of
individual module/component.
Focus entire system.
It is a plan which
It is considered as one initial phase
constrains software design
of Software Development Cycle
Phase in to avoid known mistakes
(SSDLC) and it gives detailed idea
Software and it achieves one
to developers to implement
Development organizations business and
consistent software.
Cycle technology strategy.
Some of software
Some of software design patterns
architecture patterns are
are creational, structural and
microservice, server less
behavioral.
Patterns and event driven.