In this section: Hands-On Examples

Chapter 10 UMA code example

Architectural tradeoffs tutorial

This tutorial shows architecture as runtime behavior. You will compare scenarios where service granularity, event semantics, placement rules, and orchestration choices either preserve or degrade coherence.

Tutorial route

Keep the chapter sequence in view so the comparison path stays obvious while you read the tradeoff scenarios.

What you will learn

  • why more services are not automatically better architecture
  • how metadata works as a control plane
  • how clearer constraints recover coherence after ambiguity or over-orchestration

Prerequisites

  • Rust 1.76 or newer
  • Node.js 20 or newer
  • a checkout of the repository

Full tutorial

  1. Enter the example
    cd chapter-10-architectural-tradeoffs
  2. List the architecture labs
    ./scripts/list_labs.sh
  3. Validate the baseline
    ./scripts/validate_architecture.sh lab1-baseline
  4. Run the coherent baseline
    ./scripts/run_arch_demo.sh lab1-baseline
  5. Compare over-granular decomposition
    ./scripts/diff_architecture.sh lab1-baseline lab2-over-granular
  6. Run the runtime ambiguity lab
    ./scripts/run_arch_demo.sh lab4-runtime-ambiguity
  7. Run the recovered architecture lab
    ./scripts/run_arch_demo.sh lab6-recovered-architecture
  8. Run the full smoke path
    ./scripts/smoke_arch_labs.sh

What to inspect

After each command, look for these proof points. They are the signals that connect the code example back to the UMA architecture claim.

  • Verdict
  • architectural decision axes
  • over_granular
  • hidden_event_coupling
  • runtime_ambiguity
  • over_orchestrated

Acceptance check

The chapter-level validation path is:

./scripts/smoke_arch_labs.sh

Return to the repository root for the final acceptance gate:

cd ..
./scripts/smoke_reader_paths.sh

Where to go next

Chapter 11 focuses on evolution without fragmentation.