Software Architecture and Style Flashcards
Software Architecture Definition
Software architecture is considered as a description of the high level structure of a software system in terms of architectural elements and the interactions between them
what is a Component
A component is a unit of software that performs some functions at run-time.
Examples: programs, objects, processes, clients, servers, databases
What is a connector
Interactions among components:
communication, coordination, or cooperation among components.
Examples of Connectors
Examples: shared variable access, procedure calls, remote procedure calls,
communication protocols, data streams, transaction streams.
Architecture Design Process
Understand the problem
Identify design elements and their relationships
Evaluate the architecture design
Transform the architecture design
Key Architecture Principles
Build to change instead of building to last
Reduce risk and model to analyze
Use models and visualizations as a
communication and collaboration tool
Use an incremental and iterative approach
Key Design Principles 1
Separation of concerns
Single responsibility principle
Principle of least knowledge
Minimize large design upfront
Do not repeat the functionality
Key Design Principles 2
Prefer composition over inheritance while reusing the functionality
Identify components and group them in logical layers
Define the communication protocol between layers
Define data format for a layer
Pipe and Filter architecture Advantages
Concurrency
Reusability
Modifiability and low coupling between filters
Supporting both sequential and parallel execution
Architecture examples – Pipe and Filter architecture Disadvantages
Disadvantages:
Low dynamicity
Overhead
Process control Architecture description
Data comes from a set of variables, which controls the execution of process
Processing unit for changing the process control variables and a controller unit for calculating the amount of changes
A controller unit must have the following elements, for process control architecture:
Controlled variables
Input variables
Manipulated variables
Process definition
Sensor
Set point
Control algorithm
Examples:
Car-cruise control, anti-lock brakes, temperature
control
Describe Data-centered architecture
Data is centralized and accessed frequently by
other components, which modify data
Main purpose: integrity of data
Components interact only through the data store
Examples of Data-centered architecture
database architecture, which contains the central data and the data accessor
The flow of control differentiates the architecture into two sub-categories:
Repository
Blackboard
Repository architecture style:
Data store is passive
Clients (software components or agents) are
active, which control the logic flow
Client sends a request to the system to
perform actions
Computational processes are independent and triggered by incoming requests
look for Repository Architecture image
Advantages of repository architecture style
Scalability and reusability of agents as they do
not have direct communication with each
other
DisAdvantages of repository architecture style
Vulnerable to failure
Changes in data structure highly affect the
clients
Blackboard architecture style overview
Data store is active and its clients are passive
Logical flow is determined by the current data
status in data store
Blackboard component acts as a central data
repository
Blackboard architecture style Operations
Components act independently on common
data store in the blackboard
Processing is triggered by the state of the
blackboard
Blackboard architecture style advantages
Scalability
Concurrency
Blackboard architecture style disadvantages
Close dependency exists between blackboard
and agents
Problems in synchronization of multiple agents
Hierarchical architecture Overview
Views the whole system as a hierarchy structure
Software system is decomposed into logical modules
Low-level subsystem give services to its adjacent upper level subsystems, which invoke the methods in the lower level:
Lower layer – specific functionality
Middle layer – domain dependent functions
Upper layer – user interface
Hierarchical architecture sub types, what are they
Three sub-types:
Main-subroutine
Master-slave
Virtual machine
Describe the main subroutine in hierarchical architecture
Main-subroutine
Individual modules or subroutine
Top-down refinement
Functionality may be reused and shared by callers in higher layers
See Main-Subroutine image
Main-subroutine Advantages
Main-subroutine Disadvantages
Vulnerable as it contains global shared data
Tight coupling
Master Slave Hierarchical Architecture
Master-slave
Slaves provide duplicate services to the master
Master chooses a particular result among
slaves by a certain selection strategy
Slaves may perform the same functional task
by different algorithms and methods
Slaves can be executed in parallel
See Master Slave Image
Master Slave Advantages
Speed
Robustness
Slaves can be implemented differently
Master Slave Disadvantages
Communication overhead
Not all problems can be divided
Portability issue
What is interaction-oriented architecture
Separate the interaction of user from data
abstraction and business data processing
Data module
Control module
View presentation module
What is interaction-oriented architecture sub types
Model-View-Controller (MVC)
Presentation-Abstraction-Control (PAC)
Model-View-Controller (MVC) overview
Model – Manages the data, logic, and
constraints of an application
View – output of information
Controller – accepts and input and converts it
to commands for the model or view
see image
MVC Advantages
Multiple views synchronized with same data
model.
Used for application development where
graphics expertise, programming, and data
base development professionals are working in
a team
MVC Disadvantages
Not suitable for agent-oriented applications
Division between the View and Controller is not
clear in some cases
is Presentation-Abstraction-Control part of interaction oriented architecture
yes
overview of Presentation-Abstraction-Control
Presentation-Abstraction-Control (PAC)
(Hierarchy of many cooperating agents)
Presentation component
Abstraction component
Control component
See image
Loosely coupled, hierarchical cooperating agents
Presentation-Abstraction-Control Advantages
Support multi-tasking and multi-viewing
Support agent reusability and extensibility
Presentation-Abstraction-Control Disdvantages
Overhead
Difficult to determine the right number of
agents
Describe Distributed Architecture
Components are presented on different platforms
and several components can cooperate with one
another over a communication network in order
to achieve a specific objective or goal
Example: ERPS (Enterprise Resource Planning
System)
See image
Distributed Architecture Advantages
Openness
Concurrency
Scalability
Fault tolerance
Distributed Architecture Disadvantages
Complexity
Security
Manageability
Unpredictability
Overview of component based architecture
A component is a modular, portable, replaceable, and reusable set of well-defined functionality that encapsulates its implementation
The decomposition of the design into individual functional or logical components that represent well-defined communication interfaces containing methods, events, and properties
Component reusability
Component-based
architecture advantages
Reduced development cost
Increased reliability
Ease of deployment
Reusable
Independent
Component-based
architecture Disadvantages
Compromises in requirements may be needed
Less control over the system’s evolution
Describe data flow architecture again
Series of transformations to the data
Well-defined series of independent data
transformations or computations on orderly
defined input and output
Example:
Compilers
Business data processing
Describe a sub type of data flow architecture, batch sequential
Data transformation subsystem can initiate its
process only after its previous subsystem is
completely through
Example:
Banking application
Utility billing
See image
Batch sequential Advantages
Provides simpler divisions on subsystems
Independent programs
Batch sequential Disadvantages
High latency and low throughput
No concurrency and interactive interface
Describe another subtype of data flow architecture, the pipe and filter
see the image
it’s an incremental transformation
pipe and filter advantages
Concurrency
Reusability
Modifiability and low coupling between filters
Supporting both sequential and parallel execution
pipe and filter disadvantages
Low dynamicity
Overhead