AR1: Thinking like an architect: quality attributes and trade-offs
Quality attributes
🎯You'll be able to
Name the main quality attributes, write each as a measurable scenario, and say which matter most for a given system.
🏠The everyday picture
Two cars can both get you to Nashik. One is cheap to run, one is fast, one seats seven. "A good car" means nothing until you say what the trip needs.
📘What it really is
-
Quality attributes describe how well a system does its job, not what it does: performance, availability, scalability, security, maintainability (how easily it changes), operability (how easily it is run) and cost.
-
Write them as scenarios with numbers: "At 180 orders a minute, 95% of order requests are answered within 800 ms." A scenario has a source, a stimulus, the environment, the response and a measure.
-
Availability is often given in "nines": 99.9% allows about 43 minutes of downtime in a 30-day month; 99.99% about 4 minutes.
- Parts in a chain multiply: two parts at 99.9% each, both needed for an order, give about 99.8% together.
- Rank them. Not every attribute can be first; the ranking is what guides trade-offs (Lesson 3).
📝A worked example
Input: RasoiRoute's incidents and peak figures (data/incidents.csv, data/peak-day.csv).
Steps:
- 42.3% of incidents started in notifications, often when the SMS provider was slow and orders waited. That points to availability and fault isolation.
- Peak is 180 orders a minute (3 a second) and 540 messages a minute. That points to performance at peak.
- 22.2% of deploys were rolled back. That points to maintainability and deploy safety.
- Write a scenario: "When the SMS provider takes 10 seconds to answer, customers can still place orders in under 1 second."
Expected output: a ranked list (availability of ordering, performance at peak, deploy safety, cost) with one measurable scenario each.
🌍Where it's used
- Payment companies state availability targets and response times in their agreements with banks.
- Hospitals rank data security and availability of patient records above cost.
- Streaming services rank performance at peak, because a slow start at a big match loses viewers.
📝Case scenario
A ticketing site said it needed "high performance". At a concert sale, pages loaded quickly but the payment step failed for one buyer in ten. Its real need was availability of payments at a peak of known size, which a scenario would have made clear and testable.
🖱️Try it
Write two quality attribute scenarios for an app you use, each with a source, stimulus, environment, response and measure. Success: each could be tested by someone else.
⚠️Common mistakes
- Adjectives instead of numbers. Sign: "fast", "scalable". Fix: a scenario with a measure.
- Everything is top priority. Sign: a list of ten "musts". Fix: rank them; the ranking guides trade-offs.
- Forgetting operability and cost. Sign: a design nobody can afford to run. Fix: include them in the list.
🛠️For your project
Project 1's decision drivers are your ranked quality attributes. Test 2 checks the figures that justify them.
✅Quick check
About how much downtime does 99.9% availability allow in a 30-day month?
Show the answer
About 43 minutes.
Why write a quality attribute as a scenario?
Show the answer
So it has a measure that can be tested and compared between designs.
