0%

There are no easy decisions in software architecture. Instead, there are many hard parts: difficult problems or issues with no best practices that force you to choose among various compromises to succeed. With this book, you'll learn how to think critically about the trade-offs involved with distributed architectures.

Architecture veterans and practicing consultants Neal Ford, Mark Richards, Pramod Sadalage, and Zhamak Dehghani discuss strategies for choosing an appropriate architecture. By interweaving a story about a fictional group of technology professionals--the Sysops Squad--the authors examine everything from how to determine service granularity, manage workflows and orchestration, manage and decouple contracts, and manage distributed transactions to how to optimize operational characteristics, such as scalability, elasticity, and performance.

By focusing on commonly asked questions, this book provides techniques to help you discoverand weigh the trade-offs as you confront the issues you face as an architect. You will:

  • Analyze trade-offs and effectively document your decisions
  • Make better decisions regarding service granularity
  • Understand the complexities of breaking apart monolithic applications
  • Manage and decouple contracts between services
  • Handle data in a highly distributed architecture
  • Learn patterns to manage workflow and transactions when breaking apart applications

Table of Contents

  1. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. O’Reilly Online Learning
    4. How to Contact Us
    5. Acknowledgments
    6. Acknowledgments from Mark Richards
    7. Acknowledgments from Neal Ford
    8. Acknowledgments from Pramod Sadalage
    9. Acknowledgments from Zhamak
  2. 1. What Happens When There Are No “Best Practices”?
    1. Why “The Hard Parts”?
    2. Giving Timeless Advice About Software Architecture
    3. The Importance of Data in Architecture
    4. Architecture Decision Records
    5. Architecture Fitness Functions
    6. Using Fitness Functions
    7. Architecture versus Design: Keeping Definitions Simple
    8. Introducing the Sysops Squad Saga
    9. Non-Ticketing Workflow
    10. Ticketing Workflow
    11. A Bad Scenario
    12. Sysops Squad Architectural Components
    13. Sysops Squad Data Model
  3. I. Pulling Things Apart
  4. 2. Discerning Coupling in Software Architecture
    1. Architecture (Quantum | Quanta)
    2. Independently Deployable
    3. High Functional Cohesion
    4. High Static Coupling
    5. Dynamic Quantum Coupling
    6. Sysops Squad Saga: Understanding Quanta
  5. 3. Architectural Modularity
    1. Modularity Drivers
    2. Maintainability
    3. Testability
    4. Deployability
    5. Scalability
    6. Availability/Fault Tolerance
    7. Sysops Squad Saga: Creating a Business Case
  6. 4. Architectural Decomposition
    1. Is the Code Base Decomposable?
    2. Afferent and Efferent Coupling
    3. Abstractness, Instability, and Distance from the Main Sequence
    4. Distance from the Main Sequence
    5. Component-Based Decomposition
    6. Tactical Forking
    7. Trade-offs
    8. Sysops Squad Saga: Choosing A Decomposition Approach
  7. 5. Component-Based Decomposition Patterns
    1. Identify and Size Components Pattern
    2. Pattern Description
    3. Fitness Functions for Governance
    4. Sysops Squad Saga: Sizing Components
    5. Gather Common Domain Components Pattern
    6. Pattern Description
    7. Fitness Functions for Governance
    8. Sysops Squad Saga: Gathering Common Components
    9. Flatten Components Pattern
    10. Pattern Description
    11. Fitness Functions for Governance
    12. Sysops Squad Saga: Flattening Components
    13. Determine Component Dependencies Pattern
    14. Pattern Description
    15. Fitness Functions for Governance
    16. Sysops Squad Saga: Identifying Component Dependencies
    17. Create Component Domains Pattern
    18. Pattern Description
    19. Fitness Functions for Governance
    20. Sysops Squad Saga: Creating Component Domains
    21. Create Domain Services Pattern
    22. Pattern Description
    23. Fitness Functions for Governance
    24. Sysops Squad Saga: Creating Domain Services
    25. Summary
  8. 6. Pulling Apart Operational Data
    1. Data Decomposition Drivers
    2. Data Disintegrators
    3. Data Integrators
    4. Sysops Squad Saga: Justifying Database Decomposition
    5. Decomposing Monolithic Data
    6. Step 1: Analyze Database and Create Data Domains
    7. Step 2: Assign Tables To Data Domains
    8. Step 3: Separate Database Connections To Data Domains
    9. Step 4: Move Schemas To Separate Database Servers
    10. Step 5: Switch over to independent database servers
    11. Selecting a Database Type
    12. Relational Databases
    13. Key-Value Databases
    14. Document Databases
    15. Column Family Databases
    16. Graph databases
    17. NewSQL Databases
    18. Cloud Native Databases
    19. Time series Databases
    20. Sysops Squad Saga: Polyglot Databases
  9. 7. Service Granularity
    1. Granularity Disintegrators
    2. Service Scope and Function
    3. Code Volatility
    4. Scalability and Throughput
    5. Fault Tolerance
    6. Security
    7. Extensibility
    8. Granularity Integrators
    9. Database Transactions
    10. Workflow and Choreography
    11. Shared Code
    12. Data Relationships
    13. Finding The Right Balance
    14. Sysops Squad Saga: Ticket Assignment Granularity
    15. Sysops Squad Saga: Customer Registration Granularity
  10. II. Putting Things Back Together
  11. 8. Reuse Patterns
    1. Code Replication
    2. When To Use
    3. Shared Library
    4. Dependency Management and Change Control
    5. Versioning Strategies
    6. When To Use
    7. Shared Service
    8. Change Risk
    9. Performance
    10. Scalability
    11. Fault Tolerance
    12. When To Use
    13. Sidecars and Service Mesh
    14. When To Use
    15. Sysops Squad Saga: Common Infrastructure Logic
    16. Code Reuse: When Does It Add Value?
    17. Reuse via Platforms
    18. Sysops Squad Saga: Shared Domain Functionality
  12. 9. Data Ownership and Distributed Transactions
    1. Assigning Data Ownership
    2. Single Ownership Scenario
    3. Common Ownership Scenario
    4. Joint Ownership Scenario
    5. Table Split Technique
    6. Data Domain Technique
    7. Delegate Technique
    8. Service Consolidation Technique
    9. Data Ownership Summary
    10. Distributed Transactions
    11. Eventual Consistency Patterns
    12. Background Synchronization Pattern
    13. Orchestrated Request-Based Pattern
    14. Event-Based Pattern
    15. Sysops Squad Saga: Data Ownership For Ticket Processing
  13. 10. Distributed Data Access
    1. Inter-service Communication Pattern
    2. Column Schema Replication Pattern
    3. Replicated Caching Pattern
    4. Data Domain Pattern
    5. Sysops Squad Saga: Data Access For Ticket Assignment
  14. 11. Managing Distributed Workflows
    1. Orchestration Communication Style
    2. Choreography Communication Style
    3. Trade-Offs Between Orchestration and Choreography
    4. State Owner and Coupling
    5. Sysops Squad Saga: Managing Workflows
  15. 12. Transactional Sagas
    1. Transactional Saga Patterns
    2. Epic Saga(sao)
    3. Phone Tag Saga(sac) Pattern
    4. Fairy Tale Saga(seo) Pattern
    5. Time Travel Saga(sec) Pattern
    6. Fantasy Fiction Saga(aao) Pattern
    7. Horror Story(aac) Pattern
    8. Parallel Saga(aeo) Pattern
    9. Anthology Saga(aec) Pattern
    10. State Management and Eventual Consistency
    11. Saga State Machines
    12. Techniques For Managing Sagas
    13. What Next?
    14. Sysops Squad Saga: Atomic Transactions and Compensating Updates
  16. 13. Contracts
    1. Strict versus Loose Contracts
    2. Trade-offs Between Strict versus Loose Contracts
    3. Contracts in microservices
    4. Stamp Coupling
    5. Over-coupling via Stamp Coupling
    6. Bandwidth
    7. Stamp Coupling for Workflow Management
    8. Sysops Squad Saga: Managing Ticketing Contracts
  17. 14. Managing Analytical Data
    1. Previous Approaches
    2. The Data Warehouse
    3. The Data Lake
    4. The Data Mesh
    5. Definition of Data Mesh
    6. Data Product Quantum
    7. Data Mesh, Coupling, and Architecture Quantum
    8. When to Use Data Mesh
    9. Sysops Squad Saga: Data Mesh
  18. 15. Build Your Own Trade-Off Analysis
    1. Finding Entangled Dimensions
    2. Coupling
    3. Analyze Coupling Points
    4. Assess Trade-Offs
    5. Trade-Off Techniques
    6. Qualitative versus Quantative Analysis
    7. MECE Lists
    8. The “Out of Context” Trap
    9. Model Relevant Domain Cases
    10. Prefer Bottom Line over Overwhelming Evidence
    11. Avoiding Snake Oil and Evangelism
    12. Sysops Squad Saga: Epilog
  19. A. Appendix A
    1. Concept and Term References
    2. Architecture Decision Record References
    3. Trade-Off Table References
  20. Index
44.221.66.130