Page
1
System Design with AI Interview Guide Designing Scalable, Agentic, and Defensible Systems — Rohit Bhardwaj Forewords by Mark Richards and William Dressler
Page
2
System Design with AI Interview Guide Designing Scalable, Agentic, and Defensible Systems Rohit Bhardwaj Forewords by Mark Richards and William Dressler
Page
3
System Design with AI Interview Guide: Designing Scalable, Agentic, and Defensible Systems ISBN-13 (pbk): 979-8-8688-2781-5 ISBN-13 (electronic): 979-8-8688-2782-2 https://doi.org/10.1007/979-8-8688-2782-2 Copyright © 2026 by Rohit Bhardwaj This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Celestin Suresh John Editorial Assistant: Gryffin Winkler Cover designed by eStudioCalamar Cover image designed by Freepik (www.freepik.com) Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a Delaware LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail booktranslations@springernature.com; for reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub. For more detailed information, please visit https://www.apress.com/gp/services/ source-code. If disposing of this product, please recycle the paper Rohit Bhardwaj Acton, MA, USA
Page
4
iii Table of Contents About the Author xxv About the Technical Reviewer xxvii Acknowledgments xxix Preface xxxiii Foreword 1 xxxix Foreword 2 xli Introduction xliii Part I: System Design Methodology 1 Chapter 1: The 7-Step System Design Method 9 1.1 Introduction: Think Before You Draw ....................................................................................... 9 1.2 What Interviewers Are Actually Evaluating ............................................................................ 10 1.3 The 7 Steps at a Glance ........................................................................................................ 11 Step 1: Clarify Requirements and Constraints ....................................................................... 12 Step 2: Understand the Domain and Users ............................................................................ 13 Step 3: Empathize with the Customer Journey ..................................................................... 13 Step 4: Define Business Capabilities and Boundaries ........................................................... 13 Step 5: Design High-Level Architecture with ARCHVIEW ....................................................... 14 Step 6: Deep-Dive Critical Components ................................................................................. 14 Step 7: Validate, Scale, and Stress-Test ................................................................................. 14 1.4 Mini Example: DreamMart Checkout ..................................................................................... 15 1.5 Why Order Matters ................................................................................................................ 15 1.6 AI-Specific Blind Spots the Method Prevents ........................................................................ 16 1.7 How to Use the Method in Interviews vs. Production ........................................................... 17 1.8 The Most Common Mistake ................................................................................................... 18
Page
5
iv 1.9 A Simple Mental Model for Applying the Method .................................................................. 18 1.10 What Breaks If You Skip This Method .................................................................................. 19 1.11 Chapter Summary ............................................................................................................... 19 1.12 Architect’s Reflection .......................................................................................................... 20 1.13 Transition to Chapter 2: Understanding the Business Domain ............................................ 21 1.14 Interview Practice and Assignments ................................................................................... 21 1. The 7-Step Warm-Up Question .......................................................................................... 21 2. Requirements and Constraints Question ........................................................................... 22 3. Customer Journey and Trust Question ............................................................................... 22 4. AI Authority and Boundaries Question ............................................................................... 22 5. Senior Architect Stress-Test Question ............................................................................... 23 1.15 GitHub Companion Artifacts ................................................................................................ 23 Chapter 2: Understanding the Business Domain 25 2.1 Introduction ........................................................................................................................... 25 2.2 Domain Understanding Is an Architectural Skill .................................................................... 26 2.3 What Architects Mean by “Domain” ...................................................................................... 27 2.4 Domain Questions That Change Architecture ........................................................................ 29 2.5 How Domain Ignorance Breaks Systems .............................................................................. 30 2.6 Domain Shapes Architecture Before You Draw Anything ...................................................... 31 Mini Example: DreamMart Domain Questions ....................................................................... 31 2.7 Business Models Are Architectural Forks, Not Variations ...................................................... 32 2.8 Domain Thinking in Interviews .............................................................................................. 33 2.9 What Breaks If You Skip Domain Understanding ................................................................... 35 2.10 Chapter Summary ............................................................................................................... 36 2.11 Architect’s Reflection .......................................................................................................... 36 2.12 Transition to Chapter 3: Understanding the User Journey ................................................... 37 2.13 Interview Practice and Assignments ................................................................................... 37 1. Domain Understanding Warm-Up Question ....................................................................... 37 2. Actor and Journey Question .............................................................................................. 38 3. Business Capability Mapping Question ............................................................................. 38 Table of ConTenTs
Page
6
v 4. AI Opportunity and Boundary Question .............................................................................. 39 5. Senior Architect Domain-to-Architecture Question ........................................................... 40 2.14 GitHub Companion Artifacts ................................................................................................ 40 Chapter 3: Customer Journeys 41 3.1 Introduction ........................................................................................................................... 41 3.2 Systems Do Not Fail Everywhere. They Fail Somewhere. ..................................................... 42 3.3 The Myth of the Average User ............................................................................................... 45 3.4 Journeys Are Behavioral Sequences, Not Screens ............................................................... 46 3.5 Where Latency, Failure, and Consistency Actually Matter ..................................................... 48 3.6 AI Changes the Journey in Dangerous Ways ......................................................................... 52 3.7 Designing for Escalation, Recovery, and Trust ...................................................................... 54 3.8 Operationalizing Empathy ..................................................................................................... 56 3.9 Journey Thinking in Interviews ............................................................................................. 58 3.10 What Breaks If You Skip Customer Journey Thinking ......................................................... 60 3.11 Chapter Summary ............................................................................................................... 61 3.12 Architect’s Reflection .......................................................................................................... 62 3.13 Transition to Chapter 4: Business Capabilities .................................................................... 62 3.14 Interview Practice and Assignments ................................................................................... 63 1. Customer Journey Warm-Up Question .............................................................................. 63 2. Trust Moment Question ...................................................................................................... 63 3. Friction and Failure Question............................................................................................. 64 4. AI Customer Assistant Question ......................................................................................... 64 5. Senior Architect Experience-to-Architecture Question ...................................................... 65 3.15 GitHub Companion Artifacts ................................................................................................ 65 Chapter 4: Business Capabilities 67 4.1 Introduction ........................................................................................................................... 67 4.2 Capabilities Are Responsibilities, Not Functions ................................................................... 68 4.3 Translating Journey Moments into Capabilities .................................................................... 71 Mini Example: DreamMart Checkout and Refund Capability ................................................. 73 Table of ConTenTs
Page
7
vi 4.4 Capability Boundaries: Define What the System Guarantees ................................................ 74 Where Boundaries Collapse ................................................................................................... 76 4.5 AI Changes Capability Boundaries and Risk Ownership ....................................................... 76 Where AI Must Not Decide Alone ........................................................................................... 78 Drift Is a Boundary Problem .................................................................................................. 79 4.6 The Final Test of a Capability ................................................................................................ 79 4.7 Capability Thinking in Interviews .......................................................................................... 81 How Senior Answers Sound .................................................................................................. 81 4.8 What Breaks If You Skip Capability Thinking ......................................................................... 83 4.9 Chapter Summary ................................................................................................................. 84 4.10 Architect’s Reflection: Where Responsibility Actually Lives ................................................ 84 4.11 Transition to Chapter 5 ........................................................................................................ 85 4.12 Interview Practice and Assignments ................................................................................... 85 1. Capability Mapping Warm-Up Question ............................................................................. 85 2. Capability Boundary Question ........................................................................................... 86 3. AI Capability Placement Question ...................................................................................... 86 4. Ownership and Accountability Question ............................................................................ 87 5. Senior Architect Capability-to-Architecture Question ........................................................ 87 4.13 Companion Repository ........................................................................................................ 88 Chapter 5: Structuring Architecture with ARCHVIEW 89 5.1 Introduction ........................................................................................................................... 89 5.2 From C4 to C4+ to ARCHVIEW ............................................................................................... 90 5.3 The Five ARCHVIEW Perspectives ......................................................................................... 93 5.4 How to Use Each ARCHVIEW Perspective .............................................................................. 95 Context Perspective ............................................................................................................... 95 Capability Perspective ........................................................................................................... 95 Interaction Perspective .......................................................................................................... 95 Decision Perspective ............................................................................................................. 96 Recovery Perspective ............................................................................................................ 96 5.5 Worked Example: Checkout Recovery Assistant ................................................................... 97 Intent View: Name the Unacceptable Failure ......................................................................... 99 Table of ConTenTs
Page
8
vii Capability View: Separate Where AI Helps from Where AI Can Break the System ............... 101 C4+ View: Show Reasoning, Retrieval, Guardrails, and Oversight ....................................... 102 Interaction and Decision Views: Control the Risk Path ........................................................ 104 Safety and Escalation View: Define When the Agent Must Stop .......................................... 106 Ownership View: AI Is a Team Sport .................................................................................... 107 5.6 ARCHVIEW in Interviews: How to Use It Without Drawing Everything ................................. 110 Sample Interview Answer: DreamMart Checkout ................................................................ 110 5.7 Where ARCHVIEW Returns in Part III ................................................................................... 112 5.8 What Breaks If You Skip ARCHVIEW .................................................................................... 112 5.9 Chapter Summary ............................................................................................................... 114 5.10 Architect’s Reflection ........................................................................................................ 114 5.11 Transition to Chapter 6—AI Architecture Primitives ......................................................... 115 5.12 Interview Practice and Assignments ................................................................................. 115 1. High-Level Architecture Warm-Up Question .................................................................... 115 2. Architecture View Question ............................................................................................. 116 3. Synchronous vs. Asynchronous Design Question ............................................................ 117 4. AI Architecture Integration Question ................................................................................ 117 5. Senior Architect Trade-Off and Defense Question ........................................................... 118 5.13 Companion Repository ...................................................................................................... 118 Part II: System Design Fundamentals 119 Chapter 6: AI Architecture Primitives 129 6.1 Introduction ......................................................................................................................... 129 6.2 Authority: Who Is Allowed to Act, Not Just Call .................................................................... 132 6.3 Commitment: The Moment You Stop Suggesting and Start Owning ................................... 134 6.4 Time: Which Clock Wins, and Where That Rule Is Written ................................................... 135 6.5 Degradation: The Refusal Lines That Keep You Honest ....................................................... 136 6.6 Evidence and Replay: If Legal Asks Why, What Must Exist? ................................................ 138 6.7 Ownership: Who Can Stop the System, and What Triggers That Stop ................................. 139 6.8 A Design-Review Walkthrough: One Capability, All Six Primitives ....................................... 140 6.9 Operational Kit: The Three Artifacts ..................................................................................... 144 Table of ConTenTs
Page
9
viii Decision Replay Card: Minimum Spine ................................................................................ 145 Authority Envelope: Minimum Spine .................................................................................... 146 Stop Authority SOP: Minimum Spine ................................................................................... 147 6.10 Worked Example: DreamMart Order Modification ............................................................. 147 6.11 How to Use the Primitives in an Interview ........................................................................ 148 6.12 Chapter Summary ............................................................................................................. 149 6.13 Architect’s Reflection ........................................................................................................ 149 6.14 Transition to Chapter 7 ...................................................................................................... 150 6.15 Interview Practice and Assignments ................................................................................. 150 1. Six-Primitives Warm-Up Question ................................................................................... 150 2. Authority Boundary Question ........................................................................................... 151 3. Commitment Question ..................................................................................................... 151 4. Time Policy Question ....................................................................................................... 152 5. Degradation and Refusal-Line Question .......................................................................... 152 6. Evidence and Replay Question ........................................................................................ 153 7. Ownership and Stop Authority Question .......................................................................... 154 8. Senior Architect Design-Review Question ....................................................................... 154 6.16 GitHub Companion Artifacts .............................................................................................. 155 Chapter 7: Trust, Safety, and the LLM-SHIELD Lens 157 7.1 Introduction ......................................................................................................................... 157 7.2 Why AI Security Feels Different ........................................................................................... 159 7.3 The LLM-SHIELD Lens: A Security Journey, Not a Checklist................................................ 160 7.4 Scope: Define Capability Guarantees, Non- Negotiables, and Attack Surface ..................... 161 7.5 Harden: Treat Prompts, Policies, and Guardrails as Production Assets ............................... 164 7.6 Isolate: Zero Trust for Retrieval, Memory, Tools, and Data Paths ......................................... 166 7.7 Empower: Grant Autonomy Deliberately ............................................................................. 169 7.8 Live-Defend: Runtime Defense, AI Firewalls, Observability, and Replay ............................. 171 7.9 Demonstrate and Evolve: Prove the Controls Still Work ...................................................... 173 7.10 Applying LLM-SHIELD to Real Systems ............................................................................. 176 DreamMart: Order Creation and Modification by an Agent .................................................. 176 Table of ConTenTs
Page
10
ix DreamEntertainment: Ensemble Retrieval and the Multiple Truths Trap ............................. 176 Sales Development Representative Agent: Global Automation vs. Regional Reality ........... 177 7.11 Practical Design Review Checklist .................................................................................... 177 7.12 Architect’s Reflection ........................................................................................................ 178 7.13 Further Reading and References ...................................................................................... 179 7.14 Interview Practice and Assignments ................................................................................. 180 1. LLM-SHIELD Warm-Up Question ...................................................................................... 180 2. Scope and Unacceptable Failures Question .................................................................... 180 3. Prompt and Policy Hardening Question ........................................................................... 181 4. Retrieval and Tool Isolation Question ............................................................................... 182 5. Autonomy and Empowerment Question .......................................................................... 182 6. Runtime Defense Question .............................................................................................. 183 7. Demonstrate and Prove Controls Question ...................................................................... 184 8. Senior Architect LLM-SHIELD Design Review Question ................................................... 184 7.15 GitHub Companion Artifacts .............................................................................................. 185 Chapter 8: ROCS: The Control System of Modern Architecture 187 8.1 Introduction ......................................................................................................................... 187 8.2 The Core Claim: ROCS Is a Coupled Control System ........................................................... 190 8.3 AI Inference Is a DAG, Not a Single Model Call .................................................................... 191 8.4 The ROCS Loop: Sense, Interpret, Decide, Act, Prove .......................................................... 193 8.5 Reliability Is Not Uptime ...................................................................................................... 195 8.6 Observability Is Not Dashboards ......................................................................................... 196 8.7 Cost Is Behavior at Scale .................................................................................................... 199 8.8 Sustainability Means Governable Change and Responsible Computing ............................. 201 8.9 The ROCS Failure Anti-Pattern: Instrumented Indecision .................................................... 204 8.10 Three Scars That Prove ROCS Is Real................................................................................ 205 DreamMart: When Inventory Lag Becomes Architecture ..................................................... 206 DreamManufacturing: Digital Twin + Sensor Drift ............................................................... 206 DreamFinance: Approvals Under Delayed Evidence ............................................................ 206 8.11 ROCS Control Patterns for AI Inference ............................................................................. 207 Table of ConTenTs
Page
11
x 8.12 The ROCS Design Review Canonical Table ........................................................................ 208 8.13 How This Chapter Connects to What Follows .................................................................... 210 8.14 Architect’s Reflection ........................................................................................................ 211 8.15 Further Reading and References ...................................................................................... 211 8.16 Interview Practice and Assignments ................................................................................. 212 1. ROCS Warm-Up Question ................................................................................................. 212 2. AI Inference DAG Question ............................................................................................... 212 3. ROCS Loop Question ........................................................................................................ 213 4. Reliability Is Not Uptime Question ................................................................................... 213 5. Observability and Decision Replay Question ................................................................... 214 8.17 GitHub Companion Artifacts .............................................................................................. 215 Chapter 9: Scale Is the Truth Serum 217 9.1 Introduction ......................................................................................................................... 217 9.2 Scale Does Not Break Systems; It Reveals Them ............................................................... 218 9.3 Average Load Is a Lie .......................................................................................................... 219 9.4 Capacity Estimation Is a Trust Exercise .............................................................................. 220 9.5 The Hidden Queues Before the Outage ............................................................................... 222 9.6 Bottleneck Analysis: Find the Narrowest Promise .............................................................. 224 9.7 Scaling Patterns and Their Trade-offs ................................................................................. 226 9.8 Sharding and Partitioning: Scaling Truth by Splitting It ....................................................... 228 9.9 Caching: Speed, Staleness, and Trust ................................................................................. 229 9.10 AI Changes Scale .............................................................................................................. 231 9.11 Designing for Scale: A Practical Walkthrough ................................................................... 233 9.12 Interview Playbook: How to Talk About Scale Under Pressure .......................................... 235 9.13 What Breaks If You Skip Scale Thinking ............................................................................ 236 9.14 Chapter Summary ............................................................................................................. 237 9.15 Architect’s Reflection ........................................................................................................ 237 9.16 Transition to Chapter 10 .................................................................................................... 238 9.17 Interview Practice and Assignments ................................................................................. 238 1. Scale as Truth Serum Question ....................................................................................... 238 Table of ConTenTs
Page
12
xi 2. Average Load Is a Lie Question ........................................................................................ 239 3. Capacity Estimation As a Trust Exercise Question ........................................................... 239 4. Hidden Queues Before the Outage Question ................................................................... 240 5. Bottleneck Analysis Question .......................................................................................... 241 9.18 GitHub Companion Artifacts .............................................................................................. 241 Chapter 10: Consistency Is a Trust Contract 243 10.1 Introduction ....................................................................................................................... 243 10.2 Consistency Is Not a Data Property—It Is a Capability Promise ....................................... 245 10.3 The Moment That Matters: Actionability ............................................................................ 246 10.4 Consistency vs. Availability: The Lie We Tell Ourselves ..................................................... 248 10.5 Classic Consistency Models Through a Trust Lens ............................................................ 248 10.6 DreamFinance Scar: Balance Is Not Eventually Consistent .............................................. 250 10.7 DreamHealthcare Scar: Preliminary Is Not Harmless........................................................ 252 10.8 DreamTravel Scar: Confirmed Means Something ............................................................. 254 10.9 The Most Common Failure Pattern: Unlabeled Consistency .............................................. 256 10.10 The Table You Should Use in Design Reviews ................................................................. 256 10.11 Designing for Consistency Without Slowing Everything Down ....................................... 258 10.12 Consistency in AI-Enabled Systems: The New Failure Shape ......................................... 260 10.13 How Senior Architects Talk About Consistency in Interviews.......................................... 262 10.14 Consistency Lives Inside the ROCS Loop ........................................................................ 264 10.15 Chapter Summary ........................................................................................................... 266 10.16 Architect’s Reflection ...................................................................................................... 266 10.17 Transition to Chapter 11 .................................................................................................. 267 10.18 Interview Practice and Assignments ............................................................................... 267 1. Consistency As a Trust Contract Question ....................................................................... 267 2. Actionability Cliff Question ............................................................................................... 268 3. Consistency vs. Availability Question ............................................................................... 268 4. Classic Consistency Models Through a Trust Lens Question ........................................... 269 5. AI Consistency and Admissible Evidence Question .......................................................... 270 10.19 GitHub Companion Artifacts ............................................................................................ 270 Table of ConTenTs
Page
13
xii Chapter 11: Latency Is How Broken Architecture Becomes Visible 271 11.1 Introduction ....................................................................................................................... 271 11.2 The Business Definition of Scale Is Not QPS ..................................................................... 272 11.3 Latency Is a Journey, Not an Endpoint Metric ................................................................... 273 11.4 Tail Latency Changes User Behavior, and Behavior Becomes Load .................................. 277 11.5 Moments of Commitment: Where Latency Becomes Trust ................................................ 279 11.6 The First Thing That Breaks at Scale Is Usually a Boundary ............................................. 279 11.7 Two Lies Teams Tell About Latency ................................................................................... 280 11.8 Latency Requires Evidence, Not Just Monitoring .............................................................. 283 Latency Budget Template .................................................................................................... 285 11.9 AI Latency: The Hidden DAG Behind One Answer .............................................................. 286 11.10 How Senior Architects Talk About Latency in Interviews ................................................ 288 11.11 Chapter Summary ........................................................................................................... 289 11.12 Architect’s Reflection ...................................................................................................... 291 11.13 Transition to Chapter 12 .................................................................................................. 291 11.14 Interview Practice and Assignments ............................................................................... 292 1. Latency As Trust Pressure Question ................................................................................ 292 2. Journey-Weighted Latency Question ............................................................................... 292 3. Tail Latency Behavior Loop Question ............................................................................... 293 4. Moment of Commitment Question ................................................................................... 293 5. Latency Myths Question .................................................................................................. 294 11.15 GitHub Companion Artifacts ............................................................................................ 294 Chapter 12: Failure Is a System Behavior, Not an Event 295 12.1 Introduction ....................................................................................................................... 295 12.2 Failure Is a Path, Not a Point ............................................................................................. 297 12.3 Blast Radius Is an Architectural Decision ......................................................................... 298 12.4 Latency, Consistency, and Failure Reinforce Each Other ................................................... 299 12.5 AI Turns Failures Into Confident Wrongness ...................................................................... 300 12.6 Designing for Degradation, Not Collapse .......................................................................... 302 12.7 Escalation Is an Architectural Contract ............................................................................. 305 Table of ConTenTs
Page
14
xiii 12.8 Failure in Interviews: How Senior Architects Talk About It ................................................ 306 12.9 Failure As Behavior: Design Review Table......................................................................... 307 12.10 What Breaks If You Design Only for Success .................................................................. 310 12.11 Chapter Summary and Transition to Chapter 13 ............................................................. 312 12.12 Architect’s Reflection ...................................................................................................... 313 Transition to Chapter 13 ...................................................................................................... 313 12.13 Interview Practice and Assignments ............................................................................... 314 1. Failure As a Path Question ............................................................................................... 314 2. Blast Radius Question...................................................................................................... 315 3. Latency-Consistency Failure Loop Question .................................................................... 315 4. AI Confident Wrongness Question.................................................................................... 316 5. Degradation Ladder Question .......................................................................................... 316 12.14 GitHub Companion Artifacts ............................................................................................ 317 Chapter 13: Economics Is Architecture 319 13.1 Introduction ....................................................................................................................... 319 13.2 The Core Claim: Economics Is What Your System Does Repeatedly ................................. 320 13.3 FinOps Is Not Finance: It Is Architectural Control .............................................................. 322 13.4 The Seven Questions That Make the Scars Visible............................................................ 323 13.5 ROCS for Economics: The Cost-Awareness Cycle ............................................................. 325 13.6 Where Cost Multiplies: The Inference DAG Problem .......................................................... 328 13.7 Sustainability Is Not Branding: It Is Scaling Without Regret .............................................. 330 13.8 ROCS for Sustainability: The Sustainability Cycle ............................................................. 334 13.9 Three Dream Scars Where Economics Becomes a Trust Problem .................................... 336 DreamInsurance Scar: The Helpful Agent Runaway ............................................................ 336 DreamLogistics Scar: Routing Waste Becomes Real- World Waste ...................................... 336 DreamMedia Scar: Fan-Out Intelligence and Marginal Value Collapse ................................ 337 13.10 The Canonical Table This Chapter Should Own ............................................................... 338 13.11 How Senior Architects Talk About Economics in Interviews ........................................... 341 13.12 Chapter Summary and Transition to Part III .................................................................... 342 13.13 Architect’s Reflection ...................................................................................................... 343 Table of ConTenTs
Page
15
xiv 13.14 References and Further Reading .................................................................................... 343 13.15 Interview Practice and Assignments ............................................................................... 344 1. Economics As System Behavior Question ....................................................................... 344 2. Unit of Value and Unit Cost Question ............................................................................... 344 3. FinOps As Architectural Control Question ........................................................................ 345 4. AI Cost Multiplier Question .............................................................................................. 345 5. Cost Budget Contract Question ........................................................................................ 346 13.16 GitHub Companion Artifacts ............................................................................................ 347 Part III: Applied Systems 357 Chapter 14: Ride-Sharing Systems 357 14.1 Introduction ....................................................................................................................... 357 How This Chapter Applies Parts I and II ............................................................................... 357 14.2 Chapter 14 at a Glance ...................................................................................................... 360 Your Three Non-Negotiable Guarantees .............................................................................. 360 14.3 The System You Are Actually Building ............................................................................... 362 14.4 Commitment Is the Center of the Architecture .................................................................. 363 14.5 Worked Example: One Request in Motion ......................................................................... 365 14.6 Freshness Budgets: What Counts As Admissible Reality .................................................. 366 Latency Becomes Fairness Drift .......................................................................................... 368 Pricing Is a Commitment ..................................................................................................... 369 14.7 Inference Becomes a DAG, and Loops Hide There ............................................................ 371 Scar Box: The Night We Created a Rematch Storm ............................................................. 374 14.8 Conflict Handling: Phase-Aware Outcomes ....................................................................... 375 14.9 Safety and Fraud: When Optimization Stops ..................................................................... 377 14.10 Worked Example: Conflict After Commit ......................................................................... 378 14.11 Interview Lens: What Seniors Sound Like ....................................................................... 380 Chapter Summary................................................................................................................ 380 Architect’s Reflection .......................................................................................................... 381 14.12 Interview Practice and Assignments ............................................................................... 382 1. Ride-Sharing As a Commitment Engine Question ........................................................... 382 Table of ConTenTs
Page
16
xv 2. Hold Token vs. Commit Token Question ........................................................................... 382 3. Freshness Budget Question ............................................................................................. 383 4. Bounded Churn and Rematch Storm Question ................................................................ 384 5. Pricing As a Defensible Commitment Question ............................................................... 384 Companion Artifacts for GitHub ........................................................................................... 385 Chapter 15: Social Networking Systems 387 15.1 Introduction ....................................................................................................................... 387 15.2 How This Chapter Applies Parts I and II ............................................................................ 388 15.3 The System You Are Actually Building ............................................................................... 391 15.4 Push vs. Pull Is Not a Performance Choice—It Is a Power Choice ................................... 392 15.5 Your Three Non-Negotiable Guarantees ............................................................................ 394 15.6 Commitment Tokens: When Showing Becomes Amplifying .............................................. 396 15.7 Mode Is a Boundary: Profiling vs. Non-Profiling ............................................................... 398 15.8 Admissible Evidence: What the System May Believe at Amplification Time ..................... 399 15.9 Inference Becomes a DAG—and Loops Hide Inside It ...................................................... 401 15.10 The Five Surfaces: Authority Boundaries You Must Enforce ............................................ 402 15.11 Stop Authority: Keeping Influence Stable Under Pressure .............................................. 405 15.12 ROCS Loops: Keeping Influence Stable, Provable, and Operable .................................... 407 15.13 Scar Box: The Night Trending Stayed Green While Trust Went Red ................................. 409 15.14 Worked Example: One Post in Motion ............................................................................. 411 15.15 Interview Lens: What Seniors Sound Like ....................................................................... 413 15.16 Chapter Summary ........................................................................................................... 413 15.17 Architect’s Reflection ...................................................................................................... 414 15.18 Interview Practice and Assignments ............................................................................... 415 1. Social Feed As an Influence Engine Question .................................................................. 415 2. Push vs. Pull As a Power Boundary Question .................................................................. 416 3. Visibility Grant vs. Amplification Token Question ............................................................. 416 4. Recommendation Mode Boundary Question ................................................................... 416 5. Admissible Evidence for Amplification Question ............................................................. 417 15.19 Companion Artifacts for GitHub ....................................................................................... 417 Table of ConTenTs
Page
17
xvi Chapter 16: E-Commerce Systems 419 16.1 Introduction ....................................................................................................................... 419 16.2 How This Chapter Applies Parts I and II ............................................................................ 420 16.3 The System You Are Actually Building ............................................................................... 423 16.4 Architecture Is Admissible Behavior.................................................................................. 424 16.5 Your Three Non-Negotiable Guarantees ............................................................................ 425 16.6 Commitment Is the Center of the Architecture .................................................................. 428 16.7 Freshness Budgets: What Counts As Admissible Reality .................................................. 429 16.8 Journeys: Where Latency, Failure, and Consistency Actually Matter ................................. 432 16.9 Degradation: Refusal Lines That Keep You Honest ............................................................ 434 16.10 Evidence and Replay: If Legal Asks Why, What Must Exist? ............................................ 436 16.11 Stop Authority: Who Can Stop the System and What Triggers That Stop ......................... 437 16.12 ROCS Loops: Keeping DreamMart Stable, Provable, and Operable ................................. 438 16.13 Movie Scene A: Order Creation ....................................................................................... 441 16.14 Movie Scene B: Order Modification ................................................................................. 443 16.15 Interview Lens: What Seniors Sound Like ....................................................................... 444 16.16 Chapter Summary ........................................................................................................... 445 16.17 Architect’s Reflection ...................................................................................................... 445 16.18 Interview Practice and Assignments ............................................................................... 446 1. E-Commerce As a Commitment Engine Question ............................................................ 446 2. Hold Token vs. Commit Token Question ........................................................................... 447 3. Freshness Budgets As Admissible Reality Question ........................................................ 447 4. Checkout Latency and Duplicate Commitment Question ................................................. 448 5. Order Modification After Fulfillment Cutoff Question ....................................................... 448 16.19 Companion Artifacts for GitHub ....................................................................................... 449 Chapter 17: Messaging Systems 451 17.1 Introduction ....................................................................................................................... 451 17.2 How This Chapter Applies Parts I and II ............................................................................ 452 17.3 Chapter 17 at a Glance ...................................................................................................... 455 17.4 The System You’re Actually Building ................................................................................. 456 Table of ConTenTs
Page
18
xvii 17.5 Why Messaging Feels Different + Your Three Non-Negotiable Guarantees ...................... 457 17.6 Commitment Tokens: What Counts as “This Happened.” .................................................. 459 17.7 Streams vs. Queues: What Your Infrastructure Is Really Promising .................................. 461 17.8 Idempotency: Where You Store the Truth That Something Already Happened .................. 463 17.9 Ordering Scope: Pay for Order Only Where the Business Needs It .................................... 466 17.10 Retry Budgets + DLQ: The Difference Between Resilience and Recursion ..................... 467 17.11 Decision Replay Card: What Must Exist to Satisfy “Prove It Later.” ................................. 470 17.12 Worked Example: One Event in Motion............................................................................ 473 17.13 Scar Box: The Night Consumer Lag Looked Like Performance—Until Money Doubled ............................................................................................................................... 476 17.14 Operate It: Stop Authority + ROCS Loops for Messaging ................................................ 477 17.15 Interview Lens: What Seniors Sound Like ....................................................................... 480 17.16 Chapter Summary ........................................................................................................... 481 17.17 Architect’s Reflection ...................................................................................................... 482 17.18 Interview Practice and Assignments ............................................................................... 483 1. Messaging As a Commitment Engine Question ............................................................... 483 2. eventId vs. businessTxnId vs. effectId Question .............................................................. 483 3. Idempotency Store Design Question ............................................................................... 484 4. Streams vs. Queues Question .......................................................................................... 484 5. Retry Budget and DLQ Replay Question .......................................................................... 485 17.19 Companion Artifacts for GitHub ....................................................................................... 485 Chapter 18: Auction Systems 487 18.1 Introduction ....................................................................................................................... 487 18.2 How This Chapter Applies Parts I and II ............................................................................ 488 From Earlier Book Lenses to Auction Systems .................................................................... 488 Chapter 18 at a Glance ........................................................................................................ 490 18.3 Your Three Non-Negotiable Guarantees ............................................................................ 492 18.4 Commitment Tokens: Make the Boundary Unmissable ..................................................... 493 18.5 Ending Rules: Hard Close vs. Soft Close ........................................................................... 494 18.6 Bidding Mechanics: Proxy Bidding, Increments, Reserve ................................................. 496 18.7 Freshness Budgets and Admissible Reality ...................................................................... 497 Table of ConTenTs
Page
19
xviii 18.8 Manipulation and Fraud: Shill, Collusion, Bid Shielding .................................................... 499 18.9 Settlement and Fulfillment: Side Effects Equal Liability ................................................... 500 18.10 Operate It: ROCS, Stop Authority, and Re-enable ............................................................ 502 18.11 Scar Box: The Night Close Created Two Realities ............................................................ 505 18.12 Interview Lens: What Seniors Sound Like ....................................................................... 506 18.13 Chapter Summary ........................................................................................................... 507 18.14 Architect’s Reflection ...................................................................................................... 508 18.15 Interview Practice and Assignments ............................................................................... 508 1. Auction As a Commitment Engine Question .................................................................... 509 2. Commitment Token Chain Question ................................................................................. 509 3. Hard Close vs. Soft Close Question ................................................................................. 510 4. Admissible Time and Late Bid Question .......................................................................... 510 5. Proxy Bidding, Increments, and Reserve Price Question ................................................. 511 18.16 Companion Artifacts for GitHub ....................................................................................... 511 Chapter 19: Fraud Detection Systems 513 19.1 Introduction ....................................................................................................................... 513 19.2 How This Chapter Applies Parts I and II ............................................................................ 513 19.3 Earlier Book Lens Mapping ............................................................................................... 514 19.4 Chapter 19 at a Glance ...................................................................................................... 516 19.5 Chapter Promise ............................................................................................................... 516 19.6 Fraud Commitment Engine (ARCHVIEW Snapshot) ........................................................... 517 19.7 Your Three Non-Negotiable Guarantees ............................................................................ 519 19.8 Tokens and Boundaries: Stop Advising, Start Enforcing .................................................... 520 19.9 Fraud Clocks: Admissible Reality and Label Delay ............................................................ 523 19.10 Control Ladder: Reversibility As Architecture .................................................................. 526 19.11 Adversary Loop and Drift: The System Is Being Gamed While You Tune It ...................... 528 19.12 Evidence Tiers: What the System Is Allowed to Believe at Enforcement Time ................ 531 19.13 Operate It: Stop Authority + ROCS Loops ........................................................................ 532 19.14 Worked Example: One Case in Motion ............................................................................. 536 19.15 Scar Box: The Night the System Stayed Green While Trust Went Red ............................. 538 Table of ConTenTs
Page
20
xix 19.16 Interview Lens: What Seniors Sound Like ....................................................................... 540 19.17 Chapter Summary ........................................................................................................... 541 19.18 Architect’s Reflection ...................................................................................................... 542 19.19 Interview Practice and Assignments ............................................................................... 542 1. Fraud As an Authority Allocation System Question .......................................................... 543 2. Advisory Risk vs. Enforcement Token Question ............................................................... 543 3. Fraud Clocks and Label Delay Question .......................................................................... 544 4. Reversible Control Ladder Question ................................................................................ 544 5. Evidence Tiers and Enforcement Admissibility Question ................................................. 545 19.20 Companion Artifacts for GitHub ....................................................................................... 545 Chapter 20: Video Streaming Systems 547 20.1 Introduction ....................................................................................................................... 547 20.2 How This Chapter Applies Parts I and II ............................................................................ 548 20.3 Earlier Book Lens Mapping ............................................................................................... 550 20.4 Chapter 20 at a Glance ...................................................................................................... 551 20.5 Chapter Promise ............................................................................................................... 554 20.6 Your Three Non-Negotiable Guarantees ............................................................................ 555 20.7 Tokens and Boundaries: Name the Moment You Stop Serving Bytes and Start Owning Experience ................................................................................................................................ 557 20.8 Ingest ➤ Encode ➤ Package: Make Time Addressable and Refuse Lies Early ................ 558 20.9 Distribution: Multi-CDN Is Not Redundancy; It Is Control .................................................. 560 20.10 Playback Is a Closed-Loop Control System, Not an App Screen ..................................... 562 20.11 Live + Low Latency: The Clock War You Must Declare .................................................... 564 20.12 DRM, Entitlement, and Policy Pinning: Playable Must Be Provable ................................. 566 20.13 Ads Are Side Effects: SSAI/CSAI Decisions Must Be Replayable ..................................... 569 20.14 Decision Replay Card: What Must Exist to Satisfy Prove It Later .................................... 571 20.15 Operate It: Stop Authority + ROCS Loops for Streaming ................................................. 573 20.16 Movie Scene: One Session in Motion .............................................................................. 576 20.17 Scar Box: The Night HD Was Green While Experience Was Red ...................................... 577 20.18 Interview Lens: What Seniors Sound Like ....................................................................... 578 20.19 Chapter Summary ........................................................................................................... 579 Table of ConTenTs