Sadp Unit-1
Sadp Unit-1
UNIT-I
ENVISIONING ARCHITECTURE
CHAPTER 1
Figure 1.1, taken from a system description for an underwater acoustic simulation, purports to
describe that system's "top-level architecture" and is precisely the kind of diagram most often
displayed to help explain an architecture. Exactly what can we tell from it?
This diagram does not show a software architecture. We now define what does constitute a software
architecture:
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.
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.
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. The relationship among these design elements is shown in Figure 2.2. A software
architect must design a system that provides concurrency, portability, modifiability, usability,
security, and the like, and that reflects consideration of the tradeoffs among these needs.
Software Architecture Lecture Notes
about a system with respect to the system's remaining development, its deployment,
and its maintenance life.
It is the earliest point at which design decisions governing the system to be built can be
analyzed.
Transferable abstraction of a system: software architecture model is transferable
across systems. It can be applied to other systems exhibiting similar quality attribute
and functional attribute and functional requirements and can promote large-scale re-
use.
Each stakeholder of a software system – customer, user, project manager, coder, tester
and so on - is concerned with different system characteristics that are affected by the
architecture.
For ex. The user is concerned that the system is reliable and available when needed;
the customer is concerned that the architecture can be implemented on schedule and
to budget; the manager is worried that the architecture will allow teams to work
largely independently, interacting in disciplined and controlled ways.
Architecture provides a common language in which different concerns can be
expressed, negotiated, and resolved at a level that is intellectually manageable even for
large, complex systems.
Software Architecture Lecture Notes
Software architecture represents a system’s earliest set of design decisions. These early
decisions are the most difficult to get correct and the hardest to change later in the
development process, and they have the most far-reaching effects.
The architecture defines constraints on implementation
o This means that the implementation must be divided into the prescribed
elements, the elements must interact with each other in the prescribed fashion,
and each element must fulfill its responsibility to the others as dictated by the
architecture.
The architecture dictates organizational structure
o The normal method for dividing up the labor in a large system is to assign
different groups different portions of the system to construct. This is called the
work breakdown structure of a system.
The architecture inhibits or enables a system’s quality attributes
o Whether a system will be able to exhibit its desired (or required) quality
attributes is substantially determined by its architecture.
o However, the architecture alone cannot guarantee functionality or quality.
o Decisions at all stages of the life cycle—from high-level design to coding and
implementation—affect system quality.
o Quality is not completely a function of architectural design. To ensure quality, a
good architecture is necessary, but not sufficient.
Predicting system qualities by studying the architecture
o Architecture evaluation techniques such as the architecture tradeoff analysis
method support top-down insight into the attributes of software product quality
that is made possible (and constrained) by software architectures.
The architecture makes it easier to reason about and manage change
o Software systems change over their lifetimes.
o Every architecture partitions possible changes into three categories: local,
The earlier in the life cycle re-use is applied, the greater the benefit that can be achieved.
While code re- use is beneficial, re-use at the architectural level provides tremendous
leverage for systems with similar requirements.
Software product lines share a common architecture
A software product line or family is a set of software-intensive systems sharing a common,
managed set of features that satisfy the specific needs of a particular market segment or
mission and that are developed from a common set of core assets in a prescribed way.
Systems can be built using large. Externally developed elements
Whereas earlier software paradigms focused on programming as the prime activity, with
progress measured in lines of code, architecture-based development often focuses on
composing or assembling elements that are likely to have been developed separately, even
independently, from each other.
Less is more: it pays to restrict the vocabulary of design alternatives
We wish to minimize the design complexity of the system we are building. Advantages to
this approach include enhanced re-use more regular and simpler designs that are more
easily understood and communicated, more capable analysis, shorter selection time, and
greater interoperability.
Software Architecture Lecture Notes
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?
SOFTWARE STRUCTURES :
Module
Module-based structures include the following structures.
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.
Uses: 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: Layers are often designed as abstractions (virtual machines) that hide
implementation specifics below from the layers above, engendering portability.
Class or generalization: The class structure allows us to reason about re-use and the
Software Architecture Lecture Notes
Component-and-connector
Component-and-connector structures include the following structures
Process or communicating processes: The units here are processes or threads that are
connected with each other by communication, synchronization, and/or exclusion
operations.
Concurrency: The concurrency structure is used early in design to identify the
Allocation
Allocation structures include the following structures
Deployment: This view allows an engineer to reason about performance, data integrity,
availability, and security
Implementation: This is critical for the management of development activities and builds
processes.
Work assignment: This structure assigns responsibility for implementing and integrating
the modules to the appropriate development teams.
How architectures yield systems that suggest new organizational capabilities and
requirements.
Many people and organizations interested in the construction of a software system are
referred to as stakeholders. E.g. customers, end users, developers, project manager etc.
Figure below shows the architect receiving helpful stakeholder “suggestions”.
Software Architecture Lecture Notes
There are three classes of influence that come from the developing organizations:
immediate business, long-term business and organizational structure.
An organization may have an immediate business investment in certain assets, such
as existing architectures and the products based on them.
An organization may wish to make a long-term business investment in an
infrastructure to pursue strategic goals and may review the proposed system as one
means of financing and extending that infrastructure.
Software Architecture Lecture Notes
If the architects for a system have had good results using a particular architectural
approach, such as distributed objects or implicit invocation, chances are that they will
try that same approach on a new development effort.
Conversely, if their prior experience with this approach was disastrous, the architects
A special case of the architect’s background and experience is reflected by the technical
environment.
The environment that is current when an architecture is designed will influence that
architecture.
It might include standard industry practices or software engineering prevalent in the
The influences on the architect, and hence on the architecture, are shown in Figure 1.3.
Software Architecture Lecture Notes
Software Architecture Lecture Notes
Influences on an architecture come from a wide variety of sources. Some are only
implied, while others are explicitly in conflict.
Architects need to know and understand the nature, source, and priority of constraints
on the project as early as possible.
Therefore, they must identify and actively engage the stakeholders to solicit their needs and
expectations.
Architects are influenced by the requirements for the product as derived from its
stakeholders, the structure and goals of the developing organization, the available
technical environment, and their own background and experience.
architecture itself, and some comes from the system built from it.
Software Architecture Lecture Notes
from it can enable a company to establish a foothold in a particular market area. The
architecture can provide opportunities for the efficient production and deployment of the
similar systems, and the organization may adjust its goals to take advantage of its newfound
expertise to plumb the market. This is feedback from the system to the developing
organization and the systems it builds.
3) The architecture can affect customer requirements for the next system by giving the customer
the opportunity to receive a system in a more reliable, timely and economical manner than if
the subsequent system were to be built from scratch.
4) The process of system building will affect the architect’s experience with subsequent systems
by adding to the corporate experience base.
5) A few systems will influence and actually change the software engineering culture. i.e, The
technical environment in which system builders operate and learn.
o There are a variety of techniques for eliciting requirements from the stakeholders.
o For ex:
Object oriented analysis uses scenarios, or “use cases” to embody
requirements.
Safety-critical systems use more rigorous approaches, such as finite-state-
o In the landmark book The Mythical Man-Month, Fred Brooks argues forcefully and
eloquently that conceptual integrity is the key to sound system design and that
conceptual integrity can only be had by a small number of minds coming together to
design the system's architecture.
Documenting and communicating the architecture
o For the architecture to be effective as the backbone of the project’s design, it must
be communicated clearly and unambiguously to all of the stakeholders.
o Developers must understand the work assignments it requires of them, testers must
understand the task structure it imposes on them, management must understand
the scheduling implications it suggests, and so forth.
Analyzing or evaluating the architecture
o This activity is concerned with keeping the developers faithful to the structures and
interaction protocols constrained by the architecture.
o Having an explicit and well-communicated architecture is the first step toward
ensuring architectural conformance.
Ensuring that the implementation conforms to the architecture
o Finally, when an architecture is created and used, it goes into a maintenance phase.
o Constant vigilance is required to ensure that the actual architecture and its
representation remain to each other during this phase.
We divide our observations into two clusters: process recommendations and Structural
recommendations.
The architecture should lend itself to incremental implementation via the creation of a
“skeletal” system in which the communication paths are exercised but which at first has
minimal functionality. This skeletal system can then be used to “grow” the system
incrementally, easing the integration and testing efforts.
The architecture should result in a specific (and small) set of resource contention areas,
the resolution of which is clearly specified, circulated and maintained.
CREATING AN ARCHITECTURE-I
← Environment. The stimulus occurs within certain conditions. The system may be in an
overloadcondition or may be running when the stimulus occurs, or some other condition may be true.
Software Architecture Lecture Notes
← Artifact.Some artifact is stimulated. This may be the whole system or some pieces of it.
← Response.The response is the activity undertaken after the arrival of the stimulus.
← Response measure. When the response occurs, it should be measurable in some fashion
so that the requirement can be tested.
Figure 3.1 shows the parts of a quality attribute scenario.
Source of stimulus.We differentiate between internal and external indications of faults or failure since
thedesired system response may be different. In our example, the unexpected message arrives from
outside the system.
Stimulus. A fault of one of the following classes occurs.
← omission. A component fails to respond to an input.
← crash. The component repeatedly suffers omission faults.
← timing. A component responds but the response is early or late.
← response. A component responds with an incorrect value.
Software Architecture Lecture Notes
Artifact. This specifies the resource that is required to be highly available, such as a processor,
communication channel, process, or storage.
Environment.The state of the system when the fault or failure occurs may also affect the desired
systemresponse. For example, if the system has already seen some faults and is operating in other than
normal mode, it may be desirable to shut it down totally. However, if this is the first fault observed, some
degradation of response time or function may be preferred. In our example, the system is operating
normally.
Response. There are a number of possible reactions to a system failure. These include logging the
failure,notifying selected users or other systems, switching to a degraded mode with either less capacity
or less function, shutting down external systems, or becoming unavailable during repair. In our example,
the system should notify the operator of the unexpected message and continue to operate normally.
Response measure. The response measure can specify an availability percentage, or it can specify a time
torepair, times during which the system must be available, or the duration for which the system must be
available.
MODIFIABILITY SCENARIO
Modifiability is about the cost of change. It brings up two concerns.
← What can change (the artifact)?
← When is the change made and who makes it (the environment)?
Software Architecture Lecture Notes
Source of stimulus.This portion specifies who makes the changes—the developer, a system
administrator, oran end user. Clearly, there must be machinery in place to allow the system
administrator or end user to modify a system, but this is a common occurrence. In Figure 4.4, the
modification is to be made by the developer.
Stimulus. This portion specifies the changes to be made. A change can be the addition of a function,
themodification of an existing function, or the deletion of a function. It can also be made to the qualities
of the system—making it more responsive, increasing its availability, and so forth. The capacity of the
system may also change. Increasing the number of simultaneous users is a frequent requirement. In our
example, the stimulus is a request to make a modification, which can be to the function, quality, or
capacity.
Artifact. This portion specifies what is to be changed—the functionality of a system, its platform, its
userinterface, its environment, or another system with which it interoperates. In Figure 4.4, the
modification is to the user interface.
Environment. This portion specifies when the change can be made—design time, compile time, build
time,initiation time, or runtime. In our example, the modification is to occur at design time.
Response. Whoever makes the change must understand how to make it, and then make it, test it and
deploy it.
In our example, the modification is made with no side effects.
Response measure.All of the possible responses take time and cost money, and so time and cost are the
mostdesirable measures. Time is not always possible to predict, however, and so less ideal measures are
frequently used, such as the extent of the change (number of modules affected). In our example, the
time to perform the modification should be less than three hours.
PERFORMANCE SCENARIO:
Performance is about timing. Events (interrupts, messages, requests from users, or the passage of time)
occur, and the system must respond to them. There are a variety of characterizations of event arrival and
the response but basically performance is concerned with how long it takes the system to respond when
an event occurs.
Software Architecture Lecture Notes
Source of stimulus.The stimuli arrive either from external (possibly multiple) or internal sources. In
ourexample, the source of the stimulus is a collection of users.
Stimulus. The stimuli are the event arrivals. The arrival pattern can be characterized as periodic,
stochastic, orsporadic. In our example, the stimulus is the stochastic initiation of 1,000 transactions per
minute.
Artifact.The artifact is always the system's services, as it is in our example.
Environment.The system can be in various operational modes, such as normal, emergency, or overload.
In ourexample, the system is in normal mode.
Response.The system must process the arriving events. This may cause a change in the system
environment(e.g., from normal to overload mode). In our example, the transactions are processed.
Response measure.The response measures are the time it takes to process the arriving events (latency
or adeadline by which the event must be processed), the variation in this time (jitter), the number of
events that can be processed within a particular time interval (throughput), or a characterization of the
events that cannot be processed (miss rate, data loss). In our example, the transactions should be
processed with an average latency of two seconds.
SECURITY SCENARIO
Security is a measure of the system's ability to resist unauthorized usage while still providing its services
to legitimate users. An attempt to breach security is called an attack and can take a number of forms. It
may be an unauthorized attempt to access data or services or to modify data, or it may be intended to
deny services to legitimate users.
Security can be characterized as a system providing non-repudiation, confidentiality, integrity, assurance,
availability, and auditing. For each term, we provide a definition and an example.
← Non-repudiation is the property that a transaction (access to or modification of data or
services)cannot be denied by any of the parties to it. This means you cannot deny that you ordered that
item over the Internet if, in fact, you did.
← Confidentiality is the property that data or services are protected from unauthorized access.
Thismeans that a hacker cannot access your income tax returns on a government computer.
← Integrity is the property that data or services are being delivered as intended. This means that
yourgrade has not been changed since your instructor assigned it.
Software Architecture Lecture Notes
← Assurance is the property that the parties to a transaction are who they purport to be. This
means that,when a customer sends a credit card number to an Internet merchant, the merchant is who
the customer thinks they are.
← Availability is the property that the system will be available for legitimate use. This means that
adenial-of-service attack won't prevent your ordering this book.
← Auditing is the property that the system tracks activities within it at levels sufficient to
reconstructthem. This means that, if you transfer money out of one account to another account,
in Switzerland, the system will maintain a record of that transfer.
Each of these security categories gives rise to a collection of general scenarios.
Source of stimulus.The source of the attack may be either a human or another system. It may have
beenpreviously identified (either correctly or incorrectly) or may be currently unknown.
Stimulus. The stimulus is an attack or an attempt to break security. We characterize this as an
unauthorizedperson or system trying to display information, change and/or delete information, access
services of the system, or reduce availability of system services. In Figure, the stimulus is an attempt to
modify data.
Artifact.The target of the attack can be either the services of the system or the data within it. In our
example,the target is data within the system.
Environment. The attack can come when the system is either online or offline, either connected to
ordisconnected from a network, either behind a firewall or open to the network.
Response.Using services without authorization or preventing legitimate users from using services is a
differentgoal from seeing sensitive data or modifying it. Thus, the system must authorize legitimate users
and grant them access to data and services, at the same time rejecting unauthorized users, denying
them access, and reporting unauthorized access
Software Architecture Lecture Notes
Response measure.Measures of a system's response include the difficulty of mounting various attacks
and thedifficulty of recovering from and surviving attacks. In our example, the audit trail allows the
accounts from which money was embezzled to be restored to their original state.
TESTABILITY SCENARIO:
Software testability refers to the ease with which software can be made to demonstrate its faults
through testing. In particular, testability refers to the probability, assuming that the software has at least
one fault that it will fail on its next test execution. Testing is done by various developers, testers, verifiers,
or users and is the last step of various parts of the software life cycle. Portions of the code, the design, or
the complete system may be tested.
Source of stimulus.The testing is performed by unit testers, integration testers, system testers, or the
client. Atest of the design may be performed by other developers or by an external group. In our
example, the testing is performed by a tester.
Stimulus. The stimulus for the testing is that a milestone in the development process is met. This might
be thecompletion of an analysis or design increment, the completion of a coding increment such as a
class, the completed integration of a subsystem, or the completion of the whole system. In our example,
the testing is triggered by the completion of a unit of code.
Artifact.A design, a piece of code, or the whole system is the artifact being tested. In our example, a unit
of codeis to be tested.
Environment. The test can happen at design time, at development time, at compile time, or at
deployment time.
In Figure, the test occurs during development.
Software Architecture Lecture Notes
Response.Since testability is related to observability and controllability, the desired response is that
thesystem can be controlled to perform the desired tests and that the response to each test can be
observed. In our example, the unit can be controlled and its responses captured.
Response measure.Response measures are the percentage of statements that have been executed in
some test,the length of the longest test chain (a measure of the difficulty of performing the tests), and
estimates of the probability of finding additional faults. In Figure, the measurement is percentage
coverage of executable statements.
USABILITY SCENARIO
Usability is concerned with how easy it is for the user to accomplish a desired task and the kind of user
support the system provides. It can be broken down into the following areas:
← Learning system features.If the user is unfamiliar with a particular system or a particular aspect
of it, what canthe system do to make the task of learning easier?
← Using a system efficiently.What can the system do to make the user more efficient in its
operation?
← Minimizing the impact of errors. What can the system do so that a user error has minimal
impact?
← Adapting the system to user needs.How can the user (or the system itself) adapt to make the
user's task easier?
← Increasing confidence and satisfaction.What does the system do to give the user confidence
that the correctaction is being taken?
A user, wanting to minimize the impact of an error, wishes to cancel a system operation at runtime;
cancellation takes place in less than one second. The portions of the usability general scenarios are:
Software Architecture Lecture Notes
assumed to have failed and a fault correction component is notified. The heartbeat can also
carry data.
Exceptions.The exception handler typically executes in the same process that introduced the
exception.
FAULT RECOVERY
←
Voting. Processes running on redundant processors each take equivalent input and compute a
simpleoutput value that is sent to a voter. If the voter detects deviant behavior from a single
processor, it fails it.
Active redundancy (hot restart). All redundant components respond to events in parallel.
Theresponse from only one component is used (usually the first to respond), and the rest are
discarded. 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
Passive redundancy (warm restart/dual redundancy/triple redundancy).One component
(theprimary) 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.
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
tomake 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.
Checkpoint/rollback.A checkpoint is a recording of a consistent state created either periodically
or inresponse 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
Removal from service.This tactic removes a component of the system from operation to undergo
Software Architecture Lecture Notes
LOCALIZE MODIFICATIONS
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.
Anticipate expected changes. Considering the set of envisioned changes provides a way to
evaluate a particular assignment of responsibilities. In reality this tactic is difficult to use by
Software Architecture Lecture Notes
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
Software Architecture Lecture Notes
dependency.
DEFER BINDING TIME
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.
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.
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.
Software Architecture Lecture Notes
Bound queue sizes. This controls the maximum number of queued arrivals and consequently
there sources used to process the arrivals.
RESOURCE MANAGEMENT
Software Architecture Lecture Notes
Introduce concurrency. If requests can be processed in parallel, the blocked time can be reduced
RESOURCE ARBITRATION
First-in/First-out. FIFO queues treat all requests for resources as equals and satisfy them in turn.
Fixed-priority scheduling. Fixed-priority scheduling assigns each source of resource requests
A particular priority and assigns the resources in that priority order. Three common
prioritization strategies are
← semantic importance. Each stream is assigned a priority statically according to some
domaincharacteristic of the task that generates it.
← deadline monotonic. Deadline monotonic is a static priority assignment that assigns higher
priority
to streams with shorter deadlines.
← rate monotonic.Rate monotonic is a static priority assignment for periodic streams that
assigns
higher priority to streams with shorter periods.
← round robin. Round robin is a scheduling strategy that orders the requests and then, at
everyassignment possibility, assigns the resource to the next request in that order.
← earliest deadline first. Earliest deadline first assigns priorities based on the pending requests
withthe earliest deadline.
Static scheduling. A cyclic executive schedule is a scheduling strategy where the pre-
emption pointsand the sequence of assignment to the resource are determined offline.
Software Architecture Lecture Notes
RESISTING ATTACKS
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
andmodify either data or services. Access control can be by user or by user class.
Maintain data confidentiality.Data should be protected from unauthorized access.
Confidentiality isusually achieved by applying some form of encryption to data and to
communication links. Encryption provides extra protection to persistently maintained data
beyond that available from authorization.
Maintain integrity. Data should be delivered as intended. It can have redundant information
encodedin 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
serviceson 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
fromunknown sources may be a form of an attack. It is not always possible to limit access to
known sources.
Software Architecture Lecture Notes
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 trai.l
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.
Software Architecture Lecture Notes
INPUT/OUTPUT
Record/playback.Record/playback refers to both capturing information crossing an interface
andusing it as input into the test harness. The information crossing an interface during normal
operation is saved in some repository. 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
allowssubstitution 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.
Specialize access routes/interfaces. Having specialized testing interfaces allows the capturing
orspecification of variable values for a component through a test harness as well as
independently from its normal execution. Specialized access routes and interfaces should be
kept separate from the access routes and interfaces for required functionality.
INTERNAL MONITORING
Built-in monitors.The component can maintain state, performance load, capacity, security, or
otherinformation accessible through an interface. This interface can be a permanent interface of
Software Architecture Lecture Notes
RUNTIME TACTICS
Maintain a model of the task. In this case, the model maintained is that of the task. The task
model isused 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'sknowledge 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.
Software Architecture Lecture Notes
Maintain a model of the system.In this case, the model maintained is that of the system. It
determinesthe 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
Separate the user interface from the rest of the application. Localizing expected changes is
therationale 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
← Arch/Slinky