+ All Categories
Home > Documents > Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software...

Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software...

Date post: 01-Dec-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
69
Software Architecture The software architecture of a system is the set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both. This definition stands in contrast to other definitions that talk about the system's "early" or "major “design decisions. Architecture explain about what a system has to do but not how to do. Software architecture is about making fundamental structural choices which are costly to change once implemented. Software architecture choices include specific structural options from possibilities in the design of software. For example, the systems that controlled the space shuttle launch vehicle had the requirement of being very fast and very reliable. Therefore, an appropriate real-time computing language would need to be chosen. Documenting software architecture facilitates communication between stakeholders , captures early decisions about the high-level design, and allows reuse of design components between projects . Types of Architectures: Computer architecture Computer architecture targets the internal structure of a computer system, in terms of collaborating hardware components such as the CPU – or processor – the bus and the memory. Systems architecture The term systems architecture has originally been applied to the architecture of systems that consists of both hardware and software. The main concern addressed by the systems architecture is then the integration of software and hardware in a complete, correctly working device. In another common – much broader – meaning, the term applies to the architecture of any complex system which may be of technical, sociotechnical or social nature. Enterprise architecture
Transcript
Page 1: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Software Architecture

The software architecture of a system is the set of structures needed to reason about thesystem, which comprise software elements, relations among them, and properties of both.This definition stands in contrast to other definitions that talk about the system's "early" or "major “design decisions.

Architecture explain about what a system has to do but not how to do.

Software architecture is about making fundamental structural choices which are costly to change once implemented. Software architecture choices include specific structural options from possibilities in the design of software. For example, the systems that controlled the space shuttle launch vehicle had the requirement of being very fast and very reliable. Therefore, an appropriate real-time computing language would need to be chosen. 

Documenting software architecture facilitates communication between stakeholders, captures early decisions about the high-level design, and allows reuse of design components between projects.

Types of Architectures:

Computer architectureComputer architecture targets the internal structure of a computer system, in terms of collaborating hardware components such as the CPU – or processor – the bus and the memory.

Systems architectureThe term systems architecture has originally been applied to the architecture of systems that consists of both hardware and software. The main concern addressed by the systems architecture is then the integration of software and hardware in a complete, correctly working device. In another common – much broader – meaning, the term applies to the architecture of any complex system which may be of technical, sociotechnical or social nature.

Enterprise architectureThe goal of enterprise architecture is to "translate business vision and strategy into effective enterprise".[45] Enterprise architecture frameworks, such as TOGAF and the Zachman Framework, usually distinguish between different enterprise architecture layers. Although terminology differs from framework to framework, many include at least a distinction between a business layer, an application (or information) layer, and a technology layer. Enterprise architecture addresses among others the alignment between these layers, usually in a top-down approach.

The Architecture Business Cycle:

The architecture of a system describes its major components, their relationships (structures), and how they interact with each other. Software architecture and design includes several contributory factors such as Business strategy, quality attributes, human dynamics, design, and IT environment.

Page 2: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Software Architecture and system Design:

Software Architecture Environment

Architecture consists of structures and structures consist of elements, and relations, it follows that architecture comprises software elements and how the elements relate to each other. This means that architecture specifically omits certain information about elements that is not useful for reasoning about the system in particular, it omits information that has no ramifications outside of a single element. Thus, an architecture is foremost an abstraction of a system that selects certain details and suppresses others.

Page 3: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Software Architecture consists of Software components Details regarding Data structures and Algorithms Relationship among components Data flow, Control flow and dependencies

Elements of Software Architecture:

Components: Abstract units of software instructions and internal states which provides transformation of data.

Connectors: Communication components between the elements, they should have cooperation among the components.

Configuration Topologies: Represents Structures of architecture relationships.System Models: Different architectural styles.

Goals of Architecture:The primary goal of the architecture is to identify requirements that affect the structure of the application. A well-laid architecture reduces the business risks associated with building a technical solution and builds a bridge between business and technical requirements.Some of the other goals are as follows −

Expose the structure of the system, but hide its implementation details.

Realize all the use-cases and scenarios.

Try to address the requirements of various stakeholders.

Handle both functional and quality requirements.

Reduce the goal of ownership and improve the organization’s market position.

Improve quality and functionality offered by the system.

Improve external confidence in either the organization or system.

LimitationsSoftware architecture is still an emerging discipline within software engineering. It has the following limitations −

Lack of tools and standardized ways to represent architecture.

Lack of analysis methods to predict whether architecture will result in an implementation that meets the requirements.

Lack of awareness of the importance of architectural design to software development.

Lack of understanding of the role of software architect and poor communication among stakeholders.

Page 4: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Lack of understanding of the design process, design experience and evaluation of design.

Role of Software ArchitectA Software Architect provides a solution that the technical team can create and design for the entire application. A software architect should have expertise in the following areas −

Design Expertise Expert in software design, including diverse methods and approaches such as object-

oriented design, event-driven design, etc. Lead the development team and coordinate the development efforts for the integrity

of the design. Should be able to review design proposals and tradeoff among themselves.

Domain Expertise Expert on the system being developed and plan for software evolution. Assist in the requirement investigation process, assuring completeness and

consistency. Coordinate the definition of domain model for the system being developed.

Technology Expertise Expert on available technologies that helps in the implementation of the system. Coordinate the selection of programming language, framework, platforms, databases,

etc.

Methodological Expertise Expert on software development methodologies that may be adopted during SDLC

(Software Development Life Cycle). Choose the appropriate approaches for development that helps the entire team.

Hidden Role of Software Architect Facilitates the technical work among team members and reinforcing the trust

relationship in the team. Information specialist who shares knowledge and has vast experience. Protect the team members from external forces that would distract them and bring

less value to the project.

Deliverables of the Architect A clear, complete, consistent, and achievable set of functional goals A functional description of the system, with at least two layers of decomposition A concept for the system A design in the form of the system, with at least two layers of decomposition

Page 5: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

A notion of the timing, operator attributes, and the implementation and operation plans

A document or process which ensures functional decomposition is followed, and the form of interfaces is controlled

Architectural Patterns:

An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Architectural patterns are similar to software design pattern but have a broader scope.

Architectural elements are composed in ways that solve particular problems. Thecompositions have been found useful over time, and over many different domains, and so they have been documented and disseminated. These compositions of architectural elements, called architectural patterns, provide packaged strategies for solving some of the problems facing a system.

An architectural pattern delineates the element types and their forms of interaction used in solving the problem. Patterns can be characterized according to the type of architectural elements they use. For example, a common module type pattern is this:• Layered pattern: When the uses relation among software elements is strictly

unidirectional, a system of layers emerges. A layer is a coherent set of related functionality. In a strictly layered structure, a layer can only use the services of the layer immediately below it. Many variations of this patten, lessening the structural restriction, occur in practice. Layers are often designed as abstractions (virtual tnachines) that hide implementation specifics below from the layers above, engendering portability.

This pattern can be used to structure programs that can be decomposed into groups of subtasks, each of which is at a particular level of abstraction. Each layer provides services to the next higher layer.

The most commonly found 4 layers of a general information system are as follows.

Presentation layer (also known as UI layer)

Application layer (also known as service layer)

Business logic layer (also known as domain layer)

Data access layer (also known as persistence layer)

Usage

General desktop applications.

E commerce web applications.

Page 6: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Common component-and-connector type patterns are these:• Shared-data (or repository) pattern: This pattern comprises components and

connectors that create, store, and access persistent data. The repository usually takes the form of a(commercial) database. The connectors are protocols for managing the data, such as SQL.

• Client-server pattern: The components are the clients and the servers, and the connectors areprotocols and messages they share among each other to carry out the system's work.

This pattern consists of two parties; a server and multiple clients. The server component will provide services to multiple client components. Clients request services from the server and the server provides relevant services to those clients. Furthermore, the server continues to listen to client requests.

Usage

Online applications such as email, document sharing and banking.

Common allocation patterns include the following:

• Multi-tier pattern: which describes how to distribute and allocate the components of a

Page 7: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

system in distinct subsets of hardware and software, connected by some communication medium. Thispattern specializes the generic deployment (software-to-hardware allocation) structure.

Usage

In database replication, the master database is regarded as the authoritative source, and the slave databases are synchronized to it.

Peripherals connected to a bus in a computer system (master and slave drives).

• Competence center and platform: which are patterns that specialize a software system's work assignment structure. In competence center, work is allocated to sites depending on thetechnical or domain expertise located at a site. For example, user-interface design is done at asite where usability engineering experts are located. In platform, one site is tasked withdeveloping reusable core assets of a software product line (see Chapter 25), and other sitesdevelop applications that use the core assets.

Reference Models, and Reference Architectures

A reference model is a starting point and full-fledged architecture with all appropriate information about the system filled in host of intermediate stage. Each stage represents outcome of a set of architecture decisions that binding of architectural choice.

A reference model is a division of functionality together with data flow between the pieces. A reference model is a standard decomposition of a known problem into parts that cooperatively solve the problem. Arising from experience, reference models are a characteristic of mature domains.

A reference architecture is a reference model mapped onto software elements (that cooperatively implement the functionality defined in the reference model) and the data flows between them. Whereas a reference model divides the functionality, a reference architecture is the mapping of that functionality onto a system decomposition. The mapping may be, but by no means necessarily is, one to one. A software element may implement part of a function or several functions.

Reference models, architectural patterns, and reference architectures are not architectures; they are useful concepts that capture elements of an architecture. Each is the outcome of early design decisions.

