Cover of Fundamentals of Software Architecture by Mark Richards, Neal Ford - Business and Economics Book

From "Fundamentals of Software Architecture"

Author: Mark Richards, Neal Ford
Publisher: O'Reilly Media
Year: 2020
Category: Computers

🎧 Free Preview Complete

You've listened to your free 10-minute preview.
Sign up free to continue listening to the full summary.

🎧 Listen to Summary

Free 10-min Preview
0:00
Speed:
10:00 free remaining
Chapter 19: Architecture Decisions
Key Insight 3 from this chapter

Architecture Decision Records (ADRs)

Key Insight

Architecture Decision Records (ADRs) are a highly effective method for documenting architecture decisions, initially promoted by an expert and recognized for adoption in industry practices. An ADR is a concise text file, typically one to two pages long, that describes a specific architecture decision. These are often written in text document formats like AsciiDoc or Markdown, or as a wiki page template. Tooling is available for managing ADRs, such as ADR-tools, an open-source command-line interface that assists with numbering schemes, locations, and superseded logic for these records.

The basic structure of an ADR comprises a Title, Status, Context, Decision, and Consequences, often supplemented by optional Compliance and Notes sections. The Title is sequentially numbered and provides a brief, descriptive phrase, for example, '42. Use of Asynchronous Messaging Between Order and Payment Services.' The Status can be Proposed (requiring approval from a higher authority or governance body, like an architecture review board), Accepted (approved and ready for implementation), Superseded (replaced by another ADR, preserving a historical link, such as 'Superseded by 68'), or Request for Comments (RFC) with a specified deadline to gather broader stakeholder input. The Context section details the situation or issue necessitating the decision, concisely elaborating on the forces at play and potential alternatives, for instance, 'The order service must pass information to the payment service using REST or asynchronous messaging.' Criteria for an architect's self-approval, such as costs exceeding €5000, cross-team impact, or security implications, should be clearly documented.

The Decision section articulates the architecture choice using an affirmative, commanding voice, with a full justification that emphasizes the 'why' over the 'how,' for example, 'we will use asynchronous messaging between services.' Understanding the rationale behind a decision is crucial for preventing future errors, such as a subsequent architect overriding a gRPC decision meant to reduce latency, inadvertently causing timeouts. The Consequences section documents the decision's overall impact, both positive and negative, and includes trade-off analyses; for instance, asynchronous 'fire and forget' messaging for posting a review can significantly increase responsiveness from 3100 milliseconds to 25 milliseconds, while also introducing complex error handling. Optional Compliance sections specify how decisions will be measured and governed, either manually or through automated fitness functions like ArchUnit or NetArchTest, potentially requiring code changes. A Notes section captures various metadata, including the original author and approval dates. ADRs are best stored in wikis or shared directories, structured by application, integration, or enterprise contexts, making them excellent tools for documenting software architecture and establishing standards by providing transparent justifications and analyzing implications.

📚 Continue Your Learning Journey — No Payment Required

Access the complete Fundamentals of Software Architecture summary with audio narration, key takeaways, and actionable insights from Mark Richards, Neal Ford.