Principles of Se CH5
Principles of Se CH5
relevant photo
around this box] CHAPTER
5
This chapter illustrates the
architectural design and its
role in the software process
Software Architecture
Subtopics:-
5.1 Software architecture and the software life cycle
5.2 Architecture design
5.3 Software architecture assessment
5.4 Reference architectures
5.5 Summary
The design process for identifying the sub-systems making up a system and the framework
for sub-system control and communication is architectural design. The output of this design
process is a description of the software architecture.
Architecture in the small is concerned with the architecture of individual programs. At this
level, we are concerned with the way that an individual program is decomposed into
components. Architecture in the large is concerned with the architecture of complex
enterprise systems that include other systems, programs, and program components. These
enterprise systems are distributed over different computers, which may be owned and
managed by different companies.
36 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
The advantages of explicit architecture are:
I. Stakeholder communication
• Architecture may be used as a focus of discussion by system stakeholders.
II. System analysis
• Means that analysis of whether the system can meet its non-functional
requirements is possible.
III. Large-scale reuse
• The architecture may be reusable across a range of systems.
• Product-line architectures may be developed.
Software life cycle models describe phases of the software cycle and the order in which
those phases are executed. Each phase produces deliverables required by the next phase
in the life cycle. Requirements are translated into design. Code is produced according to
the design which is called development phase. After coding and development, the testing
verifies the deliverable of the implementation phase against requirements.
There are six phases in every software development life cycle model:
I. Requirement gathering and analysis- Business requirements are gathered in this
phase. This phase is the main focus of the project managers and stake holders. After
requirement gathering these requirements are analyzed for their validity and the
possibility of incorporating the requirements in the system to be development is also
studied. Finally, a Requirement Specification document is created which serves the
purpose of guideline for the next phase of the model.
II. Design- In this phase, the system and software design is prepared from the
requirement specifications which were studied in the first phase. System Design helps
in specifying hardware and system requirements and also helps in defining overall
system architecture. The system design specifications serve as input for the next
phase of the model.
III. Implementation or coding- On receiving system design documents, the work is
divided in modules/units and actual coding is started. Since, in this phase the code is
produced so it is the main focus for the developer. This is the longest phase of the
software development life cycle.
37 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
IV. Testing- After the code is developed it is tested against the requirements to make
sure that the product is actually solving the needs addressed and gathered during
the requirements phase. During this phase all types of functional testing like unit
testing, integration testing, system testing, acceptance testing is done as well as non-
functional testing are also done.
V. Deployment- After successful testing, the product is delivered / deployed to the
customer for their use. As soon as the product is given to the customers they will first
do the beta testing. If any changes are required or if any bugs are caught, then they
will report it to the engineering team. Once those changes are made or the bugs are
fixed then the final deployment will happen.
VI. Maintenance- Once when the customers start using the developed system then the
actual problems come up and needs to be solved from time to time. This process
where the care is taken for the developed product is known as maintenance.
Architecture design is an early stage of the system design process. It represents the link
between specification and design processes. It is often carried out in parallel with some
specification activities. It involves identifying major system components and their
communications.
Simple, informal block diagrams showing entities and relationships are the most frequently
used method for documenting software architectures. But these have been criticized
because they lack semantics, do not show the types of relationships between entities nor
the visible properties of entities in the architecture. Depends on the use of architectural
models. The requirements for model semantics depends on how the models are used.
Box and line diagrams are very abstract as they do not show the nature of component
relationships nor the externally visible properties of the sub-systems. However, they are useful
for communication with stakeholders and for project planning.
The uses of architectural models are mainly for the following purposes:
I. As a way of facilitating discussion about the system design
• A high-level architectural view of a system is useful for communication with
system stakeholders and project planning because it is not cluttered with
detail. Stakeholders can relate to it and understand an abstract view of the
38 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
system. They can then discuss the system as a whole without being confused
by detail.
II. As a way of documenting an architecture that has been designed
• The aim here is to produce a complete system model that shows the different
components in a system, their interfaces and their connections.
Layered Architecture
Figure 5.1: A generic layered architecture Figure 5.2: Example of layered architecture for LIBSYS system
Repository Architecture
39 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
o Each sub-system maintains its own database and passes data explicitly to
other sub-systems.
• When large amounts of data are to be shared, the repository model of sharing is most
commonly used a this is an efficient data sharing mechanism.
Name Repository
Description All data in a system is managed in a central repository that is accessible to all system
components. Components do not interact directly, only through the repository.
Example The following figure is an example of an IDE where the components use a repository of
system design information. Each software tool generates information which is then
available for use by other tools.
When used You should use this pattern when you have a system in which large volumes of
information are generated that has to be stored for a long time. You may also use it in
data-driven systems where the inclusion of data in the repository triggers an action or
tool.
Advantages Components can be independent—they do not need to know of the existence of other
components. Changes made by one component can be propagated to all
components. All data can be managed consistently (e.g., backups done at the same
time) as it is all in one place.
Disadvantages The repository is a single point of failure so problems in the repository affect the whole
system. May be inefficiencies in organizing all communication through the repository.
Distributing the repository across several computers may be difficult.
• Distributed system model which shows how data and processing is distributed across
a range of components. It can be implemented on a single computer.
• Set of stand-alone servers which provide specific services such as printing, data
management, etc.
• Set of clients which call on these services.
• Network which allows clients to access servers.
Name Client-server
Description In a client–server architecture, the functionality of the system is organized into services,
with each service delivered from a separate server. Clients are users of these services
and access servers to make use of them.
Example The following figure is an example of a film and video/DVD library organized as a client–
server system.
40 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
When used Used when data in a shared database has to be accessed from a range of locations.
Because servers can be replicated, may also be used when the load on a system is
variable.
Advantages The principal advantage of this model is that servers can be distributed across a network.
General functionality (e.g., a printing service) can be available to all clients and does
not need to be implemented by all services.
Disadvantages Each service is a single point of failure so susceptible to denial of service attacks or server
failure. Performance may be unpredictable because it depends on the network as well
as the system. May be management problems if servers are owned by different
organizations.
Application Architecture
41 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
III. Event processing systems
◦ Applications where system actions depend on interpreting events from the
system’s environment.
IV. Language processing systems
◦ Applications where the users’ intentions are specified in a formal language that
is processed and interpreted by the system.
• Process user requests for information from a database or requests to update the
database.
• From a user perspective, a transaction is:
o Any coherent sequence of operations that satisfies a goal;
o For example - find the times of flights from London to Paris.
• Users make asynchronous requests for service which are then processed by a transaction
manager.
• The examples of transaction processing systems are E-Commerce systems and
reservation systems.
Language processing systems accept a natural or artificial language as input and generate
some other representation of that language. They may include an interpreter to act on the
instructions in the language that is being processed.
42 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
The examples of language processing systems are compilers and command interpreters.
43 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
• quality attribute prediction: state a conclusion
• state a list of architecture problems (possibilities for improvement)
II. Simulation
• Prototype architecture implementation and abstract components
• implement the profile(s)
• simulate system and initiate scenarios
• collect results and predict quality attributes, for example: correctness,
performance, reliability
• identify functionality mismatches
III. Mathematical Modeling
• select and abstract appropriate mathematical model, for example:
performance modeling
• represent the architecture in terms of the model
• estimate the required input data
• calculate the model output and interpret the results
• quality attribute prediction: state conclusion
• make list of architectural problems
IV. Experience-based reasoning
• reasoning based on logical arguments
• especially for experienced s/w engineers
• basis for other techniques
• architecture assessment teams
44 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
• assess for each family member
• assess most important systems
• assess low- and high-end systems
• The goal is to determine ability of architecture to support all products in family
The power of a reference architecture is that it creates a shared mental model for the
architecture and design and it can help you identify the key decisions and key risks early
on. This helps you both shape a skeleton solution as well as identify what you need to
prototype, especially in terms of cross-cutting concerns, or tracer-bullets. From an agile
perspective, the Reference Architecture complements the system metaphor and it helps
you identify potential areas to spike on.
In the field of software architecture, many empirical studies have shown the following
common benefits and drawbacks from adopting a software reference architecture within
organizations:
(a) improvement of the interoperability of the software systems by establishing a standard
solution and common mechanisms for information exchange;
45 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e
(b) reduction of the development costs of software projects through the reuse of common
assets;
(c) improvement of the communication inside the organization because stakeholders share
the same architectural mindset; and,
(d) influencing the learning curve of developers due to the need of learning its features.
Summary
46 | P a g e C h a p t e r 5 : S o f t w a r e A r c h i t e c t u r e