Page 8: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Architectural Structures and Views

The neurologist, the orthopedist, the hematologist, and the dermatologist all have a different view of the structure of a human body. Ophthalmologists, cardiologists, and podiatrists concentrate on subsystems. The kinesiologist and psychiatrist are concerned with different aspects of the entire arrangement's behavior. Although these views are pictured differently and have very different properties, all are inherently related: Together they describe the architecture of the human body.

So it is with software. Modern systems are more than complex enough to make it difficult to grasp them all at once. Instead, we restrict our attention at any one moment to one (or a small number) of the software system's structures. To communicate meaningfully about an architecture, we must make clear which structure or structures we are discussing at the moment-which view we are taking of the architecture

We will be using the related terms structure and view when discussing architecture representation.

A view is a representation of a coherent set of architectural elements, as written by and read by system stakeholders. It consists of a representation of a set of elements and the relations among them.

A structure is the set of elements itself, as they exist in software or hardware.

Structures: Structures are fairly easy to identify in software, and they form a powerful tool

for system design. A structure is simply a set of elements held together by a relation. Software systems

are composed of many structures, and no single structure holds claim to being the architecture.

Architectural structures can by and large be divided into three groups, depending on the broad nature of the elements they show.

Module structures: Here the elements are modules, which are units of implementation. Modules represent a code-based way of considering the system. They are assigned areas of functional responsibility. There is less emphasis on how the resulting software manifests itself at runtime. Module structures allow us to 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?

Page 9: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Component-and-connector structures: Here the elements are runtime components (which are the principal units of computation) and connectors (which are the communication vehicles among components). Component-and-connector structures help answer 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: 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. They answer 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?

These 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 nonsoftware structures in its environment (i.e., CPUs, file systems, networks, development teams, etc.)?

Module-based structures include the following.

Decomposition: The units are modules related to each other by the "is a submodule of " relation, showing how 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, as the architect enumerates what the units of software will have to do and assigns each item

Page 10: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

to a module for subsequent (more detailed) design and eventual implementation. Modules often have associated products (i.e., interface specifications, code, test plans, etc.). The decomposition structure provides a large part of the system's modifiability, by ensuring that likely changes fall within the purview of at most a few small modules. It is often used as the basis for the development project's organization, including the structure of the documentation, and its integration and test plans.

In Module structure, the elements are modules of some kind (perhaps classes, or layers, or merely divisions of functionality, all of which are units of implementation). Modules represent a static way of considering the system. Modules are assigned areas of functional responsibility;

Uses: The units of this important but overlooked structure are also modules, procedures or resources on the interfaces of modules. The units are related by the uses relation. One unit uses another if the correctness of the first requires the presence of a correct version (as opposed to a stub) of the second.

Layered: When the uses relations in this structure are carefully controlled in a particular way, a system of layers emerges, in which a layer is a coherent set of related functionality. In a strictly layered structure, layer n may only use the services of layer n - 1. Many variations of this (and a lessening of this structural restriction) occur in practice, however. Layers are often designed as abstractions.

Class, or generalization: The module units in this structure are called classes. The relation is "inherits-from" or "is-an-instance-of." The class structure allows us to reason about re-use and the incremental addition of functionality.

Component-and-Connector

These structures include the following.

Process, or communicating processes: Like all component-and-connector structures, this one is 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 (and in all component-and-connector structures) 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 the architect 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. The concurrency structure is used early in design to identify the requirements for managing the issues associated with concurrent execution.

Page 11: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Shared data, or repository: This structure comprises components and connectors that create, store, and access persistent data. If the system is in fact structured around one or more shared data repositories, this structure is a good one to illuminate. It shows how data is produced and consumed by runtime software elements, and 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

Allocation structures include the following.

Deployment:  The deployment structure 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.

Software Structure Relations Useful for

Decomposition Is a submodule of; shares secret with Resource allocation and project structuring and planning; information hiding, encapsulation; configuration control

Uses Requires the correct presence of Engineering subsets; engineering extensions

Layered Requires the correct presence of; uses the services of; provides abstraction to

Incremental development; implementing systems on top of "virtual machines" portability

Class Is an instance of; shares access methods of

In object-oriented design systems, producing rapid almost-alike

Page 12: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Software Structure Relations Useful for

implementations from a common template

Client-Server Communicates with; depends on Distributed operation; separation of concerns; performance analysis; load balancing

Process Runs concurrently with; may run concurrently with; excludes; precedes; etc.

Scheduling analysis; performance analysis

Concurrency Runs on the same logical thread Identifying locations where resource contention exists, where threads may fork, join, be created or be killed

Shared Data Produces data; consumes data Performance; data integrity; modifiability

Deployment Allocated to; migrates to Performance, availability, security analysis

Implementation Stored in Configuration control, integration, test activities

Work Assignment Assigned to Project management, best use of expertise, management of commonality

Creating and Architecture:

Quality Attributes:

A quality attribute requirement should be unambiguous and testable. We use a common form to specify all quality attribute requirements.

Computer systems are used in many critical applications where a failure can have serious con- sequences (loss of lives or property). Critical applications have the following characteristics:

The applications have long life cycles (decades rather than years) and require evolutionary upgrades.

The applications require continuous or nearly non-stop operation. The applications require interaction with hardware devices. The applications assign paramount importance to quality attributes such as

timeliness, reliability, safety, interoperability, etc.

Developing systematic ways to relate the software quality attributes of a system to the system’s architecture provides a sound basis for making objective decisions about design trade- offs and enables engineers to make reasonably accurate predictions about a system’s at- tributes that are free from bias and hidden assumptions. The ultimate goal is the ability to

Page 13: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

quantitatively evaluate and trade off multiple software quality attributes to arrive at a better overall system.

Software Quality Attributes:

Developers of critical systems are responsible for identifying the requirements of the application, developing software that implements the requirements, and for allocating appropriate resources (processors and communication networks). It is not enough to merely satisfy functional requirements. Critical systems in general must satisfy security, safety, dependability, performance, and other, similar requirements as well. Software quality is the degree to which software possesses a desired combination of attributes (e.g., reliability, interoperability)

Quality Attributes:

Usually, business considerations determine the qualities that must be accommodated in a system architecture. Too often, functionality overrides maintainability, portability, scalability, and other factors determining the long-term success of a project. Functionality and quality attributes are orthogonal, since a given functionality can be achieved by many different architectures. 

Quality requirements depend on the system architecture more than on the functional requirements. The quality attributes are

There are three main categories of quality attributes:

System Qualities: availability, modifiability, performance, security, testability, usability, others.

Business Qualities: time to market, cost and benefit, product lifetime, target market, roll-out schedule, integration, others. 

Architectural Qualities: conceptual integrity, correctness and completeness.

A quality attribute scenario has six parts, shown in the schematic:

Page 14: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Source of Stimulus: the entity generating the stimulus. Could be an actor, an actuator, a sensor, and so on.

Stimulus: a condition arriving at a system. Includes faults, stated intentions by actors, and so on.

Environment: the conditions surrounding the stimulus. Might be normal operation, degraded operation, overload, and so on.

Artifact: the part or parts of the system stimulated. Response: the response the system takes to the stimulus. Response Measure: how the response can be measured and test.

System Quality Attributes:

Availability: 

The availability attribute is concerned with system failures. Faults are problems that are corrected or masked by the system. Failures are uncorrected errors that are user-visible.availability = [mean time to failure] / ([mean time to failure] + [mean time to repair]) 

Modifiability:

The modifiability quality is concerned with what can change, when are changes made, and who makes the changes.

Performance:

The performance quality is concerned with response times and similar measures for various events.

Security:

Non-repudiation  Confidentiality  Integrity  Assurance or authenticity  Availability (no denial of service)  Auditing 

Page 15: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Testability:

The testability attribute is concerned with detecting failure modes. Typically, 40% of the cost of a large project is spent on testing. This means architectural support for testing that reduces test cost is time well spent. We need to control the internal state of and inputs to each unit, then observe the corresponding output of that unit. 

Usability:

How easy it is to learn the features of the system  How efficiently the user can use the system  How well the system handles user errors  How well the system adapts to user needs  To what degree the system gives the user confidence in the correctness

of its actions. 

Business Quality Attributes:

Time to Market: architectural reuse affects development time. Cost and Benefit: in-house architectural expertise is cheaper than outside

expertise. Projected Lifetime of the System: long-lived systems require architectures

that are modifiable and scalable. Targeted Market: architecture affects what platforms will be compatible and

incompatible with the system. Roll-out Schedule: if functionality is planned to increase over time, the

architecture needs to be customisable and flexible. Integration with Legacy Systems: the architecture of the legacy system being

integrated will influence the overall system’s architecture.

Architectural Quality Attributes:

Conceptual Integrity is the underlying vision or theme unifying the components and their interactions. The architecture should do similar things in similar ways.

Correctness and Completeness is concerned with checking the architecture for errors and omissions.

Buildability is concerned with the organization’s capabilities to actually construct the architecture in question.

12 software architecture Quality attributes

Performance – shows the response of the system to performing certain actions for a certain period of time.

Interoperability is an attribute of the system or part of the system that is responsible for its operation and the transmission of data and its exchange with other external systems.

Page 16: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Usability is one of the most important attributes, because, unlike in cases with other attributes, users can see directly how well this attribute of the system is worked out.

Reliability is an attribute of the system responsible for the ability to continue to operate under predefined conditions.

