Software Architecture Concepts
Reasoning About Software Architecture
Software architecture concerns a system's significant structures, their relationships, and the principles guiding its design and evolution. You use architectural reasoning when a decision affects several responsibilities, important system qualities, or the cost of future change. An architecture exists in the implemented system; diagrams and written decisions help you understand and evaluate it.
Recognizing architectural significance
A decision is architecturally significant because of its consequences. Choosing where access rules are enforced may affect security, testing, and every operation that handles protected information. Renaming a temporary variable usually affects a much smaller area. The same technical choice can have different significance in different systems: changing a data format becomes architectural when several independently maintained parts depend on it.
Decision | Typical significance | Reason |
|---|---|---|
Set a shared rule for checking access | Architectural | Several responsibilities depend on consistent enforcement |
Restrict which responsibilities may access stored orders | Architectural | The restriction shapes dependencies and future changes |
Rename a variable inside one function | Local implementation | The change normally preserves externally visible relationships |
Architecture connects technical decisions to the concerns of stakeholders. Users may care about response time, while maintainers care about safe changes. Explaining these concerns makes a decision easier to evaluate than simply naming a preferred technology.
Representations answer different questions
An architectural view deliberately leaves some information out. A structural view can show responsibilities and permitted dependencies. A runtime view can show interactions during an operation. A deployment view can show where software executes. These representations should describe compatible aspects of the same system.
An arrow needs a stated meaning. It might represent a permitted call, a message, or a dependency; these meanings are not interchangeable. A diagram showing permitted calls does not establish their frequency or duration.
Evaluate qualities under stated conditions
A quality attribute describes how well a system operates or accommodates change, such as its performance, security, or modifiability. A useful requirement gives the operating conditions and an observable criterion. For example, a response-time requirement should identify the operation, workload, measured statistic, and acceptable limit.
For a simplified request whose processing stages run sequentially, with fixed durations and no overlap, the timing model is
Here, ti is the duration of processing stage i, and Tinteraction is the total additional time spent communicating between stages. Include every contribution once. Waiting or other delays require additional terms if the model has not already included them.
Example: A hypothetical operation has fixed processing durations of 48 ms and 72 ms, plus 12 ms of interaction time. Its predicted total is 48+72+12=132 ms, leaving 150−132=18 ms below a 150 ms limit. This conclusion applies to the stated model and conditions.
Architectural choices often improve one quality while consuming resources or making another quality harder to achieve. Check hard constraints before ranking feasible alternatives. A faster proposal may still exceed a memory limit. Record the decision rationale so that a later change in workload or requirements can trigger a meaningful reassessment.
What to remember
- Judge architectural significance by system-wide consequences.
- Use complementary representations with explicit meanings.
- Evaluate qualities against measurable requirements and stated conditions.
- Treat a model's prediction as conditional on its assumptions.
- Compare trade-offs only after checking hard constraints.
Example: Choosing a Request-Handling Proposal
A ticket-booking team compares two software architecture proposals. The latency budget is the maximum permitted end-to-end request time: 200 ms. Peak memory use must also remain at or below 512 MiB.
For this exercise, treat the predicted processing durations and memory values as exact for one specified operating scenario. Processing stages run sequentially, and the listed interaction time is additional time across the whole request. There is no overlap or other delay. The table contains individual fixed durations, not percentile measurements.
Contribution | Proposal A | Proposal B |
|---|---|---|
Validate request | 35 ms | 35 ms |
Check availability | 75 ms | 45 ms |
Record booking | 65 ms | 65 ms |
Total additional interaction time | 20 ms | 40 ms |
Peak memory use | 440 MiB | 590 MiB |
a) Calculate the predicted end-to-end request time for each proposal.
Step 1: Add the processing durations. Proposal A's processing subtotal is ________, obtained from 35+75+65. Proposal B's processing subtotal is ________, obtained from 35+45+65.
Step 2: Add each proposal's total interaction time once. It already covers all interactions, so multiplying it by the number of processing stages would count time that the model does not specify.
The predicted request times are 195 ms for Proposal A and 185 ms for Proposal B.
b) Determine which proposals satisfy both hard constraints under the stated model.
Step 1: Compare each request time with the 200 ms limit. Proposal A's response-time headroom is ________, found from 200−195. Proposal B's response-time headroom is ________, found from 200−185. Both satisfy the timing requirement.
Step 2: Compare peak memory use with the 512 MiB limit.
The negative memory headroom means Proposal B exceeds the limit by 78 MiB. Both requirements must hold for the same proposal.
Proposal A satisfies both constraints. Proposal B fails the memory constraint. This is a conclusion about the supplied scenario and model, rather than proof about all possible workloads.
c) Calculate Proposal B's percentage reduction in response time relative to Proposal A, to one decimal place. Does that improvement justify selecting B under the stated requirements?
Step 1: Find the absolute reduction. The difference 195−185 is ________. Use Proposal A's time as the reference because the question asks for the reduction relative to A.
Step 2: Divide the reduction by the reference time and convert to a percentage.
Proposal B reduces predicted response time by 5.1% relative to Proposal A. However, its lower response time does not remove its 78 MiB memory excess. Select Proposal A from these two proposals under the stated requirements. Selecting B would require a justified change to the proposal or the memory constraint, followed by reassessment.
A review team is organizing documentation for a new booking system. Match each term to the description that correctly identifies its role in architectural reasoning.
A property describing how well a system operates or accommodates change
Significant system structures, their relationships, and principles guiding design and evolution
Reasons, evidence, assumptions, and trade-offs supporting the selected alternative
A representation focused on selected concerns, such as permitted dependencies or runtime interactions
Software architecture
Decision rationale
Architectural view
Quality attribute
A booking request has a 240 ms response-time limit. Its three sequential processing stages take fixed durations of 45 ms, 70 ms, and 55 ms. Five additional interactions occur sequentially, each taking the same duration. There are no other delays or overlapping operations. What is the maximum permitted duration of each interaction, in ms, to the nearest whole millisecond?