Concepts
The arch repo service combines declared systems and teams with the observed architecture of a landscape. Systems can be documented before they are deployed, while components, messages and relations come from the sources that observe or define them. Its guiding principle is that the inventory is kept current automatically wherever possible: system/team metadata is maintained in Git, and information another system already knows is imported rather than maintained twice.
The problem it solves
A landscape of a few dozen jEAP microservices knows all of its own facts, but no single place holds them:
- The deployment log knows what was rolled out, but not who owns it.
- Prometheus knows what is actually running, but only for as long as it runs.
- The message type registry knows every event and command, but not who publishes or consumes it.
- The Pact broker knows which service calls which REST endpoint, but only where a contract test exists.
- Every service knows its own OpenAPI spec and its own database schema, and nobody else does.
Hand-maintained architecture documentation goes stale the moment any of that changes. The arch repo instead reads all of these sources on a schedule, merges them into one model, and keeps that model - and the documentation generated from it - in step with the declaration and observed reality.
Scope
The arch repo describes system architecture, in black-box terms:
- which systems exist, and which team owns each of them
- which components belong to which system, and of what kind they are
- which events and commands the systems define, and which components have a contract for them
- which REST APIs the components provide, and who calls them
- which OpenAPI spec and which database schema each component published
Configured systems without components are included too, so the Doc Service can document their description and owning team even when they are not yet deployed on the platform.
Deliberately not in scope:
- the white-box view of a single service - its internal design belongs to that service's own documentation
- business or enterprise architecture
- planning a future component topology; declaring a system does not invent components or relations that no source reports
The conventions the automation relies on
Because components are discovered rather than declared, the importers derive structure from naming. Two conventions matter:
A component name starts with the name of its system. The deployment log importer and the AWS metrics importer
split a component name at the first - and look the leading segment up as a system, so foo-bar-service is filed
under the system foo. The RHOS metrics importer gets the system from the namespace instead, which it expects to
look like something-foo-stage. The Pact broker importer expects consumer and provider names to read
department-system-component and takes the middle segment.
A system whose names do not follow the convention can declare aliases; a lookup matches the system name or any of its aliases, ignoring case.
The component type is derived from the suffix. SystemComponentFactory creates a Frontend for a name ending
in -ui, -frontend or -webui, a Gateway for one ending in -gateway, a SelfContainedSystem for one
ending in -scs, and a BackendService for everything else. MobileApp and UnknownSystemComponent exist in the model but are not produced by an importer.
Systems are not discovered - components are
An importer only ever files a component into a system that already exists. Both the deployment log importer and the metrics importers log a warning and skip a component whose system they cannot find, and neither creates one.
Onboarding is declarative: define the complete set of systems and teams in archrepo.model in Git.
The next model update after deployment/restart reconciles that desired state before importers add components.
Configuration owns system/team existence and metadata; the database is a materialized view. See
Configuration for activation guards, validation and deletion semantics.
A database-schema push can create a component of an existing system, resolved by name or alias ignoring case,
but never a system or team. An unknown system returns 422; onboard it before the first push. See API.
What consumes the model
| Consumer | How |
|---|---|
| People | Architecture documentation generated by the jEAP Doc Service from the Docs API |
| Dashboards and inventories | The public read endpoints under /api/model |
| Governance | GET /api/model/rest-api-relation-without-pact and GET /api/model/system-components-without-open-api-spec name the REST relations with no contract test and the services that published no spec |
| Other services | /external-api/dbschemas, behind a semantic role - see Security |
Related
- Architecture - how the library is put together
- Data model - the entities and their relationships
- Importers - the sources the inventory is built from
- Operations - running an instance and keeping it healthy