Availability is part of reliability and is expressed as the ratio of the available system time to the total working time.

Security is responsible for the ability of the system to reduce the likelihood of malicious or accidental actions as well as the possibility of theft or loss of information.

Maintainability is the ability of the system to support changes.

Modifiability determines how many common changes need to be made to the system to make changes to each individual item.

Testability shows how well the system allows performing tests, according to predefined criteria.

Scalability is the ability of the system to handle load increases without decreasing performance, or the possibility to rapidly increase the load.

Reusability is a chance of using a component or system in other components/systems with small or no change.

Supportability is the ability of the system to provide useful information for identifying and solving problems.

Achieving qualities:

A system design consists of a collection of decisions. Some of these decisions help control the quality attribute responses; others ensure achievement of system functionality. In this section, we discuss the quality attribute decisions known as tactics. We represent this relationship in Figure 5.1. The tactics are those that architects have been using for years, and we isolate and describe them. We are not inventing tactics here, just capturing what architects do in practice.

Each tactic is a design option for the architect. For example, one of the tactics introduces redundancy to increase the availability of a system. This is one option the architect has to increase availability, but not the only one. Usually achieving high availability through

Page 17: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

redundancy implies a concomitant need for synchronization (to ensure that the redundant copy can be used if the original fails). We see two immediate ramifications of this example.

1. Tactics can refine other tactics. We identified redundancy as a tactic. As such, it can be refined into redundancy of data (in a database system) or redundancy of computation (in an embedded control system). Both types are also tactics. There are further refinements that a designer can employ to make each type of redundancy more concrete. For each quality attribute that we discuss, we organize the tactics as a hierarchy.

2. Patterns package tactics. A pattern that supports availability will likely use both a redundancy tactic and a synchronization tactic. It will also likely use more concrete versions of these tactics. At the end of this section, we present an example of a pattern described in terms of its tactics.

We organize the tactics for each system quality attribute as a hierarchy, but it is important to understand that each hierarchy is intended only to demonstrate some of the tactics, and that any list of tactics is necessarily incomplete. For each of the six attributes that we elaborated in Chapter 4 (availability, modifiability, performance, security, testability, and usability), we discuss tactical approaches for achieving it. For each, we present an organization of the tactics and a brief discussion. The organization is intended to provide a path for the architect to search for appropriate tactics.

Availability Tactics

 A failure occurs when the system no longer delivers a service that is consistent with its specification; this failure is observable by the system's users. A fault (or combination of faults) has the potential to cause a failure. Recall also that recovery or repair is an important aspect of availability. The tactics we discuss in this section will keep faults from becoming failures or at least bound the effects of the fault and make repair possible. We illustrate this in Figure 5.2.

Goal of availability tactics

Many of the tactics we discuss are available within standard execution environments such as operating systems, application servers, and database management systems. It is still important to understand the tactics used so that the effects of using a particular one can be considered during design and evaluation. All approaches to maintaining availability involve some type of redundancy, some type of health monitoring to detect a failure, and some type of recovery when a failure is detected. In some cases, the monitoring or recovery is automatic and in others it is manual.

Page 18: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

We first consider fault detection. We then consider fault recovery and finally, briefly, fault prevention.

FAULT DETECTION

Three widely used tactics for recognizing faults are ping/echo, heartbeat, and exceptions.

Ping/echo. One component issues a ping and expects to receive back an echo, within a predefined time, from the component under scrutiny. This can be used within a group of components mutually responsible for one task. It can also used be used by clients to ensure that a server object and the communication path to the server are operating within the expected performance bounds.

Heartbeat (dead man timer). In this case one component emits a heartbeat message periodically and another component listens for it. If the heartbeat fails, the originating component is assumed to have failed and a fault correction component is notified. The heartbeat can also carry data

Exceptions. One method for recognizing faults is to encounter an exception. The exception handler typically executes in the same process that introduced the exception.

The ping/echo and heartbeat tactics operate among distinct processes, and the exception tactic operates within a single process. The exception handler will usually perform a semantic transformation of the fault into a form that can be processed.

FAULT RECOVERY

Fault recovery consists of preparing for recovery and making the system repair. Some preparation and repair tactics follow.

Voting: Processes running on redundant processors each take equivalent input and compute a simple output value that is sent to a voter. If the voter detects deviant behavior from a single processor, it fails it. The voting algorithm can be "majority rules" or "preferred component" or some other algorithm. This method is used to correct faulty operation of algorithms or failure of a processor and is often used in control systems.

One extreme of diversity is that the software for each redundant component is developed by different teams and executes on dissimilar platforms. Less extreme is to develop a single software component on dissimilar platforms. Diversity is expensive to develop and maintain and is used only in exceptional circumstances, such as the control of surfaces on aircraft. It is usually used for control systems in which the

Page 19: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

outputs to the voter are straightforward and easy to classify as equivalent or deviant, the computations are cyclic, and all redundant components receive equivalent inputs from sensors.

Active redundancy (hot restart). All redundant components respond to events in parallel. Consequently, they are all in the same state. The response from only one component is used (usually the first to respond), and the rest are discarded. When a fault occurs, the downtime of systems using this tactic is usually milliseconds since the backup is current and the only time to recover is the switching time. Active redundancy is often used in a client/server configuration, such as database management systems, where quick responses are necessary even when a fault occurs.

Synchronization is performed by ensuring that all messages to any redundant component are sent to all redundant components. If communication has a possibility of being lost (because of noisy or overloaded communication lines), a reliable transmission protocol can be used to recover.

Passive redundancy One component (the primary) responds to events and informs the other components (the standbys) of state updates they must make. When a fault occurs, the system must first ensure that the backup state is sufficiently fresh before resuming services. This approach is also used in control systems, often when the inputs come over communication channels or from sensors and have to be switched from the primary to the backup on failure

Synchronization is the responsibility of the primary component, which may use atomic broadcasts to the secondaries to guarantee synchronization.

Spare: A standby spare computing platform is configured to replace many different failed components. It must be rebooted to the appropriate software configuration and have its state initialized when a failure occurs.

Shadow operation. A previously failed component may be run in "shadow mode" for a short time to make sure that it mimics the behavior of the working components before restoring it to service.

State resynchronization. The passive and active redundancy tactics require the component being restored to have its state upgraded before its return to service. The updating approach will depend on the downtime that can be sustained, the size of the update, and the number of messages required for the update.

Checkpoint/rollback. A checkpoint is a recording of a consistent state created either periodically or in response to specific events. Sometimes a system fails in an unusual manner, with a detectably inconsistent state. In this case, the system should be restored using a previous checkpoint of a consistent state and a log of the transactions that occurred since the snapshot was taken.

FAULT PREVENTION

The following are some fault prevention tactics.

Removal from service. This tactic removes a component of the system from operation to undergo some activities to prevent anticipated failures. One example is rebooting a component to prevent memory leaks from causing a failure. If this removal from service is automatic, an architectural strategy can be designed to support it. If it is manual, the system must be designed to support it.

Page 20: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Transactions. A transaction is the bundling of several sequential steps such that the entire bundle can be undone at once. Transactions are used to prevent any data from being affected if one step in a process fails and also to prevent collisions among several simultaneous threads accessing the same data.

Process monitor. Once a fault in a process has been detected, a monitoring process can delete the nonperforming process and create a new instance of it, initialized to some appropriate state as in the spare tactic.

.

Modifiability Tactics

 Tactics to control modifiability have as their goal controlling the time and cost to implement, test, and deploy changes. Figure 5.4 shows this relationship.

We organize the tactics for modifiability in sets according to their goals. One set has as its goal reducing the number of modules that are directly affected by a change. We call this set "localize modifications." A second set has as its goal limiting modifications to the localized modules. We use this set of tactics to "prevent the ripple effect."

LOCALIZE MODIFICATIONS

Although there is not necessarily a precise relationship between the number of modules affected by a set of changes and the cost of implementing those changes, restricting

Page 21: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

modifications to a small set of modules will generally reduce the cost. The goal of tactics in this set is to assign responsibilities to modules during design such that anticipated changes will be limited in scope. We identify five such tactics.

Maintain semantic coherence: Semantic coherence refers to the relationships among responsibilities in a module. The goal is to ensure that all of these responsibilities work together without excessive reliance on other modules. Achievement of this goal comes from choosing responsibilities that have semantic coherence. Coupling and cohesion metrics are an attempt to measure semantic coherence, but they are missing the context of a change. Instead, semantic coherence should be measured against a set of anticipated changes. One subtactic is to abstract common services. 

Anticipate expected changes: Considering the set of envisioned changes provides a way to evaluate a particular assignment of responsibilities. The basic question is "For each change, does the proposed decomposition limit the set of modules that need to be modified to accomplish it?" An associated question is "Do fundamentally different changes affect the same modules?" How is this different from semantic coherence? Assigning responsibilities based on semantic coherence assumes that expected changes will be semantically coherent.

Generalize the module: Making a module more general allows it to compute a broader range of functions based on input. The input can be thought of as defining a language for the module, which can be as simple as making constants input parameters or as complicated as implementing the module as an interpreter and making the input parameters be a program in the interpreter's language. The more general a module, the more likely that requested changes can be made by adjusing the input language rather than by modifying the module.

Limit possible options: Modifications, especially within a product line (see Chapter 14), may be far ranging and hence affect many modules. Restricting the possible options will reduce the effect of these modifications. For example, a variation point in a product line may be allowing for a change of processor. Restricting processor changes to members of the same family limits the possible options.

