Software Architecture - Unit 1
Software Architecture - Unit 1
Definition
The software architecture of a program or computing system is the structure or
structures of the system, which comprise software elements, the externally visible
properties of those elements, and the relationships among them.
The earlier in the life cycle re-use is applied, the greater the benefit that can be
achieved
• Software Product Lines Share a Common Architecture
• Systems Can Be Built Using Large, Externally Developed Elements
• Less Is More: It Pays to Restrict the Vocabulary of Design Alternatives
• Architecture Permits Template-Based Development
• Architecture Can Be the Basis for Training
System Architecture versus Software Architecture
• System considerations are seldom absent in Software Architecture
• To build high performance software, knowledge about physical devices are
required (CPU speed, amount of memory, disk access speed)
• To build highly reliable software, failure rates and the availability of
redundant processing or network devices should be known.
• Still software architecture and not system architecture, because most of the
architect's freedom is in the software choices, not in the hardware choices
Architectural Structures and Views
• Restrict attention to one of the software system's structures
• Architectural structures can be divided into three groups, depending on the
broad nature of the elements they show.
• Module structures
• Modules represent a code-based way of considering the system
• assigned areas of functional responsibility
• less emphasis on how the resulting software manifests itself at runtime
• Answer questions such as
• What is the primary functional responsibility assigned to each module?
• What other software elements is a module allowed to use?
• What other software does it actually use?
• What modules are related to other modules by generalization or
specialization (i.e., inheritance) relationships?
• Component-and-connector structures
• Elements are runtime components (which are the principal units of
computation) and connectors (which are the communication vehicles
among components).
• Answers questions such as
• What are the major executing components and how do they interact?
• What are the major shared data stores?
• Which parts of the system are replicated?
• How does data progress through the system?
• What parts of the system can run in parallel?
• How can the system's structure change as it executes?
• Allocation structures
• Show the relationship between the software elements and the elements in
one or more external environments in which the software is created and
executed.
• Answers questions such as
• What processor does each software element execute on?
• In what files is each element stored during development, testing, and
system building?
• What is the assignment of software elements to development teams?
The three structures correspond to the three broad types of decision that
architectural design involves
• How is the system to be structured as a set of code units (modules)?
• How is the system to be structured as a set of elements that have runtime
behavior (components) and interactions (connectors)?
• How is the system to relate to non-software structures in its environment (i.e.,
CPUs, file systems, networks, development teams, etc.)?
SOFTWARE STRUCTURES
Module
Module-based structures include the following.
• Decomposition
• larger modules are decomposed into smaller ones recursively until they are
small enough to be easily understood
• Modules in this structure represent a common starting point for design
• architect assigns item to modules for subsequent design and eventual
implementation.
• The structure ensures that any modification is only across only few modules
• Uses
• Also modules; the units are related by the uses relation
• The uses structure is used to engineer systems that can be easily extended
to add functionality or from which useful functional subsets can be easily
extracted.
• The ability to easily subset a working system allows for incremental
development
• Layered
• a layer is a coherent set of related functionality
• Layers are often designed as abstractions that hide implementation
specifics below from the layers above
• Class, or generalization
• The module units in this structure are called classes. The relation is
"inherits-from" or "is-an-instance-of.“
• supports reasoning about collections of similar behavior or capability
• The class structure allows us to reason about re-use and the incremental
addition of functionality
Component-and-Connector
• Process, or communicating processes
• Orthogonal to the module-based structures and deals with the dynamic
aspects of a running system.
• The units here are processes or threads that are connected with each other
by communication, synchronization, and/or exclusion operations
• The relation in this is attachment, showing how the components and
connectors are hooked together.
• The process structure is important in helping to engineer a system's
execution performance and availability.
• Concurrency.
• This component-and-connector structure allows to determine opportunities
for parallelism and the locations where resource contention may occur.
• The units are components and the connectors are "logical threads."
• A logical thread is a sequence of computation that can be allocated to a
separate physical thread later in the design process.
• to identify the requirements for managing the issues associated with
concurrent execution.
• Shared data, or repository.
• This structure comprises components and connectors that create, store, and
access persistent data.
• It shows how data is produced and consumed by runtime software elements.
• It can be used to ensure good performance and data integrity.
• Client-server.
• If the system is built as a group of cooperating clients and servers, this is a good
component-and-connector structure to illuminate.
• The components are the clients and servers, and the connectors are protocols
and messages they share to carry out the system's work.
• This is useful for separation of concerns (supporting modifiability), for physical
distribution, and for load balancing (supporting runtime performance).
Allocation
• Deployment
• shows how software is assigned to hardware-processing and
communication elements.
• The elements are software (usually a process from a component-and-
connector view), hardware entities (processors), and communication
pathways.
• Relations are "allocated-to," showing on which physical units the software
elements reside, and "migrates-to," if the allocation is dynamic. This view
allows an engineer to reason about performance, data integrity, availability,
and security.
• It is of particular interest in distributed or parallel systems.
• Implementation.
• This structure shows how software elements (usually modules) are mapped
to the file structure(s) in the system's development, integration, or
configuration control environments.
• This is critical for the management of development activities and build
processes.
• Work assignment.
• This structure assigns responsibility for implementing and integrating the
modules to the appropriate development teams.
• Having a work assignment structure as part of the architecture makes it
clear that the decision about who does the work has architectural as well as
management implications.
• The architect will know the expertise required on each team.
• On large multi-sourced distributed development projects, the work
assignment structure is the means for calling out units of functional
commonality and assigning them to a single team, rather than having them
implemented by everyone who needs them.
Common software architecture structures
Page
No: 60
• Each of these structures provides a different perspective and design handle on
a system, and each is valid and useful
• the dominant structure is module decomposition