> ## Documentation Index
> Fetch the complete documentation index at: https://iso-topology.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Current vs target architecture diagrams

> Compare an illustrative current architecture with a proposed target using editable YAML, stable component IDs, a change-record template, and explicit migration questions.

Use separate diagrams for the architecture you have evidence for and the architecture you propose. Put the state in the image as well as the surrounding text, keep shared component IDs stable, and record the evidence that would let you call the target implemented. A target diagram alone is not a migration plan. [中文](https://iso-topology.mintlify.site/zh/guides/current-and-target-architecture.md).

This example moves job execution from an API process into a proposed queue-and-worker path. **Both drawings are teaching models, not observations of a running system or a completed migration.** The baseline represents the example's assumed starting state. No performance improvement has been measured.

## Baseline: the API performs the job

![Illustrative baseline: Client sends work to API plus job execution, which writes Results](https://mintcdn.com/iso-topology/ADBB0yjY_CXg0nOu/assets/architecture-current.svg?fit=max\&auto=format\&n=ADBB0yjY_CXg0nOu\&q=85\&s=956de519b32f92effcafcdf4d48c6462)

[Editable YAML](../assets/architecture-current.yaml) · [Full SVG](../assets/architecture-current.svg) · [PNG](../assets/architecture-current.png)

The API accepts the job request, performs its work, and writes a result. Arrows show the **forward job-work path**. Response messages, result reads, authentication and infrastructure details are outside this view. For a real baseline, cite the code or observed deployment that supports these relationships; do not call a drawing current merely because it is the oldest file.

## Target: a proposed queue and worker

![Proposed target, not deployed: Client sends work to API, then Queue, Worker and Results](https://mintcdn.com/iso-topology/ADBB0yjY_CXg0nOu/assets/architecture-target.svg?fit=max\&auto=format\&n=ADBB0yjY_CXg0nOu\&q=85\&s=c06a330bf2264c79014c73aa1fb4a6a0)

[Editable YAML](../assets/architecture-target.yaml) · [Full SVG](../assets/architecture-target.svg) · [PNG](../assets/architecture-target.png)

The proposal changes the forward path to Client → API → Queue → Worker → Results. The API hands work off; the worker performs it and writes the result. The queue-to-worker edge shows the direction of work delivery, not a claim about whether a particular broker uses push or polling.

This proposal changes the interaction contract: accepting a job and finishing it become separate events. How clients obtain status or results is an open design question in this small view. Adding a queue does not by itself demonstrate better performance, reliable retries, or safe migration.

| Comparison | Baseline model | Proposed target |
| - | - | - |
| Shared IDs | `client`, `api`, `results` | Same IDs and authored positions |
| Job execution | API process | New `worker` component |
| Forward work path | API → Results | API → Queue → Worker → Results |
| Additional responsibility | No queue in this model | Queue operation and worker lifecycle |
| Evidence status | Assumed teaching baseline | Unimplemented teaching proposal |

The API label changes from `API + job` to `API` because its role changes. Stable identity helps a reviewer see that change; it does not imply identical behavior. Keeping a similar layout makes comparisons easier, but you can move components when the target needs more space.

## Record the decision and implementation separately

An architecture decision record captures a decision's context and consequences. Michael Nygard's [original ADR description](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions) distinguishes proposed and accepted decisions and retains superseded records. Acceptance of a proposal is different from evidence that its implementation is running.

Use the [change-record template](https://raw.githubusercontent.com/NexusFox88/iso-topology/7cfbd37f7aaab11a9dc023de4d692616b72607eb/docs/assets/architecture-change-record.txt) beside your sources. It includes baseline evidence, decision status, implementation status, transition questions and actual validation results. It is a fill-in template, not part of the diagram schema.

For this example, leave implementation status as **not started**. Expected benefits remain hypotheses until supported by results. In a real project, record the source revision or deployment identifier, observation date, and links to the evidence behind each baseline. After validating a migration, publish a new observed baseline and retain the earlier state and proposal in history.

## Describe the transition before calling it a plan

The two endpoint diagrams intentionally do not specify a rollout mechanism. Before implementing this example in a real system, answer:

* Which requests or jobs take the old path and which take the new path during transition?
* What happens to work already accepted when the path changes or a worker fails?
* How are retries, duplicate work and result ownership handled for the chosen implementation?
* What client-contract changes need compatibility handling?
* What evidence determines whether to continue or roll back, and what happens to already-queued work on rollback?

Document those answers in a transition view or runbook appropriate to the system. Do not put both sets of arrows on one unlabeled picture and leave readers to guess whether both paths are active.

## Reproduce and adapt the example

Use an [installed CLI](https://iso-topology.mintlify.site/getting-started/01-install.md) or build from the repository with Go 1.25 or later and Git:

```bash theme={"system"}
git clone https://github.com/NexusFox88/iso-topology
cd iso-topology
git rev-parse HEAD
go build -o isotopo ./cmd/isotopo
./isotopo validate docs/assets/architecture-current.yaml
./isotopo validate docs/assets/architecture-target.yaml
./isotopo render docs/assets/architecture-current.yaml ./out-current
./isotopo render docs/assets/architecture-target.yaml ./out-target
```

Record the revision. On Windows, build and run `isotopo.exe`. Each output directory contains `topology.svg` and an HTML preview. Copy a source before editing it; `isotopo serve your-copy.yaml` binds Studio to the copy and saves accepted source changes. Re-render to update the exported image.

Change a component label while retaining its ID, add your own evidence to the change record, and replace the proposed work path with the actual design under review. The renderer checks the diagram document and geometry, not whether the depicted architecture has been deployed.

[Keep multiple views consistent](https://iso-topology.mintlify.site/guides/keep-diagram-views-consistent.md) · [Architecture from code evidence](https://iso-topology.mintlify.site/guides/architecture-diagrams-from-code.md) · [Publishing diagrams](https://iso-topology.mintlify.site/getting-started/05-publishing.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.