PREVENT RIPPLE EFFECTS

A ripple effect from a modification is the necessity of making changes to modules not directly affected by it. For instance, if module A is changed to accomplish a particular modification, then module B is changed only because of the change to module A. B has to be modified because it depends, in some sense, on A.

We begin our discussion of the ripple effect by discussing the various types of dependencies that one module can have on another. We identify eight types:

Syntax of

- data: For B to compile (or execute) correctly, the type (or format) of the data that is produced by A and consumed by B must be consistent with the type (or format) of data assumed by B.

Page 22: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

- service: For B to compile and execute correctly, the signature of services provided by A and invoked by B must be consistent with the assumptions of B.

Semantics of

- data: For B to execute correctly, the semantics of the data produced by A and consumed by B must be consistent with the assumptions of B.

- service: For B to execute correctly, the semantics of the services produced by A and used by B must be consistent with the assumptions of B.

Sequence of

- data: For B to execute correctly, it must receive the data produced by A in a fixed sequence. For example, a data packet's header must precede its body in order of reception (as opposed to protocols that have the sequence number built into the data).

- control:For B to execute correctly, A must have executed previously within certain timing constraints. For example, A must have executed no longer than 5ms before B executes.Identity of an interface of A. A may have multiple interfaces. For B to compile and execute correctly, the identity (name or handle) of the interface must be consistent with the assumptions of B.

Location of A (runtime). For B to execute correctly, the runtime location of A must be consistent with the assumptions of B. For example, B may assume that A is located in a different process on the same processor.

Quality of service/data provided by A. For B to execute correctly, some property involving the quality of the data or service provided by A must be consistent with B's assumptions. For example, data provided by a particular sensor must have a certain accuracy in order for the algorithms of B to work correctly.

Existence of A. For B to execute correctly, A must exist. For example, if B is requesting a service from an object A, and A does not exist and cannot be dynamically created, then B will not execute correctly.

Resource behavior of A. For B to execute correctly, the resource behavior of A must be consistent with B's assumptions. This can be either resource usage of A (A uses the same memory as B) or resource ownership (B reserves a resource that A believes it owns).

With this understanding of dependency types, we can now discuss tactics available to the architect for preventing the ripple effect for certain types.

Notice that none of our tactics necessarily prevent the ripple of semantic changes. We begin with discussion of those that are relevant to the interfaces of a particular module?information hiding

Page 23: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

and maintaining existing interfaces?and follow with one that breaks a dependency chain?use of an intermediary.

Hide information: Information hiding is the decomposition of the responsibilities for an entity (a system or some decomposition of a system) into smaller pieces and choosing which information to make private and which to make public. The public responsibilities are available through specified interfaces. The goal is to isolate changes within one module and prevent changes from propagating to others. This is the oldest technique for preventing changes from propagating. It is strongly related to "anticipate expected changes" because it uses those changes as the basis for decomposition.

Maintain existing interfaces: If B depends on the name and signature of an interface of A, maintaining this interface and its syntax allows B to remain unchanged. Of course, this tactic will not necessarily work if B has a semantic dependency on A, since changes to the meaning of data and services are difficult to mask.

Patterns that implement this tactic include

- adding interface: Most programming languages allow multiple interfaces. Newly visible services or data can be made available through new interfaces, allowing existing interfaces to remain unchanged and provide the same signature.

- adding adapter: Add an adapter to A that wraps A and provides the signature of the original A.Restrict communication paths: Restrict the modules with which a given module shares data. That is, reduce the number of modules that consume data produced by the given module and the number of modules that produce data consumed by it. This will reduce the ripple effect since data production/consumption introduces dependencies that cause ripples. Chapter 8 (Flight Simulation) discusses a pattern that uses this tactic.

Use an intermediary: If B has any type of dependency on A other than semantic, it is possible to insert an intermediary between B and A that manages activities associated with the dependency. All of these intermediaries go by different names, but we will discuss each in terms of the dependency types we have enumerated. As before, in the worst case, an intermediary cannot compensate for semantic changes. The intermediaries are

- data (syntax). Repositories (both blackboard and passive) act as intermediaries between the producer and consumer of data. The repositories can convert the syntax produced by A into that assumed by B.

- service (syntax). The facade, bridge, mediator, strategy, proxy, and factory patterns all provide intermediaries that convert the syntax of a service from one form into another. Hence, they can all be used to prevent changes in A from propagating to B.

-identity of an interface of A. A broker pattern can be used to mask changes in the identity of an interface. If B depends on the identity of an interface of A and that identity changes, by adding that identity to the broker and having the broker make the connection to the new identity of A, B can remain unchanged.

Page 24: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

- location of A (runtime). A name server enables the location of A to be changed without affecting B. A is responsible for registering its current location with the name server, and B retrieves that location from the name server.- resource behavior of A or resource controlled by A. A resource manager is an intermediary that is responsible for resource allocation. Certain resource managers (e.g., those based on Rate Monotonic Analysis in real-time systems) can guarantee the satisfaction of all requests within certain constraints. A, of course, must give up control of the resource to the resource manager.- existence of A. The factory pattern has the ability to create instances as needed, and thus the dependence of B on the existence of A is satisfied by actions of the factory.

DEFER BINDING TIME

The two tactic categories we have discussed thus far are designed to minimize the number of modules that require changing to implement modifications. Our modifiability scenarios include two elements that are not satisfied by reducing the number of modules to be changed?time to deploy and allowing nondevelopers to make changes. Deferring binding time supports both of those scenarios at the cost of requiring additional infrastructure to support the late binding.

Many tactics are intended to have impact at loadtime or runtime, such as the following.

Runtime registration supports plug-and-play operation at the cost of additional overhead to manage the registration. Publish/subscribe registration, for example, can be implemented at either runtime or load time.

Configuration files are intended to set parameters at startup. Polymorphism allows late binding of method calls. Component replacement allows load time binding. Adherence to defined protocols allows runtime binding of independent processes.

The tactics for modifiability are summarized in Figure 5.5.

Testability Tactics

The goal of tactics for testability is to allow for easier testing when an increment of software development is completed. Figure 5.10 displays the use of tactics for testability. Architectural techniques for enhancing the software testability have not received as much attention as more mature fields such as modifiability, performance, and availability, but, as we stated in Chapter 4, since testing consumes such a high percentage of system development cost, anything the architect can do to reduce this cost will yield a significant benefit.

Figure 5.10. Goal of testability tactics

Page 25: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Figure 5.11. Summary of testability tactics

Although in Chapter 4 we included design reviews as a testing technique, in this chapter we are concerned only with testing a running system. The goal of a testing regimen is to discover faults. This requires that input be provided to the software being tested and that the output be captured.

Executing the test procedures requires some software to provide input to the software being tested and to capture the output. This is called a test harness. A question we do not consider here is the design and generation of the test harness. In some systems, this takes substantial time and expense.

We discuss two categories of tactics for testing: providing input and capturing output, and internal monitoring.

INPUT/OUTPUT

There are three tactics for managing input and output for testing.

Record/playback. Record/playback refers to both capturing information crossing an interface and using it as input into the test harness. The information crossing an interface during normal operation is saved in some repository and represents output from one component and input to another. Recording this information allows test input for one of the components to be generated and test output for later comparison to be saved.

Separate interface from implementation. Separating the interface from the implementation allows substitution of implementations for various testing purposes. Stubbing implementations allows the remainder of the system to be tested in the absence of the component being stubbed. Substituting a specialized component allows the component being replaced to act as a test harness for the remainder of the system.

Specialize access routes/interfaces. Having specialized testing interfaces allows the capturing or specification of variable values for a component through a test harness as well as independently from its normal execution. For example, metadata might be

Page 26: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

made available through a specialized interface that a test harness would use to drive its activities. Specialized access routes and interfaces should be kept separate from the access routes and interfaces for required functionality. Having a hierarchy of test interfaces in the architecture means that test cases can be applied at any level in the architecture and that the testing functionality is in place to observe the response.

INTERNAL MONITORING

A component can implement tactics based on internal state to support the testing process.

Built-in monitors. The component can maintain state, performance load, capacity, security, or other information accessible through an interface. This interface can be a permanent interface of the component or it can be introduced temporarily via an instrumentation technique such as aspect-oriented programming or preprocessor macros. A common technique is to record events when monitoring states have been activated. Monitoring states can actually increase the testing effort since tests may have to be repeated with the monitoring turned off. Increased visibility into the activities of the component usually more than outweigh the cost of the additional testing.

Performance Tactics

Recall from Chapter 4 that the goal of performance tactics is to generate a response to an event arriving at the system within some time constraint. The event can be single or a stream and is the trigger for a request to perform computation. It can be the arrival of a message, the expiration of a time interval, the detection of a significant change of state in the system's environment, and so forth. The system processes the events and generates a response. Performance tactics control the time within which a response is generated. This is shown in Figure 5.6. Latency is the time between the arrival of an event and the generation of a response to it.

Figure 5.6. Goal of performance tactics

Page 27: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Figure 5.7. Summary of performance tactics

After an event arrives, either the system is processing on that event or the processing is blocked for some reason. This leads to the two basic contributors to the response time: resource consumption and blocked time.

1. Resource consumption. Resources include CPU, data stores, network communication bandwidth, and memory, but it can also include entities defined by the particular system under design. For example, buffers must be managed and access to critical sections must be made sequential. Events can be of varying types (as just enumerated), and each type goes through a processing sequence. For example, a message is generated by one component, is placed on the network, and arrives at another component. It is then placed in a buffer;

