In this section: Hands-On Examples

Chapter 8 UMA code example

Service graph evolution tutorial

This tutorial turns system growth into something inspectable. You will run graph scenarios, compare contract changes, and see how compatible services join the graph without upstream rewrites.

Tutorial route

Use the in-page route block to move through the graph progression without relying on footer links for the main sequence.

What you will learn

  • how service graphs emerge from contracts and event compatibility
  • how Git-style diffs expose architecture changes
  • how broken compatibility fails visibly and recovers predictably

Prerequisites

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

Full tutorial

  1. Enter the example
    cd chapter-08-service-graph
  2. List the graph labs
    ./scripts/list_labs.sh
  3. Validate the first scenario contracts
    ./scripts/validate_graph_contracts.sh lab1-upload-only
  4. Run the upload-only graph
    ./scripts/run_graph_demo.sh lab1-upload-only
  5. Inspect the contract change to image tagging
    ./scripts/contract_diff.sh lab1-upload-only lab2-image-tagger
  6. Run the indexer graph
    ./scripts/run_graph_demo.sh lab3-indexer
  7. Compare a compatibility break
    ./scripts/graph_diff.sh lab3-indexer lab4-broken-compat
  8. Run the full smoke path
    ./scripts/smoke_graph_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.

  • capability lines
  • consumes and emits lines
  • Edges
  • Waiting Consumers

Acceptance check

The chapter-level validation path is:

./scripts/smoke_graph_labs.sh

Return to the repository root for the final acceptance gate:

cd ..
./scripts/smoke_reader_paths.sh

Where to go next

Chapter 9 adds explicit trust and runtime enforcement.