You have seen the method applied four times: over five modules at Rutaverde, and then at an e-commerce company, a payments institution, and a healthcare network. You were always looking over someone's shoulder: Marta, Nuria, Elena, Lucía. In this last lesson, the architecture is yours. You are going to design a complete system, from the context to the summary for senior management, walking through the course module by module. There are no new concepts: there is an assignment, some starting data, twelve deliverables, a rubric to assess yourself, and a reference solution to compare against when you finish. The project is designed to be done without an instructor, in about 25 hours of work. The temptation will be to read the solution before you start; if you give in, you will have read a fifth case study instead of having made your first design.
Contents
- How the project works
- The assignment: Rutaverde Cold
- Starting data
- The alternative: a system from your own organization
- The twelve deliverables
- Work plan by sessions
- Self-assessment rubric
- Final checklist
- How the project works
- The result is a dossier, like the one in
platform-architecturefrom Module 5: text files with diagrams, tables, and ADRs. There is nothing to program. - Twelve deliverables, D1 to D12, in the order in which the course taught you to think. Each one states what is asked for, a skeleton, the reference lessons, and the quality criteria.
- You make the assumptions. The starting data is sufficient, but not complete, as is always the case. When a piece of data is missing, assume a reasonable one, write it down as an assumption, and move on. A written assumption is a decision; an omitted one is a defect.
- There is no single valid solution. The reference solution at the end is one of them. Your design can differ and be just as good, if every decision rests on a requirement and says what it sacrifices.
- Self-assessment: with the rubric in section 7 and the checklist in section 8.
- The assignment: Rutaverde Cold
It is 15 March 2027. The "Rutaverde Platform" program has been running for two months. Daniel comes to the architecture board with an opportunity: a pharmacy chain and two food distributors want to contract temperature-controlled delivery. Rutaverde does not offer it. Senior management has approved the creation of a new line, Rutaverde Cold, and Marta puts you in charge of the design. You have six weeks.
The service, in a few words:
- Refrigerated vehicles, with two compartments with independent temperatures.
- Sensors in each compartment, which send readings continuously.
- Alerts when the temperature goes out of range for too long: what the sector calls a cold chain breach.
- Enforceable traceability: for each shipment, a certificate with the temperature curve it was subjected to while it was in Rutaverde's hands. The customer may have to show it in an inspection.
- Customers with tougher requirements than the current ones: higher contractual availability, the right to audit, and longer retention periods.
And the condition that makes the project interesting: Rutaverde Cold must build on the platform already designed, without breaking it. A cold shipment is a shipment: it is created through the API, planned, delivered with the app, tracked, and notified. ADR-001 through ADR-027 are in force and bind you. If you need to contradict one of them, you can: with a new ADR that says so and justifies it.
The people you will work with are the usual ones, Marta, Íñigo, Clara, and Daniel, plus Rosa, head of quality for the new line, who is the one accountable to the pharmaceutical customers.
Warning. The distribution of medicines and of food is subject to specific regulations, such as good distribution practice, which sets requirements for temperature control, calibration, system validation, and record retention. The figures and periods in this assignment are fictitious. In a real project, those requirements are determined by the person responsible for quality and by legal counsel, not by the architect.
- Starting data
Business and volume
| Item | Year 1 | Year 3 |
|---|---|---|
| Refrigerated vehicles | 60 | 250 |
| Cold shipments per day | 3,000 | 15,000 |
| Customers of the line | 220 | 900 |
| Average revenue per cold shipment | €9.00 | €9.00 |
- Commercial calendar: pilot in Madrid on 1 February 2028, with 15 vehicles. Rollout to Barcelona, Zaragoza, and Valencia on 3 April 2028.
- Cold shipments do not have the peak-season spike of parcel delivery: their demand is stable, with 30% more in summer.
Ranges and rules
| Type of cargo | Range | Cold chain breach if out of range for more than |
|---|---|---|
| Refrigerated pharma | 2 to 8 °C | 10 consecutive minutes |
| Fresh food | 0 to 4 °C | 20 consecutive minutes |
| Frozen | −18 °C or below | 20 consecutive minutes |
The tolerance exists because opening the door at each delivery raises the air temperature for a few minutes without the product being affected.
Vehicles and sensors
- Each vehicle carries a telematics unit with one probe per compartment, satellite positioning, and a mobile network connection.
- One reading per probe every 30 seconds, for about 14 hours of service a day. Each reading takes up about 200 bytes: probe identifier, time, temperature, location, and door status.
- The unit stores 72 hours of readings and resends them when coverage returns. It has an audible alarm and a display, both programmable.
- Probe accuracy: ±0.5 °C, with annual calibration.
- The purchase of vehicles and units comes out of another budget. Yours starts where the unit sends data.
What the customers demand
- A 99.9% monthly SLA for the cold shipments API and for certificate lookup, with a penalty of 10% of the month's invoice. Remember that Rutaverde's general SLA is 99.5%.
- Alerts: to the courier in under 1 minute; to the dispatch manager in under 2; to the customer in under 15.
- Temperature certificate available in under 5 minutes after delivery, through the portal and through the API. It must be possible to prove that it has not been altered.
- Retention of certificates and records: 5 years.
- Right to audit: a customer can ask for evidence of how the system works and of who accesses their data.
Constraints
| Constraint | Detail |
|---|---|
| Platform | ADR-001 through ADR-027 in force. In particular: no new service without an ADR (ADR-001); anything new is born in the cloud (ADR-002); AMQP event bus and events with no personal data (ADR-007, ADR-010); provider B, one EU region, guardrails B-01 to B-08 (ADR-011, ADR-021); Kubernetes only if the cloud services exceed five (ADR-016); every ADR with a cost estimate (ADR-018); RPO and RTO tiers (ADR-019) |
| Core | The monolith stays in the data center until the cutover on 12 September 2028 (ADR-027). Its performance baseline, a p95 of 185 ms, cannot get more than 10% worse |
| Calendar | Deployment freeze from 15 November to 7 January. In addition, Marta rules that there will be no changes to the monolith for Rutaverde Cold between 1 June and 30 September 2028, because of gate 4 and the cutover |
| Team | 4 developers, out of the 7 devoted to business work, and half a person from platform, from May to October 2027. None of them has worked with sensors |
| Budget | €180,000 one-off. Operations: at most €45,000 in year 1 |
| Unit cost | At most €0.05 of platform cost per cold shipment |
| Personal data | A vehicle's location is personal data of the courier. Period in force: 30 days (ADR-022) |
What you are not given
On purpose, the assignment is silent on several things that you will have to decide or assume: how to know which shipment travels in which compartment; what happens to a shipment whose chain has been broken; whether a breach is a new shipment status; what happens if a probe stops sending; and who, inside Rutaverde, has an interest in a breach not being on record.
- The alternative: a system from your own organization
You can do the project on a real system that you know. You will learn more, and it will cost you more. Three conditions:
- Bound it. One system, or one specific evolution of a system, not "the company's architecture." If you cannot describe the assignment in ten lines, it is too big.
- Get starting data equivalent to that in section 3: current and forecast volumes, users, constraints, budget, and deadlines. Whatever you cannot get, assume it and write it down.
- Mind confidentiality. Replace names, sensitive figures, and customer data before writing anything outside your organization's systems.
The twelve deliverables, the rubric, and the checklist apply just the same. Only the reference solution stops being useful for comparing decisions; it will still be useful for comparing form.
- The twelve deliverables
D1. Context, stakeholders, and context diagram
- What is asked for: one page with the problem, the scope, what is left out, the table of stakeholders with what matters to each one, and a context diagram.
- Reference: 01-01, 01-03, and the C4 model in 05-03.
- Criteria: the diagram shows people and external systems, not internal components. There is an explicit "out of scope" section. No relevant stakeholder is missing.
## Stakeholders
| Stakeholder | What matters to them | How they are kept informed |
|---|---|---|
| ... | ... | ... |
## In scope
## Out of scope
## AssumptionsD2. Measurable, prioritized non-functional requirements
- What is asked for: a table of between 8 and 12 requirements, each with its measure, and an ordered list of priorities with the justification for the first two. At least two complete quality attribute scenarios.
- Reference: 01-05.
- Criteria: no requirement without a number. It is clear what is a requirement and what is a constraint. There is at least one non-regression requirement on the existing platform.
| Id | Attribute | Requirement and measure | Origin |
|---|---|---|---|
| RF-NFR-01 | ... | ... | customer / business / platform |D3. Architecture style and container diagram
- What is asked for: the decision on where the new parts live, with its options, and a container diagram that distinguishes what exists from what is new.
- Reference: 01-02, 01-04, 01-06, and 05-03.
- Criteria: each new container has one responsibility and an owner of its data. It is clear where it connects to the platform. The decision cites the ADRs in force that it respects.
D4. Scalability design and capacity estimate
- What is asked for: the load calculation for year 1 and year 3, as average, peak, and burst, and the sizing of each part.
- Reference: 02-01 to 02-06 and 04-01.
- Criteria: the calculations are in plain view and can be redone. The formula from ADR-014 is used. It is stated which part will be exhausted first, and at what volume.
readings per second = vehicles × probes × readings per minute / 60
burst = vehicles reconnecting × probes × accumulated readings
instances = ⌈peak / capacity per instance⌉ + 1D5. High availability and resilience
- What is asked for: the single points of failure, the redundancy of each part, the resilience patterns for each dependency, and the composite availability of the functions covered by the SLA.
- Reference: 02-07.
- Criteria: the calculated availability is compared with 99.9%. For each dependency there is a timeout and a fallback. It is stated what keeps working when each part fails.
D6. Security architecture and threat model of one flow
- What is asked for: identities, network zones, classification of the new data, and a STRIDE threat model of the flow that goes from a sensor reading to the certificate. At least eight threats, with risk and decision.
- Reference: all of Module 3; especially 03-06.
- Criteria: at least one insider threat appears. Guardrails B-01 to B-08 are respected. Vehicle location is treated as personal data.
| Id | Threat | STRIDE | Likelihood | Impact | Risk | Decision and mitigation |
|---|---|---|---|---|---|---|D7. Observability, automation, and performance test plan
- What is asked for: new indicators and alerts, how the new parts are deployed, and a load test plan with its assumptions.
- Reference: 04-02, 04-03, and 04-04.
- Criteria: there is an SLO with its burn-rate alert. There is an alert for the absence of data. The test plan lists the assumptions it must validate, and what you will do if one of them fails.
D8. Cost estimate and unit economics
- What is asked for: fixed and variable cost of the new parts, cost per cold shipment in year 1 and in year 3, and a comparison with the limits.
- Reference: 04-05.
- Criteria: fixed is separated from variable. The one-off cost is included. It is stated at what volume the limit stops being met, if that happens.
D9. RPO, RTO, and recovery strategy
- What is asked for: the ADR-019 tier that corresponds to each new function, or a different, justified one, and the strategy that meets it.
- Reference: 04-06.
- Criteria: what the system already has is put to use. Technical recovery is distinguished from operational continuity: what a courier does if the system is not there.
D10. At least four complete ADRs
- What is asked for: four ADRs with Rutaverde's template, numbered from ADR-028. At least one with a weighted decision matrix.
- Reference: 01-06 and the security section of ADR-013.
- Criteria: each one has real options, not one option and two straw men. The negative consequences are written down. There is a review trigger and a cost.
# ADR-0NN: Title
Status: Proposed | Accepted
Date:
Participants:
## Context
## Options considered
## Decision
## Security
## Review
## ConsequencesD11. Roadmap, risks, and accepted debt
- What is asked for: phases with dates that respect the calendar constraints, a register of at least six risks, and the list of the debt you knowingly take on.
- Reference: 05-02 and 05-05.
- Criteria: no date falls within a freeze. Each debt has a reason and a payment trigger. The plan says what gets cut if the schedule gets tight.
D12. One-page executive summary
- What is asked for: the decision note for Daniel: what is proposed, how much it costs, when it will be ready, what risks it carries, and what decision is being asked of him.
- Reference: 05-03.
- Criteria: one page. No unexplained acronyms. The figures match those in D8 and D11. It ends with a specific request.
- Work plan by sessions
| Session | Hours | Work | Deliverables |
|---|---|---|---|
| 1 | 2 | Read the assignment twice. Note down questions and assumptions. Review the context of the platform | — |
| 2 | 2 | Stakeholders and context | D1 |
| 3 | 3 | Requirements, measures, and priorities | D2 |
| 4 | 3 | Style options and container diagram | D3 |
| 5 | 3 | Capacity and availability | D4, D5 |
| 6 | 3 | Security and threats | D6 |
| 7 | 2 | Operations and testing | D7 |
| 8 | 2 | Cost and recovery | D8, D9 |
| 9 | 3 | Write the ADRs | D10 |
| 10 | 2 | Roadmap, summary, and review against the rubric | D11, D12 |
That makes 25 hours. Two tips on sequencing: draft each ADR as soon as you make the decision, not in session 9; and let a day go by between session 9 and session 10, because the defects in your own design are not visible on the same day.
- Self-assessment rubric
| Criterion | Insufficient | Sufficient | Proficient | Excellent |
|---|---|---|---|---|
| Requirements | Adjectives without a measure | Most have a number | All measurable and prioritized | In addition, with origin, scenarios, and a distinction between requirement and constraint |
| Traceability | Decisions unrelated to the requirements | Some cite a requirement | Every decision cites the requirement that motivates it | In addition, every requirement has a decision or a test that covers it |
| Options and trade-offs | A single option | Several options, without criteria | Matrix with criteria and weights | In addition, it says what is sacrificed and what would change the decision |
| Fit with the platform | Ignores the ADRs in force | Mentions them | Respects and cites them | In addition, identifies the impact on what exists and protects it with a measure |
| Calculations | No figures | Figures with no working shown | Reproducible calculations | In addition, with assumptions marked and a plan to validate them |
| Security | A list of controls | Controls linked to data | Threat model of the flow | In addition, insider threats, personal data, and a decision per threat |
| Operations and recovery | Absent | Listed | With indicators, alerts, RPO, and RTO | In addition, continuity without the system, and drills |
| Cost | No estimate | A total | Fixed, variable, and unit cost | In addition, sensitivity to volume and one-off cost |
| Communication | Only text, or only drawings | Diagrams with no legend | Clear diagrams and an orderly document | In addition, a summary that someone from the business understands unaided |
| Honesty | Everything works out | The odd risk | Risks and debt recorded | In addition, what is not known is written down as such |
To consider it a pass, no criterion should be left at "insufficient" and at least six should be at "proficient" or above. The last criterion is not decoration: it is the one that most distinguishes a professional design.
- Final checklist
- [ ] Every non-functional requirement has a figure and a way of measuring it.
- [ ] Every important decision has its ADR, with at least two real options.
- [ ] No ADR in force is contradicted without saying so.
- [ ] The diagrams distinguish what exists from what is new.
- [ ] All the calculations can be redone with the data in the document.
- [ ] The composite availability has been compared with the SLA.
- [ ] There is an answer to "what if this part fails?" for every new part.
- [ ] Personal data is identified, with its retention period.
- [ ] The threat model includes an insider.
- [ ] There is an alert for when data stops arriving.
- [ ] The cost per business unit is calculated for two volumes.
- [ ] No date in the plan falls within a freeze.
- [ ] The accepted debt is written down, with its trigger.
- [ ] The figures in the executive summary match those in the rest.
- [ ] Assumptions are marked as assumptions.
Common Mistakes and Tips
The mistakes that come up most often in projects of this kind:
- Starting with the diagram. Drawing boxes before having requirements with figures. The diagram is the consequence.
- Designing for the word and not for the number. "Sensors" sounds like millions of messages and specialized technology. Do the math before choosing.
- Putting everything in the monolith, because it is already there, or moving everything out to new services, because that is the modern thing. Both are unreasoned decisions.
- Forgetting the platform. Designing Rutaverde Cold as if there were not 27 earlier decisions, a bus, an identity system, and a calendar.
- Loading the critical path. Making shipment creation depend on a new part that it does not need.
- Confusing the alert with the record. Notifying in time and being able to prove it years later are two requirements, with two designs.
- A threat model with no insider threats. Here, the party with the greatest interest in a breach not being on record works at the company.
- ADRs with filler options, put there so that the one already chosen wins.
- A plan with no planned cut. When the schedule gets tight, and it will, someone will decide what gets dropped; better that you decided it calmly beforehand.
- An executive summary that summarizes the technology, and not the decision being asked for.
- Tip: when you are torn between two options, write the ADR for both. The one you cannot manage to defend in writing was never an option.
Exercises
The exercise for this lesson is the project: complete deliverables D1 to D12 for Rutaverde Cold, or for your own system, and assess them with the rubric and the checklist.
If you want to split it into three milestones:
- Milestone 1, the problem: D1 and D2. Do not go on until every requirement has a number.
- Milestone 2, the design: D3 to D9.
- Milestone 3, the decision: D10 to D12.
Compare with the reference solution only when you finish each milestone.
Solutions
What follows is a summarized reference solution for Rutaverde Cold. It is not the only valid one. Where your design differs, do not look for who is right: look for which requirement or which assumption led the two of you down different paths.
The math first (D4). Before deciding anything:
- Year 3: 250 vehicles × 2 probes × 2 readings per minute = 1,000 readings per minute, about 17 per second. Year 1: 4 per second.
- Per day, over 14 hours: 840,000 readings. At 200 bytes: 168 MB a day, about 61 GB a year.
- Burst: if a mobile network failure leaves 100 vehicles without coverage for an hour, when it comes back 100 × 2 × 120 = 24,000 readings arrive all at once.
Seventeen writes per second are a third of the shipment creations per second that the core handles in peak season. It is not a high-volume problem. On the principle of simple first, this calculation rules out half a dozen specialized technologies.
Key decisions (D3, D5, D9).
| Decision | Reasoning |
|---|---|
| One new service, Telemetry, in the cloud | A continuous write load, different from the core's; its own data; anything new is born in the cloud (ADR-002); it adds no risk to a monolith that is being migrated in 2028. It is the third service in the cloud: below the threshold in ADR-016 |
| The cold shipment is still a shipment in the Shipments module | An optional temperature_range field in the API; same statuses. Creating a cold shipment does not depend on Telemetry |
The breach is an INCIDENT with the reason COLD_CHAIN_BREACH, not a new status |
The consumers of ShipmentStatusChanged version 1 do not break |
One new event, ShipmentAssignedToVehicle |
It is what the assignment was silent on: it relates shipment, vehicle, and compartment at loading time. No personal data |
A separate bus, telemetry-bus, with the same technology |
A bulkhead: a flood of readings cannot affect shipments.events, which is tier 1 |
| Store in managed PostgreSQL, partitioned by day | The same technology and the same pattern as ADR-006; 61 GB a year does not justify a time series database |
| Two-level alerting: in the vehicle's unit and on the platform | The alert to the courier cannot depend on coverage |
| The certificate is generated on delivery and stored immutably | It separates the legal record, which is small and lasts 5 years, from the raw readings, which are archived after 90 days |
| Recovery: Telemetry in tier 1 of ADR-019, with an RTO of 2 h | The units store 72 hours: as long as ingestion is back before then, no reading is lost |
Container diagram (D3).
flowchart TB
CUS["Person: Rutaverde Cold customer"]
COU["Person: courier"]
DSP["Person: dispatch manager"]
UNIT["Vehicle telematics unit: probes, 72 h memory, and alarm"]
subgraph EXISTING["Rutaverde platform: existing"]
EDGE["Managed edge"]
MON["Modular monolith: Shipments with temperature_range; Delivery"]
BUS["event-bus"]
TRK["Tracking service"]
NTF["Notifications service"]
APP["Courier app"]
end
subgraph NEWPART["New: Rutaverde Cold"]
GWY["device-gateway: one certificate per unit"]
TBUS["telemetry-bus"]
TEL["Telemetry service: ingestion, rules, and certificates"]
DBTEL[("db-telemetry: PostgreSQL partitioned by day")]
STATE[("State per probe, in memory")]
CERT[("rv-cold-certificates: immutable, 5 years")]
end
UNIT -->|"signed readings, over TLS"| GWY
GWY --> TBUS
TBUS --> TEL
TEL --> DBTEL
TEL --> STATE
TEL --> CERT
MON -->|"ShipmentAssignedToVehicle and ShipmentStatusChanged"| BUS
BUS --> TEL
TEL -->|"ColdChainBroken"| BUS
BUS --> MON
BUS --> TRK
BUS --> NTF
CUS --> EDGE
EDGE --> MON
EDGE -->|"certificate lookup"| TEL
COU --> APP
APP --> EDGE
NTF --> DSP
NTF --> CUS
UNIT -.->|"local alarm, no network"| COU
Non-functional requirements (D2).
| Id | Attribute | Requirement and measure | Origin |
|---|---|---|---|
| RF-NFR-01 | Availability | Cold shipments API and certificate lookup: 99.9% monthly, contractual; internal SLO of 99.95% | Customer |
| RF-NFR-02 | Integrity | No reading lost with disconnections of up to 72 h; gaps detected and flagged in the certificate | Customer |
| RF-NFR-03 | Performance | Breach alert to the dispatch manager: p95 < 2 min from the moment the condition is met. Alarm in the vehicle: < 1 min, with no network | Customer |
| RF-NFR-04 | Capacity | 17 readings per second sustained; designed for 100; a burst of 24,000 absorbed in under 10 min | Business |
| RF-NFR-05 | Traceability | Certificate available in under 5 min after delivery in 99% of cases; with a hash; 5 years | Customer |
| RF-NFR-06 | Security | Each unit has its own identity; readings signed at the source; location retained for 30 days | Platform |
| RF-NFR-07 | Cost | ≤ €0.05 per cold shipment; ≤ €45,000 in year 1 | Business |
| RF-NFR-08 | Recovery | Telemetry: RTO 2 h. Certificates: RPO 5 min | Platform |
| RF-NFR-09 | Non-regression | The p95 of the shipments API does not get more than 10% worse than 185 ms | Platform |
| RF-NFR-10 | Observability | A probe with no data for more than 5 min, with the vehicle out for delivery, generates an alert | Quality |
Priorities: 1, integrity and traceability, because that is what the customer is buying; 2, availability of what is contractual; 3, non-regression of the platform; 4, cost; 5, performance.
Composite availability (D5). With the method from Module 2: edge at 99.99%; two Telemetry instances at 99.5%, in parallel, 99.9975%; db-telemetry in two zones, 99.95%.
- Certificate lookup: 0.9999 × 0.999975 × 0.9995 = 99.94%, about 27 minutes a month, against the 43 that the SLA allows.
- If the lookup also depended on the bus: × 0.9995 = 99.89%. It would not comply.
A design decision follows from this: whatever the SLA covers reads only from the database. Ingestion, the bus, and rule evaluation are left outside the SLA path, protected by the 72 hours of memory in the units. And an honest warning: 99.94% on paper is below the internal SLO of 99.95%, and the headroom over the SLA is 16 minutes. With a 10% penalty, it will be measured from day one.
Threat model (D6), summarized.
| Threat | STRIDE | Risk | Mitigation |
|---|---|---|---|
| A fake unit sends readings | Spoofing | 6 | Certificate per unit; enrollment controlled by two people |
| Someone inside Rutaverde alters readings to hide a breach | Tampering | 9 | Signature in the unit; sequence number; visible gaps; immutable certificate; nobody in operations can write to rv-cold-certificates |
| A customer disputes a certificate, or Rutaverde denies a breach | Repudiation | 6 | Hash of the certificate and immutable storage |
| Pharmacy routes exposed: high-value medicines | Information disclosure | 6 | Location classified as Personal; 30 days; access by role and city |
| Flood of readings | Denial of service | 4 | Limit per unit; separate telemetry-bus |
| A compromised unit as a way in | Elevation of privilege | 6 | cloud-iot zone; the gateway only accepts publishing |
| A courier disconnects the probe | Tampering | 6 | Alert on absence of data; the gap is recorded in the certificate |
The second threat is the answer to the last question the assignment left open. A breach costs Rutaverde money, and that creates an internal incentive for it not to be on record. It is the same logic as gap G-02, the delivery not tied to a place, and as Cauri's separation of duties.
Cost (D8).
| Item | Year 1 |
|---|---|
| Telemetry, two instances | €5,400 |
db-telemetry |
€9,600 |
telemetry-bus |
€3,600 |
device-gateway |
€2,400 |
| Object storage | €1,200 |
| Observability | €6,000 |
| Connectivity: 60 units at €5 a month | €3,600 |
| Fixed | €31,800 |
- Variable: €0.004 per shipment. Year 1: 3,000 × 365 = 1,095,000 shipments, €4,380.
- Year 1: €36,180, €0.033 per shipment. It meets both limits.
- Year 3: fixed cost of €55,000, of which €15,000 is connectivity, plus €21,900 variable: €76,900 over 5,475,000 shipments, €0.014.
- One-off: 4.5 people for 6 months, 27 person-months at €5,500, is €148,500; with a 15% contingency, €170,775, within the €180,000.
Two complete ADRs (D10).
# ADR-028: Rutaverde Cold: Telemetry service in the cloud
Status: Proposed
Date: 2027-04-22
Participants: architecture board; Daniel (business); Rosa (quality)
## Context
Rutaverde Cold needs to receive temperature readings from 60
vehicles (250 in three years), about 17 per second, evaluate rules, and
issue certificates. ADR-001 requires an ADR for every new service.
The monolith is in the data center and is migrated in September 2028 (ADR-027).
## Options considered
A. A Telemetry module inside the monolith: 3.10.
B. A Telemetry service in the cloud, with managed PostgreSQL: 4.25.
C. The provider's device platform and a time series
database: 3.20.
Criteria and weights: isolation of the core 25%; fit with team and
schedule 25%; cost 15%; growth 15%; portability 10%;
operations 10%.
## Decision
We will adopt option B. Telemetry will be the third service in the
cloud: two instances in containers on the managed service from
ADR-016, zones A and B. Its own data in db-telemetry, partitioned by
day: 90 days online and archive in object storage.
It will receive the readings through telemetry-bus, separate from event-bus. It
will relate to the core only through events: it consumes
ShipmentAssignedToVehicle and ShipmentStatusChanged; it publishes ColdChainBroken.
The cold shipment is still a shipment in the Shipments module, with an
optional temperature_range field. Creating a shipment does not depend on Telemetry.
## Security
Data affected: temperature (Internal); vehicle location
(Personal, 30 days). New boundary: vehicle units, in a
cloud-iot zone. Service identity svc-telemetry.
Requires threat modeling: yes; done, seven threats.
## Review
Triggers: more than 500 readings per second sustained; more than
five services in the cloud; db-telemetry above 500 GB online.
## Consequences
Positive: the core receives no new load or risk (RF-NFR-09); the
technology is the one the team already knows. Negative: one more service
to operate and monitor; eventual consistency between the shipment and its
telemetry. Risks: the team has not worked with devices.
Cost: €31,800 fixed per year in year 1; €170,775 one-off.The calculation for B: 5 × 0.25 + 4 × 0.25 + 4 × 0.15 + 4 × 0.15 + 4 × 0.10 + 4 × 0.10 = 1.25 + 1.00 + 0.60 + 0.60 + 0.40 + 0.40 = 4.25. Option A gets a 1 for isolation: it puts continuous writes into the database that is about to be migrated. Option C gets a 1 for portability and a 2 for fit: it is the answer to a volume a hundred times greater.
# ADR-029: Cold chain breach: two-level evaluation and immutable certificate
Status: Proposed
Date: 2027-04-29
Participants: architecture board; Rosa (quality); Clara (security)
## Context
Customers demand an alert to the courier in under 1 minute, to the dispatch
manager in under 2, and a certificate per shipment whose integrity
can be proven for 5 years. Vehicles lose coverage
frequently. A breach has a cost for Rutaverde: there is an
internal incentive for it not to be on record.
## Options considered
A. Evaluate only on the platform.
B. Evaluate only in the vehicle's unit.
C. Evaluate at both levels; certificate generated on the platform.
## Decision
We will adopt option C. The unit evaluates the rules for its cargo and
alerts the courier with its alarm, with no network. Telemetry evaluates the
same rules on the readings received, keeps the state per
probe, and publishes ColdChainBroken; the shipment moves to INCIDENT with the reason
COLD_CHAIN_BREACH, and Notifications alerts the dispatch manager and the
customer. The rules are configuration per type of cargo. On delivery,
Telemetry generates the certificate: readings from the custody period,
minimums, maximums, time out of range, gaps, and hash. It is stored
in rv-cold-certificates, immutable, 5 years. A probe with no data for more
than 5 minutes with the vehicle out for delivery generates a different alert.
## Security
Readings signed by the unit, with a sequence number. No operations
role can write to or delete from rv-cold-certificates. Data
gaps are recorded in the certificate: they are not interpolated.
## Review
Triggers: more than 2% of certificates with gaps; false
alerts above one per vehicle per week.
## Consequences
Positive: the alert to the courier does not depend on the network; the legal
record is small, immutable, and separate from the raw data.
Negative: the rules exist in two places and must be kept
identical; they are distributed to the units as versioned configuration.
Pending: the 5-year period and the content of the certificate must
be validated by Rosa and legal counsel.
Cost: included in ADR-028.The rules, as configuration:
cold_chain_rules:
version: 3
refrigerated_pharma: { min: 2.0, max: 8.0, tolerance_minutes: 10 }
fresh_food: { min: 0.0, max: 4.0, tolerance_minutes: 20 }
frozen: { max: -18.0, tolerance_minutes: 20 }
no_data: { minutes: 5, only_if: "vehicle out for delivery" }versionmakes it possible to know which rules each shipment was evaluated with, and to check that the unit and the platform use the same ones.tolerance_minutesis the consecutive time out of range beyond which there is a breach: it covers door openings.no_datais the alert on absence, which distinguishes "everything is fine" from "we know nothing."
The rest of the ADRs, in outline (D10).
- ADR-030,
telemetry-busseparate fromevent-bus. Same technology, another instance. €3,600 a year is paid for a bulkhead. Review if the combined load is still small after a year: they could be merged. - ADR-031, event contracts.
ShipmentAssignedToVehicleversion 1 andColdChainBrokenversion 1, with no personal data, with the envelope from ADR-007. The breach as a reason for INCIDENT and not as a new status. - ADR-032, service levels of Rutaverde Cold. A 99.9% SLA limited to the cold shipments API and to certificate lookup; ingestion and alerts with their own objectives, outside the SLA. Telemetry in tier 1 of ADR-019. Operational continuity: without the platform, the vehicle's alarm keeps working and the courier writes down the temperature from the display at each delivery.
- ADR-033, retention. Certificates 5 years; raw readings 90 days online and then archive; location 30 days, kept separate from temperature so that it can be deleted earlier. Pending legal validation: it extends ADR-022.
Roadmap, risks, and debt (D11).
| Phase | Dates | Content |
|---|---|---|
| Design | 15 March to 30 April 2027 | This dossier; ADR-028 to ADR-033 |
| Build | May to October 2027 | Telemetry, gateway, field and events in the monolith. In production, turned off behind a feature flag, before 12 November |
| Freeze | 15 November to 7 January | No deployments. Tests with 5 vehicles in pre-production |
| Pilot | 1 February 2028 | Madrid, 15 vehicles |
| Rollout | 3 April 2028 | Four cities, 60 vehicles |
| No changes to the monolith | 1 June to 30 September 2028 | Only Telemetry evolves |
The main risks: the team does not know the devices, which is mitigated with a prototype with two real units in May; the changes to the monolith compete with the extraction of Tracking, and are limited to one field and one event; the availability headroom is narrow; the vendor's units may not sign the readings as expected; and quality validation may demand more than planned.
The debt knowingly taken on: PostgreSQL instead of a specialized store, with a trigger at 500 readings per second; manual enrollment of units, up to 100 vehicles; a certificate in a simple format, with no qualified electronic signature, until a customer demands one; and no breach prediction. If the schedule gets tight, certificate lookup through the API is cut, since in the pilot it can be through the portal only.
The executive summary (D12), in its five sentences: the proposal is a new, small service, built on the platform, that does not touch the current critical path; it costs €170,775 one-off and €36,180 in the first year, €0.033 per shipment on €9 of revenue; the pilot can start on 1 February 2028; the main risk is a headroom of 16 minutes a month over an SLA with a 10% penalty; and Daniel is asked to approve ADR-028 and to agree with the customers that the SLA covers the API and the certificates, not the reception of readings.
Conclusion
The final project brings the course to an end. It is worth looking back over the whole journey.
In Module 1 you learned what technological architecture is and what an architect does: decide, together with others, what is expensive to change. You met the design principles, the components, and the styles, and the two tools you have used in every lesson since: non-functional requirements with figures, and decisions recorded with their options and their consequences. In Module 2 you designed for growth and for failure: scaling, load balancing, caching, replication, queues and events, and the patterns that keep a failure from spreading. In Module 3 you built security in by design: identity, data protection, cloud, network, and a threat modeling practice that turns fear into a list. In Module 4 you came down to reality: sizing, observing, automating, measuring with tests what had been assumptions, putting a price on each part, and preparing for the day everything is lost. In Module 5 you discovered that an architecture without governance, without a plan, without documentation, and without review remains a drawing, and that you almost never start from scratch. And in Module 6 you saw the same method give four different answers in four sectors, and you applied it yourself.
If only a few ideas were to be kept, they would be these:
- There is no best architecture; there is architecture suited to a set of requirements. And requirements are written with numbers.
- Every decision sacrifices something. Whoever does not know what they have sacrificed has not decided.
- Simple first. Complexity is added when a requirement asks for it, not before.
- Everything fails. Design consists of deciding how.
- What is not measured is an assumption; what is not tested does not work.
- Decisions are written down, with their why, for whoever comes next. Often that will be you.
- Architecture is work done with people. The best decisions in the course came out of a conversation with Daniel, with Clara, with Tomás, or with Pilar.
From here on, learning is practice. Some steps that work:
- Write ADRs at work starting tomorrow, even if nobody asks you for them and even if the decision is small. It is the habit that will most quickly make you an architect in the eyes of others.
- Measure your current system: its percentiles, its actual availability, its cost per business unit. You will be surprised by what nobody knows.
- Read incident reviews published by other organizations. They are the most honest case studies there are.
- Go deeper in one area, depending on where you want to go: data, platforms and cloud, security, or enterprise architecture. The architecture certifications of the cloud providers and frameworks such as TOGAF give structure to your study; none of them replaces having designed, operated, and fixed a system.
- Seek out review. Present your designs to someone with more experience and ask them to look for the defects. And review other people's with the same respect.
- Go back to your decisions a year later and check which ones were right. Rutaverde's annual review works for a career too.
You started the course by joining Marta's team as an architect in training, facing a ten-year-old monolith that had gone down for three hours on its worst day. You finish it with a dossier of your own, twelve deliverables, and several ADRs with your name on them. The systems you work on will be different from all the ones we have seen, and so will the answers. The questions you already know.
Technological Architecture Course
Module 1: Fundamentals of Technological Architecture
- Introduction to Technological Architecture
- System Design Principles
- Components of a Technological Architecture
- Architecture Models
- Non-Functional Requirements and Quality Attributes
- Architecture Decisions and Trade-off Analysis
Module 2: Designing Scalable Systems
- Scalability Concepts
- Scalable Design Patterns
- Load Balancing
- Caching and In-Memory Storage
- Data Layer Scalability: Replication and Partitioning
- Asynchronous Communication: Message Queues and Events
- High Availability and Resilience
Module 3: Security in Technological Architecture
- Security Fundamentals
- Authentication and Authorization
- Data Protection
- Cloud Security
- Network Security and Zero Trust Architecture
- Threat Modeling
Module 4: Efficiency and Optimization
- Resource Optimization
- Monitoring and Maintenance
- Process Automation
- Performance Evaluation
- Technology Cost Management (FinOps)
- Business Continuity and Disaster Recovery
Module 5: Managing Technological Architecture
- IT Governance
- Technology Project Management
- Documentation and Communication
- Evaluation and Continuous Improvement
- Technical Debt and the Evolution of Legacy Systems