2. Blocked time. A computation can be blocked from using a resource because of contention for it, because the resource is unavailable, or because the computation depends on the result of other computations that are not yet available.

- Contention for resources. These events may be in a single stream or in multiple streams. Multiple streams vying for the same resource or different events in the same stream vying for the same resource contribute to latency. In general, the more contention for a resource, the more likelihood of latency being introduced. However, this depends on how the contention is arbitrated and how individual requests are treated by the arbitration mechanism.- Availability of resources. Even in the absence of contention, computation cannot proceed if a resource is unavailable. Unavailability may be caused by the resource being offline or by failure of the component or for some other reason. In any case, the architect must identify places where resource unavailability might cause a significant contribution to overall latency.

- Dependency on other computation. A computation may have to wait because it must synchronize with the results of another computation or because it is waiting for the results of a computation that it initiated.

With this background, we turn to our three tactic categories: resource demand, resource management, and resource arbitration.

Page 28: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

RESOURCE DEMAND

Event streams are the source of resource demand. Two characteristics of demand are the time between events in a resource stream (how often a request is made in a stream) and how much of a resource is consumed by each request.

One tactic for reducing latency is to reduce the resources required for processing an event stream. Ways to do this include the following.

Increase computational efficiency. One step in the processing of an event or a message is applying some algorithm. Improving the algorithms used in critical areas will decrease latency. Sometimes one resource can be traded for another. For example, intermediate data may be kept in a repository or it may be regenerated depending on time and space resource availability. This tactic is usually applied to the processor but is also effective when applied to other resources such as a disk.

Reduce computational overhead. If there is no request for a resource, processing needs are reduced. In Chapter 17, we will see an example of using Java classes rather than Remote Method Invocation (RMI) because the former reduces communication requirements. The use of intermediaries (so important for modifiability) increases the resources consumed in processing an event stream, and so removing them improves latency. This is a classic modifiability/performance tradeoff.

Another tactic for reducing latency is to reduce the number of events processed. This can be done in one of two fashions.

Manage event rate. If it is possible to reduce the sampling frequency at which environmental variables are monitored, demand can be reduced. Sometimes this is possible if the system was overengineered. Other times an unnecessarily high sampling rate is used to establish harmonic periods between multiple streams. That is, some stream or streams of events are oversampled so that they can be synchronized.

Control frequency of sampling. If there is no control over the arrival of externally generated events, queued requests can be sampled at a lower frequency, possibly resulting in the loss of requests.

Other tactics for reducing or managing demand involve controlling the use of resources.

Bound execution times. Place a limit on how much execution time is used to respond to an event. Sometimes this makes sense and sometimes it does not. For iterative, data-dependent algorithms, limiting the number of iterations is a method for bounding execution times.

Bound queue sizes. This controls the maximum number of queued arrivals and consequently the resources used to process the arrivals.

RESOURCE MANAGEMENT

Even though the demand for resources may not be controllable, the management of these resources affects response times. Some resource management tactics are:

Introduce concurrency. If requests can be processed in parallel, the blocked time can be reduced. Concurrency can be introduced by processing different streams of events on different threads or by creating additional threads to process different sets of activities. Once concurrency has been introduced, appropriately allocating the threads to resources (load balancing) is important in order to maximally exploit the concurrency.

Page 29: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Maintain multiple copies of either data or computations. Clients in a client-server pattern are replicas of the computation. The purpose of replicas is to reduce the contention that would occur if all computations took place on a central server. Caching is a tactic in which data is replicated, either on different speed repositories or on separate repositories, to reduce contention. Since the data being cached is usually a copy of existing data, keeping the copies consistent and synchronized becomes a responsibility that the system must assume.

Increase available resources. Faster processors, additional processors, additional memory, and faster networks all have the potential for reducing latency. Cost is usually a consideration in the choice of resources, but increasing the resources is definitely a tactic to reduce latenc

RESOURCE ARBITRATION

Whenever there is contention for a resource, the resource must be scheduled. Processors are scheduled, buffers are scheduled, and networks are scheduled. The architect's goal is to understand the characteristics of each resource's use and choose the scheduling strategy that is compatible with it.

A scheduling policy conceptually has two parts: a priority assignment and dispatching. All scheduling policies assign priorities. In some cases the assignment is as simple as first-in/first-out. In other cases, it can be tied to the deadline of the request or its semantic importance.

A high-priority event stream can be dispatched only if the resource to which it is being assigned is available. Sometimes this depends on pre-empting the current user of the resource. Possible preemption options are as follows: can occur anytime; can occur only at specific pre-emption points; and executing processes cannot be pre-empted. Some common scheduling policies are:

1. First-in/First-out. FIFO queues treat all requests for resources as equals and satisfy them in turn. One possibility with a FIFO queue is that one request will be stuck behind another one that takes a long time to generate a response. As long as all of the requests are truly equal, this is not a problem, but if some requests are of higher priority than others, it is problematic.

2. Fixed-priority scheduling. Fixed-priority scheduling assigns each source of resource requests a particular priority and assigns the resources in that priority order. This strategy insures better service for higher-priority requests but admits the possibility of a low-priority, but important, request taking an arbitrarily long time to be serviced because it is stuck behind a series of higher-priority requests. Three common prioritization strategies are

- semantic importance. Each stream is assigned a priority statically according to some domain characteristic of the task that generates it. This type of scheduling is used in mainframe systems where the domain characteristic is the time of task initiation.- deadline monotonic. Deadline monotonic is a static priority assignment that assigns higher priority to streams with shorter deadlines. This scheduling policy is used when streams of different priorities with real-time deadlines are to be scheduled.- rate monotonic. Rate monotonic is a static priority assignment for periodic streams that assigns higher priority to streams with shorter periods. This scheduling policy is a special case of deadline monotonic but is better known and more likely to be

Page 30: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

supported by the operating system.

3. Dynamic priority scheduling:- round robin. Round robin is a scheduling strategy that orders the requests and then, at every assignment possibility, assigns the resource to the next request in that order. A special form of round robin is a cyclic executive where assignment possibilities are at fixed time intervals.- earliest deadline first. Earliest deadline first assigns priorities based on the pending requests with the earliest deadline.

4. Static scheduling. A cyclic executive schedule is a scheduling strategy where the pre-emption points and the sequence of assignment to the resource are determined offline.

Usability Tactics

Recall from Chapter 4 that usability is concerned with how easy it is for the user to accomplish a desired task and the kind of support the system provides to the user. Two types of tactics support usability, each intended for two categories of "users." The first category, runtime, includes those that support the user during system execution. The second category is based on the iterative nature of user interface design and supports the interface developer at design time. It is strongly related to the modifiability tactics already presented.

Figure 5.13. Summary of runtime usability tactics

Page 31: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

RUNTIME TACTICS

Once a system is executing, usability is enhanced by giving the user feedback as to what the system is doing and by providing the user with the ability to issue usability-based commands. For example, cancel, undo, aggregate, and show multiple views support the user in either error correction or more efficient operations.

When the user takes the initiative, the architect designs a response as if for any other piece of functionality. The architect must enumerate the responsibilities of the system to respond to the user command. To use the cancel example again: When the user issues a cancel command, the system must be listening for it (thus, there is the responsibility to have a constant listener that is not blocked by the actions of whatever is being canceled);

When the system takes the initiative, it must rely on some information?a model?about the user, the task being undertaken by the user, or the system state itself. Each model requires various types of input to accomplish its initiative. The system initiative tactics are those that identify the models the system uses to predict either its own behavior or the user's intention.

Maintain a model of the task. In this case, the model maintained is that of the task. The task model is used to determine context so the system can have some idea of what the user is attempting and provide various kinds of assistance. For example, knowing that sentences usually start with capital letters would allow an application to correct a lower-case letter in that position.

Maintain a model of the user. In this case, the model maintained is of the user. It determines the user's knowledge of the system, the user's behavior in terms of expected response time, and other aspects specific to a user or a class of users. For example, maintaining a user model allows the system to pace scrolling so that pages do not fly past faster than they can be read.

Maintain a model of the system. In this case, the model maintained is that of the system. It determines the expected system behavior so that appropriate feedback can be given to the user. The system model predicts items such as the time needed to complete current activity.

DESIGN-TIME TACTICS

User interfaces are typically revised frequently during the testing process. That is, the usability engineer will give the developers revisions to the current user interface design and the developers will implement them. This leads to a tactic that is a refinement of the modifiability tactic of semantic coherence:

Separate the user interface from the rest of the application. Localizing expected changes is the rationale for semantic coherence. Since the user interface is expected to change frequently both during the development and after deployment, maintaining the user interface code separately will localize changes to it. The software architecture patterns developed to implement this tactic and to support the modification of the user interface are:

- Model-View-Controller

- Presentation-Abstraction-Control

- Seeheim

- Arch/Slinky

Page 32: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

 Security Tactics

Tactics for achieving security can be divided into those concerned with resisting attacks, those concerned with detecting attacks, and those concerned with recovering from attacks. All three categories are important. Using a familiar analogy, putting a lock on your door is a form of resisting an attack, having a motion sensor inside of your house is a form of detecting an attack, and having insurance is a form of recovering from an attack. Figure 5.8 shows the goals of the security tactics.

Figure 5.8. Goal of security tactics

Figure 5.9. Summary of tactics for security

RESISTING ATTACKS

Nonrepudiation, confidentiality, integrity, and assurance as goals in our security characterization. The following tactics can be used in combination to achieve these goals.

Authenticate users. Authentication is ensuring that a user or remote computer is actually who it purports to be. Passwords, one-time passwords, digital certificates, and biometric identifications provide authentication.

Authorize users. Authorization is ensuring that an authenticated user has the rights to access and modify either data or services. This is usually managed by providing some access control patterns within a system. Access control can be by user or by user class. Classes of users can be defined by user groups, by user roles, or by lists of individuals.

Maintain data confidentiality. Data should be protected from unauthorized access. Confidentiality is usually achieved by applying some form of encryption to data and

Page 33: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

to communication links. Encryption provides extra protection to persistently maintained data beyond that available from authorization. Communication links, on the other hand, typically do not have authorization controls.

Maintain integrity. Data should be delivered as intended. It can have redundant information encoded in it, such as checksums or hash results, which can be encrypted either along with or independently from the original data.

Limit exposure. Attacks typically depend on exploiting a single weakness to attack all data and services on a host. The architect can design the allocation of services to hosts so that limited services are available on each host.

Limit access. Firewalls restrict access based on message source or destination port. Messages from unknown sources may be a form of an attack. It is not always possible to limit access to known sources. A public Web site, for example, can expect to get requests from unknown sources. One configuration used in this case is the so-called demilitarized zone (DMZ). A DMZ is used when access must be provided to Internet services but not to a private network. It sits between the Internet and a firewall in front of the internal network.

DETECTING ATTACKS

The detection of an attack is usually through an intrusion detection system. Such systems work by comparing network traffic patterns to a database. In the case of misuse detection, the traffic pattern is compared to historic patterns of known attacks. In the case of anomaly detection, the traffic pattern is compared to a historical baseline of itself. Frequently, the packets must be filtered in order to make comparisons. Filtering can be on the basis of protocol, TCP flags, payload sizes, source or destination address, or port number.

Intrusion detectors must have some sort of sensor to detect attacks, managers to do sensor fusion, databases for storing events for later analysis, tools for offline reporting and analysis, and a control console so that the analyst can modify intrusion detection actions.

RECOVERING FROM ATTACKS

Tactics involved in recovering from an attack can be divided into those concerned with restoring state and those concerned with attacker identification (for either preventive or punitive purposes).

The tactics used in restoring the system or data to a correct state overlap with those used for availability since they are both concerned with recovering a consistent state from an inconsistent state. One difference is that special attention is paid to maintaining redundant copies of system administrative data such as passwords, access control lists, domain name services, and user profile data.

The tactic for identifying an attacker is to maintain an audit trail. An audit trail is a copy of each transaction applied to the data in the system together with identifying information. Audit information can be used to trace the actions of an attacker, support nonrepudiation (it provides evidence that a particular request was made), and support system recovery. Audit trails are often attack targets themselves and therefore should be maintained in a trusted fashion.

Figure 5.9 provides a summary of the tactics for security.

Page 34: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Relationship of Tactics to Architectural Patterns

We have presented a collection of tactics that the architect can use to achieve particular attributes. In fact, an architect usually chooses a pattern or a collection of patterns designed to realize one or more tactics. However, each pattern implements multiple tactics, whether desired or not. We illustrate this by discussing the Active Object design pattern.

The Active Object design pattern decouples method execution from method invocation to enhance concurrency and simplify synchronized access to objects that reside in their own thread of control.The pattern consists of six elements:

A proxy: This provides an interface that allows clients to invoke publicly accessible methods on an active object;

A method request: This defines an interface for executing the methods of an active object;

An activation list: This maintains a buffer of pending method requests;

A scheduler: This decides what method requests to execute next;

A servant: which defines the behavior and state modeled as an active object; and

A future: This allows the client to obtain the result of the method invocation.

The motivation for this pattern is to enhance concurrency? a performance goal. Thus, its main purpose is to implement the "introduce concurrency" performance tactic. Notice the other tactics this pattern involves, however.

Information hiding (modifiability). Each element chooses the responsibilities it will achieve and hides their achievement behind an interface.

Intermediary (modifiability). The proxy acts as an intermediary that will buffer changes to the method invocation.

Binding time (modifiability). The active object pattern assumes that requests for the object arrive at the object at runtime. The binding of the client to the proxy, however, is left open in terms of binding time.

Scheduling policy (performance). The scheduler implements some scheduling policy.

Any pattern implements several tactics, often concerned with different quality attributes, and any implementation of the pattern also makes choices about tactics. For example, an implementation could maintain a log of requests to the active object for supporting recovery, maintaining an audit trail, or supporting testability.

The analysis process for the architect involves understanding all of the tactics embedded in an implementation, and the design process involves making a judicious choice of what combination of tactics will achieve the system's desired goals.

Architectural Patterns and Styles

An architectural pattern in software, also known as an architectural style, is analogous to an architectural style in buildings, such as Gothic or Greek Revival or Queen Anne. It consists of a few key features and rules for combining them so that architectural integrity is preserved. An architectural pattern is determined by:

Page 35: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

A set of element types (such as a data repository or a component that computes a mathematical function).

A topological layout of the elements indicating their interrelation-ships. A set of semantic constraints (e.g., filters in a pipe-and-filter style are pure data

transducers? hey incrementally transform their input stream into an output stream, but do not control either upstream or downstream elements).

A set of interaction mechanisms (e.g., subroutine call, event-subscriber, blackboard) that determine how the elements coordinate through the allowed topology.

Mary Shaw and David Garlan's influential work attempted to catalog a set of architectural patterns that they called architectural styles or idioms. This has been evolved by the software engineering community into what is now more commonly known as architectural patterns, analogous to design patterns and code patterns.

The motivation of [Shaw 96] for embarking on this project was the observation that high-level abstractions for complex systems exist but we do not study or catalog them, as is common in other engineering disciplines.

These patterns occur not only regularly in system designs but in ways that sometimes prevent us from recognizing them, because in different disciplines the same architectural pattern may be called different things. In response, a number of recurring architectural patterns, their properties, and their benefits have been cataloged. One such catalog is illustrated in Figure 5

Figure 5.14. A small catalog of architectural patterns, organized by is-a relations

In this figure patterns are categorized into related groups in an inheritance hierarchy. For example, an event system is a sub style of independent elements. Event systems themselves have two sub patterns: implicit invocation and explicit invocation.

What is the relationship between architectural patterns and tactics? As shown earlier, we view a tactic as a foundational "building block" of design, from which architectural patterns and strategies are created.

Page 36: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Designing the Architecture

Three ideas that are key to architecture design methods: decomposition, designing to architecturally significant requirements, and generate and test.Decomposition

Architecture determines the quality attributes of a system. The quality attributes are properties of the system as a whole. Latency, for example, is the time between the arrival of an event and the output of the processing of that event. Availability refers to thesystem providing services, and so forth.

A decomposition strategy does not mean that we are assuming the design is a green-field design or that there are no constraints on the design to use particular preexisting components either externally developed or legacy. when you choose a route from one point to another, you may choose to stop at various destinations along the route, constraints on the design can be accommodated by a decomposition strategy. You as the designer must keep in mind the constraints given to you and arrange the decomposition so that it will accommodate those constraints. In some contexts, the system may end up being constructed mostly from preexisting components; in others, the preexisting components may be a smaller portion of the overall system. In either case, the goal of the design activity is to generate a design that accommodates the constraints and achieves the quality and business goals for the system.

We have already discussed about module decomposition, but there are other kinds of decompositions that one regularly finds in an architecture, such as the decomposition of a component in a components and-connectors (C&C) pattern into its subcomponents. For example, a user interface implemented using the model-view-controller (MVC) pattern would be decomposed into a number of components for the model, one or more views, and one or more controllers.

Designing to Architecturally Significant Requirements:These are the requirements that drive the architectural design; that is why they are

significant. Driving the design means that these requirements have a profound effect on the architecture. This raises two questions: What happens to the other requirements? and Do I design for one ASR at a time or all at once?1 . What about the non-ASR requirements: The choice of ASRs implies a prioritization of the requirements. Once you have produced a design that satisfies the ASRs, you know that you are in good shape. However, in the real world, there are other requirements that, while not ASRs, you would like to be able to satisfy. (a) You can still meet the other requirements. (b) You can meet the other requirements with a slight adjustment of the existing design, and this slight adjustment does not keep the higher priority requirements from being met. (c) You cannot meet the other requirements under the current design.2. Design for all of the ASRs or one at a time: The answer to this question is a matter ofexperience. When you learn chess, you begin by learning that the horsey goes up two andover one. After you have been playing for a while, you internalize the moves of the knightand you can begin to look further ahead.

Generate and Test:

One way of viewing design is as a process of "generate and test." This generate-and-test approach views a particular design as a hypothesis: namely, the design satisfies the requirements. Testing is the process of determining whether the design hypothesis is correct.

Page 37: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Generate and test as a design strategy leads to the following questions:

1 . Where does the initial hypothesis come from?2. What are the tests that are applied?3. How is the next hypothesis generated?4. When are you done?

Creating the Initial HypothesisDesign solutions are created using "collateral" that is available to the project.

Collateral can includeexisting systems, frameworks available to the project, known architecture patterns, design checklists, or a domain decomposition.• Existing systems: Very few systems are completely unprecedented, even within a singleorganization. Organizations are in a particular business, their business leads to specialization,and specialization leads to the development of variations on a theme. It is likely that systemsalready exist that are similar to the system being constructed in your company.Existing systems are likely to provide the most powerful collateral, because the businesscontext and requirements for the existing system are likely to be similar to the business context and requirements for the new system, and many of the problems that occur have already been solved in the existing design.

• Frameworks: A framework is a partial design (accompanied by code) that provides services that are common in particular domains. Fratneworks exist in a great many d01nains, ranging from web applications to middleware systems to decision support systems. The design of the framework (especially the architectural assumptions it makes) provides the initial design hypothesis. For exatnple, a design framework might constrain all communication to be via a broker, or via a publish-subscribe bus, or via callbacks. In each case this design framework has constrained your initial design hypothesis.

• Patterns and tactics: Cataloged architectural patterns, possibly augmented with tactics,should be considered as candidates for the design hypothesis you're building.

• Domain decomposition. Another option for the initial design hypothesis comes fromperforming a domain decomposition. For exatnple, most object-oriented analysis and designprocesses begin this way, identifying actors and entities in the domain. This decomposition will divide the responsibilities to make certain modifications easier, but by itself it does not speak to many other quality attribute requirements.

• Design checklists:The design checklists can guide an architect to making quality-attribute-targeted design choices. The point of using a checklist is to ensure completeness:

Page 38: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Have I thought about all of the issues that might arise with respect to the many quality attribute concerns that I have? The checklist will provide guidance and confidence to an architect.

Choosing the TestsThree sources provide the tests to be applied to the hypothesis:1 . The analysis techniques.2. The design checklists for the quality attributes can also be used to test the design decisions already made, from the sources listed above. For the important quality attribute requirements, use the design checklists to assess whether the decisions you've made so far are sound and complete. 3. The architecturally significant requirements. If the hypothesis does not provide a solution for the ASRs, then it must be improved.

Generating the Next HypothesisAfter applying the tests, you might be done everything looks good. On the other hand, you might still have some concerns; specifically, you might have a list of quality attribute problems associated with your analysis of the current hypothesis. This is the problem that tactics are intended to solve: to improve a design with respect to a particular quality attribute.

Terminating the Process

You are done with the generate-and-test process when you either have a design that satisfies the ASRs or when you exhaust your budget for producing the design. If you do not produce such a design within budget, then you have two options depending on the set of ASRs that are satisfied. Your first option is to proceed to implementation with the best hypothesis you were able to produce, with the realization that some ASRs may not be met and may need to be relaxed or eliminated.

This is the most common case. Your second option is to argue for more budget for design and analysis, potentially revisiting some of the major early design decisions and resuming generate and test from that point. If all else fails, you could suggest that the project be terminated. If all of the ASRs are critical and you were not able to produce an acceptable or nearly acceptable design, then the system you produce from the design will not be satisfactory and there is no sense in producing it.

Page 39: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Architecture in the Life Cycle:

Any organization that embraces architecture as a foundation for its software development processes needs to understand its place in the life cycle. Several life-cycle models exist in the literature, but one that puts architecture squarely in the middle of things is the Evolutionary Delivery Life Cycle model. The intent of this model is to get user and customer feedback and iterate through several releases before the final release. The model also allows the adding of functionality with each iteration and the delivery of a limited version once a sufficient set of features has been developed. (For more about this life-cycle model, see For Further Reading.)

Evolutionary Delivery Life Cycle

WHEN CAN I BEGIN DESIGNING?

The life-cycle model shows the design of the architecture as iterating with preliminary requirements analysis. Clearly, you cannot begin the design until you have some idea of the system requirements. On the other hand, it does not take many requirements in order for design to begin.

Page 40: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

An architecture is "shaped" by some collection of functional, quality, and business requirements. We call these shaping requirements architectural drivers and we see examples of them in our case studies. The architecture of the A-7E discussed in Chapter 3 is shaped by its modifiability and performance requirements. The architecture for the air traffic control system discussed in Chapter 6 is shaped by its availability requirements. In the flight simulator software presented in Chapter 8, we will see an architecture shaped by performance and modifiability requirements. And so on.

To determine the architectural drivers, identify the highest priority business goals. There should be relatively few of these. Turn these business goals into quality scenarios or use cases. From this list, choose the ones that will have the most impact on the architecture. These are the architectural drivers, and there should be fewer than ten. The Architecture Tradeoff Analysis Method of Chapter 11 uses a utility tree to help turn the business drivers into quality scenarios.

Once the architectural drivers are known, the architectural design can begin. The requirements analysis process will then be influenced by the questions generated during architectural design?one of the reverse-direction arrows shown in Figure 7.1.

Attribute-Driven Design Defining a software architecture based on the quality attributes recursive decomposition process

at each stage tactics and patterns are chosen to satisfy a set ofquality attribute scenarios

Input quality attribute requirements design constraints functional requirements

Output first several levels of module decomposition various other views of the system as appropriate set of elements with assigned functionalities and the interactions

among the elements

ADD is an approach to defining a software architecture that bases the decomposition process on the quality attributes the software has to fulfill. It is a recursive decomposition process where, at

Page 41: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

each stage, tactics and architectural patterns are chosen to satisfy a set of quality scenarios and then functionality is allocated to instantiate the module types provided by the pattern. ADD is positioned in the life cycle after requirements analysis and, as we have said, can begin when the architectural drivers are known with some confidence.

The output of ADD is the first several levels of a module decomposition view of an architecture and other views as appropriate. Not all details of the views result from an application of ADD; the system is described as a set of containers for functionality and the interactions among them. This is the first articulation of architecture during the design process and is therefore necessarily coarse grained. Nevertheless, it is critical for achieving the desired qualities, and it provides a framework for achieving the functionality. The difference between an architecture resulting from ADD and one ready for implementation rests in the more detailed design decisions that need to be made. These could be, for example, the decision to use specific object-oriented design patterns or a specific piece of middleware that brings with it many architectural constraints. The architecture designed by ADD may have intentionally deferred this decision to be more flexible.

Sample Input

The input to ADD is a set of requirements. ADD assumes functional requirements (typically expressed as use cases) and constraints as input, as do other design methods. However, in ADD, we differ from those methods in our treatment of quality requirements. ADD mandates that quality requirements be expressed as a set of system-specific quality scenarios. The general scenarios discussed in Chapter 4 act as input to the requirements process and provide a checklist to be used in developing the system-specific scenarios. System-specific scenarios should be defined to the detail necessary for the application. In our examples, we omit several portions of a fully fleshed scenario since these portions do not contribute to the design process.

For our garage door example, the quality scenarios include the following:

The device and controls for opening and closing the door are different for the various products in the product line, as already mentioned. They may include controls from within a home information system. The product architecture for a specific set of controls should be directly derivable from the product line architecture.

The processor used in different products will differ. The product architecture for each specific processor should be directly derivable from the product line architecture.

If an obstacle (person or object) is detected by the garage door during descent, it must halt (alternately re-open) within 0.1 second.

Documenting Software ArchitecturesDocumentation speaks for the architect. It speaks for the architect today, when the architect should be doing other things besides answering a hundred questions about the architecture. And it speaks for the architect tomorrow, when he or she has left the project and now someone else is in charge of its evolution and maintenance.

The best architects produce good documentation not because it's "required" but because they see that it is essential to the matter at hand producing a high-quality product, predictably and with as little rework as possible. They see their immediate stakeholders as the people most intimately involved in this undertaking: developers, deployers, testers, and analysts.

Uses and Audiences for Architecture DocumentationArchitecture documentation must serve varied purposes. It should be sufficiently

transparent and accessible to be quickly understood by new employees. It should be

Page 42: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

sufficiently concrete to serve as a blueprint for construction. It should have enough information to serve as a basis for analysis.

Architecture documentation is both prescriptive and descriptive. For some audiences, it prescribes what should be true, placing constraints on decisions yet to be made. For other audiences, it describes what is true, recounting decisions already made about a system's design.

That many different kinds of people are going to have a vested interest in an architecture document. They hope and expect that the architecture document will help them do their respective jobs. Understanding their uses of architecture documentation is essential, as those uses determine the important information to capture.

Fundamentally, architecture documentation has three uses:

1 . Architecture documentation serves as a means of education: The educational use consists of introducing people to the system. The people may be new members of the team, external analysts, or even a new architect. In many cases, the "new" person is the customer to whom you're showing your solution for the first time, a presentation you hope will result in funding or go-ahead approval.

2. Architecture documentation serves as a primary vehicle for communication amongStakeholders: An architecture' s precise use as a communication vehicle depends on whichstakeholders are doing the communicating.3. Architecture documentation serves as the basis for system analysis and construction:

Architecture tells implementers what to implement. Each module has interfaces that must be provided and uses interfaces from other modules. Not only does this provide instructions about the provided and used interfaces, but it also determines with what other teams the development team for the module must communicate.

During development, architecture can be very complex, with many issues left to resolve. Documentation can serve as a receptacle for registering and communicating these issues that might otherwise be overlooked.

Notations for Architecture DocumentationNotations for documenting views differ considerably in their degree of formality. Roughly speaking, there are three main categories of notation:• Informal notations: Views are depicted (often graphically) using general-purpose diagramming and editing tools and visual conventions chosen for the system at hand. The semantics of the description are characterized in natural language, and they cannot be formally analyzed. In our experience, the most common tool for informal notations is Power Point.• Semiformal notations: Views are expressed in a standardized notation that prescribes graphical elements and rules of construction, but it does not provide a complete semantic treatment of the meaning of those elements. Rudimentary analysis can be applied to determine if a description satisfies syntactic properties. UML is a semiformal notation in this sense.• Formal notations: Views are described in a notation that has a precise (usually mathematically based) semantics. Formal analysis of both syntax and semantics is possible. There are a variety of formal notations for software architecture available. Generally referred to as architecture description languages (ADLs), they typically provide both a graphical vocabulary and an underlying semantics for architecture representation.

Page 43: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

ViewsPerhaps the most important concept associated with software architecture documentation is that of the view. A software architecture is a complex entity that cannot be described in a simple one-dimensional fashion.

Different views also expose different quality attributes to different degrees. Therefore, the quality attributes that are of most concern to you and the other stakeholders in the system's development will affect the choice of what views to document. For instance, a layered view will let you reason about your system's portability, a deployment view will let you reason about your system's performance and reliability, and so forth.

Module ViewsA module is an itnpletnentation unit that provides a coherent set of responsibilities. A module might take the form of a class, a collection of classes, a layer, an aspect, or any decomposition of the implementation unit. Every module has a collection of properties assigned to it. These properties are intended to express the important information associated with the module, as well as constraints on the module. Sample properties are responsibilities, visibility information, and revision history. The relations that modules have to one another include is part of, depends on, and is a.The list of properties may vary but is likely to include the following:• Name: A module's name is, of course, the primary means to refer to it. A module's name often suggests something about its role in the system. In addition, a module's name may reflect its position in a decomposition hierarchy.• Responsibilities: The responsibility property for a module is a way to identify its role in theoverall system and establishes an identity for it beyond the name. Whereas a module's namemay suggest its role, a statement of responsibility establishes it with much more certainty.Responsibilities should be described in sufficient detail to make clear to the reader what eachmodule does.• Visibility of interface(s) : When a module has submodules, some interfaces of the submodules are public and some may be private; that is, the interfaces are used only by the submodules within the enclosing parent module. These private interfaces are not visible outside that context.• Implementation information: Modules are units of implementation. It is therefore useful to record information related to their implementation from the point of view of managing their development and building the system that contains them. This might include the following:• Mapping to source code units: This identifies the files that constitute the implementation of a module. • Test information:The module's test plan, test cases, test scaffolding, and test data are important to document. This information may simply be a pointer to the location of these artifacts.• Management information: A manager may need information about the module's predictedschedule and budget. This information may simply be a pointer to the location of these artifacts.• Implementation constraint: In many cases, the architect will have an implementation strategy in mind for a module or may know of constraints that the implementation must follow.• Revision history: Knowing the history of a module including authors and particular changes may help when you perfonn maintenance activities.

Page 44: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Component-and-Connector ViewsComponent-and-connector views show elements that have some runtime presence,

such as processes, objects, clients, servers, and data stores. These elements are termed components. Additionally, component-and-connector views include as elements the pathways of interaction, such as communication links and protocols, information flows, and access to shared storage. Such interactions are represented as connectors in C&C views. Sample C&C views are service-oriented architecture (SOA), client-server, or communicating process views.

Components have interfaces called ports. A port defines a point of potential interaction of a component with its environment. A port usually has an explicit type, which defines the kind of behaviour that can take place at that point of interaction.

A component in a C&C view may represent a complex subsystem, which itself can be described as a C&C subarchitecture. An element (component or connector) of a C&C view will have various associated properties. Every element should have a name and type. Additional properties depend on the type of component or connector. Define values for the properties that support the intended analyses for the particular C&C view. For example, if the view will be used for performance analysis, latencies, queue capacities, and thread priorities may be necessary.

• Reliability:What is the likelihood of failure for a given component or connector? This propertymight be used to help determine overall system availability.• Performance: What kinds of response time will the component provide under what loads? What kind of bandwidth, latency, jitter, transaction volume, or throughput can be expected for a given connector? This property can be used with others to determine system-wide properties such as response times, throughput, and buffering needs.• Resource requirements: What are the processing and storage needs of a component or aconnector? This property can be used to determine whether a proposed hardware configuration will be adequate.• Functionality: What functions does an element perform? This property can be used to reason about overall computation performed by a system. • Security: Does a component or a connector enforce or provide security features, such asencryption, audit trails, or authentication? This property can be used to determine systemsecurity vulnerabilities.• Concurrency: Does this component execute as a separate process or thread? This property can help to analyze or simulate the performance of concurrent components and identify possible deadlocks.• Modifiability: Does the messaging structure support a structure to cater for evolving dataexchanges? Can the components be adapted to process those new messages? This property can be defined to extend the functionality of a component.• Tier: For a tiered topology, what tier does the component reside in? This property helps todefine the build and deployment procedures, as well as platform requirements for each tier.

Allocation ViewsAllocation views describe the mapping of software units to elements of an

environment in which the software is developed or in which it executes. The environment might be the hardware, the operating environment in which the software is executed, the file systems supporting development or deployment, or the development organization(s).

Page 45: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Allocation views consist of software elements and environmental elements. Software elements and environmental elements have properties in allocation views. The usual goalof an allocation view is to compare the properties required by the software element with the properties provided by the environmental elements to determine whether the allocation will be successful or not.

Allocation views can depict static or dynamic views. A static view depicts a fixed allocation of resources in an environment. A dynamic view depicts the conditions and the triggers for which allocation of resources changes according to loading. Some systems recruit and utilize new resources as their load increases.

Quality Views

These quality views are formed by extracting the relevant pieces of structuralviews and packaging them together. Here are five examples:

• A security view can show all of the architectural measures taken to provide security. It would show the components that have some security role or responsibility, how those components communicate, any data repositories for security information, and repositories that are of security interest. It would also capture how the system would respond to specific threats and vulnerabilities.• A communications view might be especially helpful for systems that are globally dispersed and heterogeneous. This view would show all of the component-to-component channels, the various network channels, quality-of-service parameter values, and areas of concurrency. This view can be used to analyze certain kinds of performance and reliability (such as deadlock or race condition detection). The behavior part of this view could show (for example) how network bandwidth is dynamically allocated.

• An exception or error-handling view could help illuminate and draw attention to error reporting and resolution mechanisms. Such a view would show how components detect, report, and resolve faults or errors. It would help identify the sources of errors and appropriate corrective actions for each. Root-cause analysis in those cases could be facilitated by such a view.• A reliability view would be one in which reliability mechanisms such as replication andswitchover are modeled. It would also depict timing issues and transaction integrity.• A performance view would include those aspects of the architecture useful for inferring the system's performance. Such a view might show network traffic models, maximum latencies for operations, and so forth. Building the Documentation PackageRemember the principle of architecture documentation, This principle tells us that our task is to document the relevant views and to document the information that applies to more than one view.

Page 46: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Documenting a ViewDocumenting Information Beyond Views, documentation beyond views can be divided into two parts:1 . Overview of the architecture documentation: This tells how the documentation is laid out and organized so that a stakeholder of the architecture can find the information he or she needs efficiently and reliably.2. Information about the architecture: Here, the information that remains to be captured beyond the views themselves is a short system overview to ground any reader as to the purpose of the system and the way the views are related to one another, an overview of and rationale behind system-wide design approaches, a list of elements and where they appear, and a glossary and an acronym list for the entire architecture.

• Document control information: List the issuing organization, the current version number, date of issue and status, a change history, and the procedure for submitting change requests to the document. Usually this is captured in the front matter. Change control tools can provide much of this information.

Architecture ReconstructionArchitecture reconstruction requires the skillful application of tools, often with a steep

learning curve. No single tool does the entire job. For one reason, there is often diversity in the number of implementation languages and dialects in which a software system is implemented a mature MRI scanner or a legacy banking application may easily comprise more than ten different programming and scripting languages. No tool speaks every language.

Page 47: Role of Software Architect  · Web view2019. 7. 22. · Software Architecture. The software architecture of a system is the set of structures needed to reason about the. system,

Instead we are inevitably led to a "tool set" approach to support architecture reconstruction activities. And so the first step in the reconstruction process is to set up the workbench.

An architecture reconstruction workbench should be open (making it easy to integrate new tools as required) and provide an integration framework whereby new tools that are added to the tool set do not impact the existing tools or data unnecessarily. Whether or not an explicit workbench is used, the software architecture reconstruction processcomprises the following phases 1 . Raw view extraction: In the raw view extraction phase, raw information about the architecture is obtained from various sources, primarily source code, execution traces, and build scripts. Each of these sets of raw information is called a view.2. Database construction: The database construction phase involves converting the rawextracted information into a standard form (because the various extraction tools may eachproduce their own form of output). This standardized form of the extracted views is then usedto populate a reconstruction database. When the reconstruction process is complete, thedatabase will be used to generate authoritative architecture documentation.3. View fusion and manipulation: The view fusion phase combines the various views of theinformation stored in the database. Individual views may not contain complete or fullyaccurate information. View fusion can improve the overall accuracy. For example, a staticview extracted from source code might miss dynamically bound information such as callingrelationships.

4. Architecture analysis: View fusion will result in a set of hypotheses about the architecture. These hypotheses take the form of architectural elements (such as layers) and the constraints and relationships among them. These hypotheses need to be tested to see if they are correct, and that is the function of the analysis step. Some of these hypotheses might be disproven, requiring additional view extraction, fusion, and manipulation.


Recommended