@radicaltools/mcp 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -26
- package/dist/chunk-Z7THA3L5.js +3200 -0
- package/dist/elkLayout-TAUBPPVN.js +8 -0
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +935 -0
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +1112 -0
- package/dist/hub-catalogue/concern/concern-authentication.radical +685 -0
- package/dist/hub-catalogue/concern/concern-authorization.radical +1464 -0
- package/dist/hub-catalogue/concern/concern-availability.radical +804 -0
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +1118 -0
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1304 -0
- package/dist/hub-catalogue/concern/concern-capacity.radical +802 -0
- package/dist/hub-catalogue/concern/concern-communication-style.radical +1202 -0
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +1081 -0
- package/dist/hub-catalogue/concern/concern-data-store.radical +960 -0
- package/dist/hub-catalogue/concern/concern-decomposition.radical +1143 -0
- package/dist/hub-catalogue/concern/concern-deployment.radical +952 -0
- package/dist/hub-catalogue/concern/concern-encryption.radical +1055 -0
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1340 -0
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +1151 -0
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1079 -0
- package/dist/hub-catalogue/concern/concern-messaging.radical +940 -0
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +864 -0
- package/dist/hub-catalogue/concern/concern-observability.radical +1048 -0
- package/dist/hub-catalogue/concern/concern-personal-data.radical +1434 -0
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1153 -0
- package/dist/hub-catalogue/concern/concern-secrets.radical +1026 -0
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +1312 -0
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1306 -0
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +1193 -0
- package/dist/index.js +22690 -6064
- package/package.json +1 -1
- package/dist/chunk-KI4NVSTU.js +0 -1763
- package/dist/elkLayout-WC6AXWOG.js +0 -185
- package/dist/hub-catalogue/adr/adr-api-versioning.radical +0 -53
- package/dist/hub-catalogue/adr/adr-auth-strategy.radical +0 -53
- package/dist/hub-catalogue/adr/adr-caching-strategy.radical +0 -59
- package/dist/hub-catalogue/adr/adr-data-consistency-model.radical +0 -40
- package/dist/hub-catalogue/adr/adr-data-store.radical +0 -47
- package/dist/hub-catalogue/adr/adr-deployment-strategy.radical +0 -53
- package/dist/hub-catalogue/adr/adr-event-schema-evolution.radical +0 -53
- package/dist/hub-catalogue/adr/adr-integration-style.radical +0 -50
- package/dist/hub-catalogue/adr/adr-ledger-reconciliation-strategy.radical +0 -38
- package/dist/hub-catalogue/adr/adr-llm-provider-strategy.radical +0 -40
- package/dist/hub-catalogue/adr/adr-marketplace-payments-model.radical +0 -39
- package/dist/hub-catalogue/adr/adr-multi-region.radical +0 -60
- package/dist/hub-catalogue/adr/adr-multi-tenancy-strategy.radical +0 -41
- package/dist/hub-catalogue/adr/adr-observability.radical +0 -59
- package/dist/hub-catalogue/adr/adr-realtime-transport.radical +0 -38
- package/dist/hub-catalogue/adr/adr-tech-stack.radical +0 -45
- package/dist/hub-catalogue/adr/adr-zero-trust-network.radical +0 -40
- package/dist/hub-catalogue/blueprint/bp-ai-assistant-platform.radical +0 -1641
- package/dist/hub-catalogue/blueprint/bp-analytical-data-platform.radical +0 -1428
- package/dist/hub-catalogue/blueprint/bp-ecommerce-platform.radical +0 -1989
- package/dist/hub-catalogue/blueprint/bp-fintech-ledger-platform.radical +0 -1701
- package/dist/hub-catalogue/blueprint/bp-marketplace-platform.radical +0 -1792
- package/dist/hub-catalogue/blueprint/bp-realtime-collaboration.radical +0 -1421
- package/dist/hub-catalogue/blueprint/bp-saas-b2b-platform.radical +0 -1713
- package/dist/hub-catalogue/fitness-function/ff-accessibility-scan.radical +0 -34
- package/dist/hub-catalogue/fitness-function/ff-ai-eval-gate.radical +0 -52
- package/dist/hub-catalogue/fitness-function/ff-api-contract.radical +0 -36
- package/dist/hub-catalogue/fitness-function/ff-capacity-load-test.radical +0 -67
- package/dist/hub-catalogue/fitness-function/ff-carbon-footprint-guard.radical +0 -62
- package/dist/hub-catalogue/fitness-function/ff-change-failure-rate.radical +0 -45
- package/dist/hub-catalogue/fitness-function/ff-chaos-resilience-test.radical +0 -53
- package/dist/hub-catalogue/fitness-function/ff-cost-efficiency-guard.radical +0 -64
- package/dist/hub-catalogue/fitness-function/ff-coupling-guard.radical +0 -45
- package/dist/hub-catalogue/fitness-function/ff-data-integrity-check.radical +0 -51
- package/dist/hub-catalogue/fitness-function/ff-data-residency.radical +0 -43
- package/dist/hub-catalogue/fitness-function/ff-dependency-rules.radical +0 -37
- package/dist/hub-catalogue/fitness-function/ff-deploy-frequency.radical +0 -46
- package/dist/hub-catalogue/fitness-function/ff-dr-drill-success.radical +0 -52
- package/dist/hub-catalogue/fitness-function/ff-duplication-guard.radical +0 -53
- package/dist/hub-catalogue/fitness-function/ff-error-budget.radical +0 -59
- package/dist/hub-catalogue/fitness-function/ff-fail-safe-verification.radical +0 -34
- package/dist/hub-catalogue/fitness-function/ff-infra-drift.radical +0 -34
- package/dist/hub-catalogue/fitness-function/ff-latency-slo.radical +0 -59
- package/dist/hub-catalogue/fitness-function/ff-lead-time.radical +0 -44
- package/dist/hub-catalogue/fitness-function/ff-ledger-balance-integrity.radical +0 -45
- package/dist/hub-catalogue/fitness-function/ff-license-compliance.radical +0 -43
- package/dist/hub-catalogue/fitness-function/ff-mttr.radical +0 -45
- package/dist/hub-catalogue/fitness-function/ff-noisy-neighbor-guard.radical +0 -66
- package/dist/hub-catalogue/fitness-function/ff-sast-scan.radical +0 -35
- package/dist/hub-catalogue/fitness-function/ff-scale-out-verification.radical +0 -66
- package/dist/hub-catalogue/fitness-function/ff-security-scan.radical +0 -45
- package/dist/hub-catalogue/fitness-function/ff-startup-shutdown-check.radical +0 -66
- package/dist/hub-catalogue/fitness-function/ff-sync-convergence-test.radical +0 -45
- package/dist/hub-catalogue/fitness-function/ff-test-coverage.radical +0 -43
- package/dist/hub-catalogue/fitness-function/ff-web-vitals.radical +0 -57
- package/dist/hub-catalogue/pattern/pattern-anti-corruption-layer.radical +0 -88
- package/dist/hub-catalogue/pattern/pattern-api-gateway.radical +0 -168
- package/dist/hub-catalogue/pattern/pattern-bff.radical +0 -179
- package/dist/hub-catalogue/pattern/pattern-bulkhead.radical +0 -114
- package/dist/hub-catalogue/pattern/pattern-circuit-breaker.radical +0 -219
- package/dist/hub-catalogue/pattern/pattern-cqrs.radical +0 -195
- package/dist/hub-catalogue/pattern/pattern-crdt-sync.radical +0 -200
- package/dist/hub-catalogue/pattern/pattern-event-driven.radical +0 -210
- package/dist/hub-catalogue/pattern/pattern-event-sourced-ledger.radical +0 -211
- package/dist/hub-catalogue/pattern/pattern-hexagonal.radical +0 -196
- package/dist/hub-catalogue/pattern/pattern-microservices.radical +0 -262
- package/dist/hub-catalogue/pattern/pattern-rag-pipeline.radical +0 -213
- package/dist/hub-catalogue/pattern/pattern-rate-limiter.radical +0 -114
- package/dist/hub-catalogue/pattern/pattern-saga.radical +0 -208
- package/dist/hub-catalogue/pattern/pattern-sidecar.radical +0 -123
- package/dist/hub-catalogue/pattern/pattern-strangler-fig.radical +0 -227
- package/dist/hub-catalogue/pattern/pattern-transactional-outbox.radical +0 -209
- package/dist/hub-catalogue/requirement/req-accessibility.radical +0 -48
- package/dist/hub-catalogue/requirement/req-ai-autonomous-resolution.radical +0 -51
- package/dist/hub-catalogue/requirement/req-ai-groundedness.radical +0 -45
- package/dist/hub-catalogue/requirement/req-ai-human-handoff.radical +0 -46
- package/dist/hub-catalogue/requirement/req-alerting.radical +0 -52
- package/dist/hub-catalogue/requirement/req-api-response-time.radical +0 -51
- package/dist/hub-catalogue/requirement/req-api-standard.radical +0 -45
- package/dist/hub-catalogue/requirement/req-audit-logging.radical +0 -43
- package/dist/hub-catalogue/requirement/req-auth-response-time.radical +0 -45
- package/dist/hub-catalogue/requirement/req-auth.radical +0 -43
- package/dist/hub-catalogue/requirement/req-autoscaling.radical +0 -62
- package/dist/hub-catalogue/requirement/req-availability.radical +0 -50
- package/dist/hub-catalogue/requirement/req-backward-compatibility.radical +0 -46
- package/dist/hub-catalogue/requirement/req-batch-job-completion.radical +0 -50
- package/dist/hub-catalogue/requirement/req-carbon-efficiency.radical +0 -64
- package/dist/hub-catalogue/requirement/req-centralised-logging.radical +0 -45
- package/dist/hub-catalogue/requirement/req-ci-pipeline-time.radical +0 -43
- package/dist/hub-catalogue/requirement/req-code-complexity.radical +0 -43
- package/dist/hub-catalogue/requirement/req-config-propagation.radical +0 -45
- package/dist/hub-catalogue/requirement/req-data-integrity.radical +0 -35
- package/dist/hub-catalogue/requirement/req-data-retention.radical +0 -44
- package/dist/hub-catalogue/requirement/req-db-query-response.radical +0 -44
- package/dist/hub-catalogue/requirement/req-disaster-recovery.radical +0 -59
- package/dist/hub-catalogue/requirement/req-distributed-tracing.radical +0 -45
- package/dist/hub-catalogue/requirement/req-encryption.radical +0 -49
- package/dist/hub-catalogue/requirement/req-error-rate.radical +0 -45
- package/dist/hub-catalogue/requirement/req-error-recovery.radical +0 -34
- package/dist/hub-catalogue/requirement/req-event-schema-compatibility.radical +0 -37
- package/dist/hub-catalogue/requirement/req-fail-safe-default.radical +0 -55
- package/dist/hub-catalogue/requirement/req-fast-startup-graceful-shutdown.radical +0 -69
- package/dist/hub-catalogue/requirement/req-gdpr-erasure.radical +0 -44
- package/dist/hub-catalogue/requirement/req-graceful-degradation.radical +0 -39
- package/dist/hub-catalogue/requirement/req-health-checks.radical +0 -43
- package/dist/hub-catalogue/requirement/req-iac.radical +0 -36
- package/dist/hub-catalogue/requirement/req-idempotency.radical +0 -47
- package/dist/hub-catalogue/requirement/req-input-validation.radical +0 -37
- package/dist/hub-catalogue/requirement/req-least-privilege.radical +0 -47
- package/dist/hub-catalogue/requirement/req-ledger-immutability.radical +0 -38
- package/dist/hub-catalogue/requirement/req-mfa.radical +0 -36
- package/dist/hub-catalogue/requirement/req-ml-extraction-accuracy.radical +0 -42
- package/dist/hub-catalogue/requirement/req-onboarding-time.radical +0 -42
- package/dist/hub-catalogue/requirement/req-page-load-time.radical +0 -59
- package/dist/hub-catalogue/requirement/req-payout-latency.radical +0 -46
- package/dist/hub-catalogue/requirement/req-presence-latency.radical +0 -46
- package/dist/hub-catalogue/requirement/req-rate-limiting.radical +0 -45
- package/dist/hub-catalogue/requirement/req-report-generation.radical +0 -44
- package/dist/hub-catalogue/requirement/req-resource-efficiency.radical +0 -64
- package/dist/hub-catalogue/requirement/req-resource-headroom.radical +0 -53
- package/dist/hub-catalogue/requirement/req-resource-isolation.radical +0 -37
- package/dist/hub-catalogue/requirement/req-search-response-time.radical +0 -44
- package/dist/hub-catalogue/requirement/req-secrets-management.radical +0 -45
- package/dist/hub-catalogue/requirement/req-task-success-rate.radical +0 -42
- package/dist/hub-catalogue/requirement/req-test-coverage.radical +0 -42
- package/dist/hub-catalogue/requirement/req-throughput.radical +0 -55
- package/dist/hub-catalogue/requirement/req-vulnerability-scanning.radical +0 -52
- package/dist/hub-catalogue/requirement/req-zero-downtime-deploy.radical +0 -39
|
@@ -0,0 +1,1143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "concern-decomposition",
|
|
4
|
+
"category": "concern",
|
|
5
|
+
"name": "Decomposition",
|
|
6
|
+
"description": "How the system is split into deployables: one monolith, a modular monolith, microservices or serverless functions; where the boundaries go, who owns the data, and how an existing system is moved over.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"architecture",
|
|
9
|
+
"decomposition",
|
|
10
|
+
"monolith",
|
|
11
|
+
"modular monolith",
|
|
12
|
+
"microservices",
|
|
13
|
+
"serverless",
|
|
14
|
+
"bounded context",
|
|
15
|
+
"strangler fig"
|
|
16
|
+
],
|
|
17
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
18
|
+
"concern": {
|
|
19
|
+
"id": "decomposition",
|
|
20
|
+
"trigger": "LIST NODES WHERE type = \"system\" AND external != true",
|
|
21
|
+
"why": "this system is built and run by people, so how it is split into deployables, and who owns which data, has to be decided.",
|
|
22
|
+
"group": "architecture"
|
|
23
|
+
},
|
|
24
|
+
"sources": [
|
|
25
|
+
{
|
|
26
|
+
"title": "Martin Fowler: MonolithFirst",
|
|
27
|
+
"url": "https://martinfowler.com/bliki/MonolithFirst.html"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Martin Fowler: MicroservicePremium",
|
|
31
|
+
"url": "https://martinfowler.com/bliki/MicroservicePremium.html"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "James Lewis, Martin Fowler: Microservices",
|
|
35
|
+
"url": "https://martinfowler.com/articles/microservices.html"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"title": "Martin Fowler: BoundedContext",
|
|
39
|
+
"url": "https://martinfowler.com/bliki/BoundedContext.html"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"title": "Martin Fowler: StranglerFigApplication",
|
|
43
|
+
"url": "https://martinfowler.com/bliki/StranglerFigApplication.html"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"title": "microservices.io, Database per service",
|
|
47
|
+
"url": "https://microservices.io/patterns/data/database-per-service.html"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"title": "microservices.io, Shared database",
|
|
51
|
+
"url": "https://microservices.io/patterns/data/shared-database.html"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"title": "Sam Newman: Monolith to Microservices (O'Reilly)",
|
|
55
|
+
"url": "https://www.oreilly.com/library/view/monolith-to-microservices/9781492047834/"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"title": "Sam Newman: Building Microservices, 2nd ed. (O'Reilly)",
|
|
59
|
+
"url": "https://www.oreilly.com/library/view/building-microservices-2nd/9781492034018/"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"title": "Spring Modulith reference documentation",
|
|
63
|
+
"url": "https://docs.spring.io/spring-modulith/reference/"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"templateParams": [
|
|
67
|
+
{
|
|
68
|
+
"key": "SPLIT",
|
|
69
|
+
"title": "Deployables",
|
|
70
|
+
"label": "How is the system split into deployables?",
|
|
71
|
+
"hint": "Each deployable is released, scaled and run on its own. More of them buy independence for teams and costs network calls, distributed data and operations. The structure inside each is the Architecture style pack.",
|
|
72
|
+
"defaultValue": "modular",
|
|
73
|
+
"options": [
|
|
74
|
+
{
|
|
75
|
+
"value": "monolith",
|
|
76
|
+
"label": "one monolith",
|
|
77
|
+
"description": "One deployable and one database, without enforced inner boundaries. Pick it for one team (up to about eight people), a new product whose domain is still being discovered, or a short-lived system."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": "modular",
|
|
81
|
+
"label": "a modular monolith",
|
|
82
|
+
"description": "One deployable cut into modules, one per bounded context, each with a published API and its own data. Pick it for one to about three teams, when boundaries are not yet proven, or when the platform and on-call for many services are not there yet: modules can become services later."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"value": "microservices",
|
|
86
|
+
"label": "microservices, one per bounded context",
|
|
87
|
+
"description": "Each bounded context is a service with its own pipeline, data and owning team. Pick it when several teams (more than about three) must release independently, parts scale or fail differently, the boundaries are known, and there is a platform for deployment, observability and on-call per service."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"value": "serverless",
|
|
91
|
+
"label": "serverless functions, grouped per context",
|
|
92
|
+
"description": "Functions (AWS Lambda, Azure Functions, Google Cloud Functions) triggered by HTTP, queues and schedules, deployed per bounded context as one stack. Pick it for spiky or low, event-driven load where paying per call beats running servers, short tasks (seconds), and a team ready to work within the provider's limits."
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"key": "DATA",
|
|
98
|
+
"title": "Data",
|
|
99
|
+
"label": "Who owns which data?",
|
|
100
|
+
"hint": "Data shared between parts is coupling the network does not remove: parts that read each other's tables have to change together.",
|
|
101
|
+
"defaultValue": "schemas",
|
|
102
|
+
"options": [
|
|
103
|
+
{
|
|
104
|
+
"value": "own",
|
|
105
|
+
"label": "a database per deployable",
|
|
106
|
+
"description": "Each service or function group has its own database that nobody else reads; others get its data through its API or events. Pick it with microservices or serverless, or whenever parts must be released and scaled apart."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"value": "schemas",
|
|
110
|
+
"label": "one server, a schema per module",
|
|
111
|
+
"description": "One database server; each module has a schema and a database user of its own, and no query reaches another module's schema. Pick it for a modular monolith, or for services on their way out of one: cheap to run, and each schema can move to its own server later."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"value": "shared",
|
|
115
|
+
"label": "one shared schema, writes owned",
|
|
116
|
+
"description": "All parts use one schema; each table has one owning module that alone writes it, and others read only through views it publishes. Pick it for a monolith, or an existing system whose tables cannot be split yet."
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"key": "BOUNDARY",
|
|
122
|
+
"title": "Boundaries",
|
|
123
|
+
"label": "What decides where a boundary goes?",
|
|
124
|
+
"hint": "A boundary in the wrong place makes every change cross it. This decides what a module or service is cut around.",
|
|
125
|
+
"defaultValue": "context",
|
|
126
|
+
"options": [
|
|
127
|
+
{
|
|
128
|
+
"value": "context",
|
|
129
|
+
"label": "bounded contexts of the domain",
|
|
130
|
+
"description": "Boundaries follow the bounded contexts of a context map: each holds one model and its own language (ordering, billing, shipping). Pick it when the domain is understood well enough to draw a context map, usually after an event-storming or domain-modelling workshop."
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"value": "team",
|
|
134
|
+
"label": "the teams that own them",
|
|
135
|
+
"description": "Each stream-aligned team owns its parts end to end, and boundaries are drawn so that most changes stay within one team (Conway's law used on purpose). Pick it when the team structure is settled and coordination between teams is the main cost."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"value": "need",
|
|
139
|
+
"label": "only a measured need splits",
|
|
140
|
+
"description": "Everything stays together unless a part has a measured, different need: load, runtime, security zone or release rate, recorded with the numbers. Pick it when the domain is young and boundaries are not known, to avoid splitting too early."
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"key": "MIGRATION",
|
|
146
|
+
"title": "Starting point",
|
|
147
|
+
"label": "Is an existing system being replaced?",
|
|
148
|
+
"hint": "A big-bang rewrite delays all value to the end and usually overruns; an existing system is replaced piece by piece behind a facade.",
|
|
149
|
+
"defaultValue": "new",
|
|
150
|
+
"options": [
|
|
151
|
+
{
|
|
152
|
+
"value": "new",
|
|
153
|
+
"label": "no, it is a new system",
|
|
154
|
+
"description": "There is no legacy to move from. Pick it for a new product, or a new system beside existing ones that keep running."
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"value": "strangler",
|
|
158
|
+
"label": "yes, piece by piece (strangler fig)",
|
|
159
|
+
"description": "A routing facade sits in front of the old system; capabilities are rebuilt one at a time, their traffic routed to the new parts, and the old code removed until nothing is left. Pick it whenever an existing system in use is replaced or decomposed."
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"key": "TEAMS",
|
|
165
|
+
"label": "How many teams build the system?",
|
|
166
|
+
"defaultValue": "3",
|
|
167
|
+
"type": "number"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"key": "PER_TEAM",
|
|
171
|
+
"label": "At most how many deployables may one team own?",
|
|
172
|
+
"defaultValue": "3",
|
|
173
|
+
"type": "number"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"key": "BUILD_MINUTES",
|
|
177
|
+
"label": "How long may building and testing one deployable take (minutes)?",
|
|
178
|
+
"defaultValue": "15",
|
|
179
|
+
"type": "number"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"key": "MIGRATION_MONTHS",
|
|
183
|
+
"label": "Within how many months must the old system be retired?",
|
|
184
|
+
"defaultValue": "24",
|
|
185
|
+
"type": "number"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"nodes": [
|
|
190
|
+
{
|
|
191
|
+
"id": "need",
|
|
192
|
+
"type": "need",
|
|
193
|
+
"label": "Teams deliver without waiting",
|
|
194
|
+
"x": 0,
|
|
195
|
+
"y": 0,
|
|
196
|
+
"kind": "brief",
|
|
197
|
+
"source": "Hub concern pack: Decomposition",
|
|
198
|
+
"description": "{{TEAMS}} teams build this system. Each should be able to change, test and release its part without waiting for the others, while the system as a whole stays something the organisation can afford to run: every extra deployable is another pipeline, another data store, more network calls and more on-call. Who owns which data has to be clear, because shared data couples parts no matter how they are deployed; and if an existing system is being replaced, it has to keep working while it is."
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "req-inventory",
|
|
202
|
+
"type": "requirement",
|
|
203
|
+
"label": "Deployables are on record",
|
|
204
|
+
"x": 260,
|
|
205
|
+
"y": 0,
|
|
206
|
+
"ears_type": "ubiquitous",
|
|
207
|
+
"action": "record every deployable of the system in the architecture model with its owning team, the bounded contexts or modules it holds and the data stores it owns, with 0 deployed units missing from the model",
|
|
208
|
+
"rationale": "A decomposition nobody can see drifts: services appear without owners and data without a home (Newman, Building Microservices, ch. 1; ISO/IEC 25010 modularity)."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "req-revisit",
|
|
212
|
+
"type": "requirement",
|
|
213
|
+
"label": "Decomposition revisited",
|
|
214
|
+
"x": 260,
|
|
215
|
+
"y": 130,
|
|
216
|
+
"ears_type": "event-driven",
|
|
217
|
+
"trigger": "the number of teams moves away from {{TEAMS}}, building and testing a deployable passes {{BUILD_MINUTES}} minutes, or two deployables are released together more than twice in a quarter",
|
|
218
|
+
"action": "review this decision and record the outcome in an ADR within one month",
|
|
219
|
+
"rationale": "The right split depends on teams, size and coupling, which change; these signals say the current one no longer fits (Fowler, MonolithFirst; Newman, Monolith to Microservices)."
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"id": "req-build",
|
|
223
|
+
"type": "requirement",
|
|
224
|
+
"label": "One fast pipeline",
|
|
225
|
+
"x": 260,
|
|
226
|
+
"y": 260,
|
|
227
|
+
"ears_type": "ubiquitous",
|
|
228
|
+
"action": "build, test and package the whole system as one deployable in at most {{BUILD_MINUTES}} minutes from commit",
|
|
229
|
+
"rationale": "A single deployable stays workable for several people only while its pipeline is fast; a slow one is the first sign it has outgrown its shape (Fowler, MonolithFirst).",
|
|
230
|
+
"hubWhen": {
|
|
231
|
+
"SPLIT": [
|
|
232
|
+
"monolith",
|
|
233
|
+
"modular"
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"id": "req-modules",
|
|
239
|
+
"type": "requirement",
|
|
240
|
+
"label": "A module per context",
|
|
241
|
+
"x": 260,
|
|
242
|
+
"y": 390,
|
|
243
|
+
"ears_type": "ubiquitous",
|
|
244
|
+
"action": "cut the deployable into one module per bounded context, each with a published API, its own data and an owning team, so that each module starts and passes its tests with the other modules absent",
|
|
245
|
+
"rationale": "A module that runs alone can later be extracted into a service without reaching into the others (Spring Modulith, application module tests; Fowler, MonolithFirst).",
|
|
246
|
+
"hubWhen": {
|
|
247
|
+
"SPLIT": [
|
|
248
|
+
"modular"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "req-independent",
|
|
254
|
+
"type": "requirement",
|
|
255
|
+
"label": "Deployed independently",
|
|
256
|
+
"x": 260,
|
|
257
|
+
"y": 520,
|
|
258
|
+
"ears_type": "event-driven",
|
|
259
|
+
"trigger": "a service or function group changes",
|
|
260
|
+
"action": "build, test and deploy it to production without building, deploying or waiting for the release of any other, with 0 releases coordinated between deployables in a quarter",
|
|
261
|
+
"rationale": "Independent deployability is the reason to split; services that must be released together carry the costs of distribution without its benefit (Lewis and Fowler, Microservices; Newman, Building Microservices).",
|
|
262
|
+
"hubWhen": {
|
|
263
|
+
"SPLIT": [
|
|
264
|
+
"microservices",
|
|
265
|
+
"serverless"
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"id": "req-owners",
|
|
271
|
+
"type": "requirement",
|
|
272
|
+
"label": "Each team owns a few",
|
|
273
|
+
"x": 260,
|
|
274
|
+
"y": 650,
|
|
275
|
+
"ears_type": "ubiquitous",
|
|
276
|
+
"action": "give every deployable exactly one owning team and let no team own more than {{PER_TEAM}} deployables",
|
|
277
|
+
"rationale": "A service is as small as one team can own completely, building and running it; more per team than it can operate becomes neglect (Newman, Building Microservices, ch. 15; Team Topologies).",
|
|
278
|
+
"hubWhen": {
|
|
279
|
+
"SPLIT": [
|
|
280
|
+
"microservices",
|
|
281
|
+
"serverless"
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"id": "req-functions",
|
|
287
|
+
"type": "requirement",
|
|
288
|
+
"label": "Functions grouped per context",
|
|
289
|
+
"x": 260,
|
|
290
|
+
"y": 780,
|
|
291
|
+
"ears_type": "ubiquitous",
|
|
292
|
+
"action": "deploy the functions of one bounded context together as one stack, give each one trigger and a timeout of at most 30 seconds, and tag each with its context and owning team",
|
|
293
|
+
"rationale": "Functions deployed one by one become hundreds of unowned units; grouping per context keeps the boundary and the ownership (AWS Well-Architected Serverless Lens).",
|
|
294
|
+
"hubWhen": {
|
|
295
|
+
"SPLIT": [
|
|
296
|
+
"serverless"
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"id": "req-own-data",
|
|
302
|
+
"type": "requirement",
|
|
303
|
+
"label": "Each deployable owns its data",
|
|
304
|
+
"x": 260,
|
|
305
|
+
"y": 910,
|
|
306
|
+
"ears_type": "ubiquitous",
|
|
307
|
+
"action": "let each deployable read and write only its own database, with 0 credentials to another's database and other data obtained through its owner's API or events",
|
|
308
|
+
"rationale": "Shared databases couple services at the schema; each service keeping its data private is what lets it change alone (microservices.io, Database per service).",
|
|
309
|
+
"hubWhen": {
|
|
310
|
+
"DATA": [
|
|
311
|
+
"own"
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"id": "req-schemas",
|
|
317
|
+
"type": "requirement",
|
|
318
|
+
"label": "A schema per module",
|
|
319
|
+
"x": 260,
|
|
320
|
+
"y": 1040,
|
|
321
|
+
"ears_type": "ubiquitous",
|
|
322
|
+
"action": "keep each module's tables in a schema of its own, reachable only by that module's database user, with 0 queries joining or reading another module's schema",
|
|
323
|
+
"rationale": "Schemas with their own users keep one database server cheap while making a cross-module query fail at once; each schema can later move out (microservices.io, Database per service: schema-per-service).",
|
|
324
|
+
"hubWhen": {
|
|
325
|
+
"DATA": [
|
|
326
|
+
"schemas"
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"id": "req-shared",
|
|
332
|
+
"type": "requirement",
|
|
333
|
+
"label": "Each table has one writer",
|
|
334
|
+
"x": 260,
|
|
335
|
+
"y": 1170,
|
|
336
|
+
"ears_type": "ubiquitous",
|
|
337
|
+
"action": "record an owning module for every table, let only that module's database user insert, update or delete its rows, and let other modules read only through views the owner publishes",
|
|
338
|
+
"rationale": "A shared database is the simplest store but couples everything that writes to it; single writers keep the coupling to reads (microservices.io, Shared database).",
|
|
339
|
+
"hubWhen": {
|
|
340
|
+
"DATA": [
|
|
341
|
+
"shared"
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"id": "req-contexts",
|
|
347
|
+
"type": "requirement",
|
|
348
|
+
"label": "Boundaries follow contexts",
|
|
349
|
+
"x": 260,
|
|
350
|
+
"y": 1300,
|
|
351
|
+
"ears_type": "ubiquitous",
|
|
352
|
+
"action": "draw every boundary between modules or services along a bounded context of the context map, with 0 contexts split across two deployables or modules",
|
|
353
|
+
"rationale": "A bounded context is the boundary inside which a model is consistent; cutting across one splits a model that has to change together (Fowler, BoundedContext).",
|
|
354
|
+
"hubWhen": {
|
|
355
|
+
"BOUNDARY": [
|
|
356
|
+
"context"
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"id": "req-team-changes",
|
|
362
|
+
"type": "requirement",
|
|
363
|
+
"label": "Changes stay in one team",
|
|
364
|
+
"x": 260,
|
|
365
|
+
"y": 1430,
|
|
366
|
+
"ears_type": "ubiquitous",
|
|
367
|
+
"action": "keep the boundaries so that at least 80% of merged changes in a quarter touch only the parts of one team, and redraw them when that share falls",
|
|
368
|
+
"rationale": "Boundaries that match the teams keep coordination low; the share of single-team changes measures it (Conway's law; Skelton and Pais, Team Topologies).",
|
|
369
|
+
"hubWhen": {
|
|
370
|
+
"BOUNDARY": [
|
|
371
|
+
"team"
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"id": "req-split-need",
|
|
377
|
+
"type": "requirement",
|
|
378
|
+
"label": "Splits backed by numbers",
|
|
379
|
+
"x": 260,
|
|
380
|
+
"y": 1560,
|
|
381
|
+
"ears_type": "event-driven",
|
|
382
|
+
"trigger": "a part is proposed to become a deployable or module of its own",
|
|
383
|
+
"action": "split it only when an ADR records the measured need: a load, runtime, security zone or release rate that differs from the rest by at least a factor of 2 or a compliance boundary",
|
|
384
|
+
"rationale": "Splitting before the need is known pays the microservice premium for nothing (Fowler, MicroservicePremium).",
|
|
385
|
+
"hubWhen": {
|
|
386
|
+
"BOUNDARY": [
|
|
387
|
+
"need"
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"id": "req-strangler",
|
|
393
|
+
"type": "requirement",
|
|
394
|
+
"label": "Legacy replaced piece by piece",
|
|
395
|
+
"x": 260,
|
|
396
|
+
"y": 1690,
|
|
397
|
+
"ears_type": "event-driven",
|
|
398
|
+
"trigger": "a capability of the old system has been rebuilt",
|
|
399
|
+
"action": "route its traffic through the routing facade to the new part, keep the route switchable back for 30 days, then remove the old code, and retire the old system within {{MIGRATION_MONTHS}} months",
|
|
400
|
+
"rationale": "The strangler fig replaces a system while it keeps running, each step small and reversible (Fowler, StranglerFigApplication; Newman, Monolith to Microservices, ch. 3).",
|
|
401
|
+
"hubWhen": {
|
|
402
|
+
"MIGRATION": [
|
|
403
|
+
"strangler"
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"id": "sc-inventory",
|
|
409
|
+
"type": "scenario",
|
|
410
|
+
"label": "Every deployable known",
|
|
411
|
+
"x": 520,
|
|
412
|
+
"y": 0,
|
|
413
|
+
"given": "the list of units deployed to production",
|
|
414
|
+
"when": "it is compared with the deployables in the model",
|
|
415
|
+
"then": "every unit is in the model with an owning team and its data stores"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"id": "sc-revisit",
|
|
419
|
+
"type": "scenario",
|
|
420
|
+
"label": "Signal leads to review",
|
|
421
|
+
"x": 520,
|
|
422
|
+
"y": 130,
|
|
423
|
+
"given": "the decomposition decision",
|
|
424
|
+
"when": "two services are released together for the third time in a quarter",
|
|
425
|
+
"then": "within a month an ADR records whether they are merged, re-cut or left as they are"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"id": "sc-build",
|
|
429
|
+
"type": "scenario",
|
|
430
|
+
"label": "Build within limit",
|
|
431
|
+
"x": 520,
|
|
432
|
+
"y": 260,
|
|
433
|
+
"given": "a commit to the main branch",
|
|
434
|
+
"when": "the pipeline builds, tests and packages the deployable",
|
|
435
|
+
"then": "it finishes within {{BUILD_MINUTES}} minutes",
|
|
436
|
+
"hubWhen": {
|
|
437
|
+
"SPLIT": [
|
|
438
|
+
"monolith",
|
|
439
|
+
"modular"
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"id": "sc-modules",
|
|
445
|
+
"type": "scenario",
|
|
446
|
+
"label": "Module runs alone",
|
|
447
|
+
"x": 520,
|
|
448
|
+
"y": 390,
|
|
449
|
+
"given": "the ordering module",
|
|
450
|
+
"when": "its integration tests start it without the other modules",
|
|
451
|
+
"then": "it starts and its tests pass, using only mocks of the APIs it depends on",
|
|
452
|
+
"hubWhen": {
|
|
453
|
+
"SPLIT": [
|
|
454
|
+
"modular"
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"id": "sc-independent",
|
|
460
|
+
"type": "scenario",
|
|
461
|
+
"label": "One service released alone",
|
|
462
|
+
"x": 520,
|
|
463
|
+
"y": 520,
|
|
464
|
+
"given": "two services where one calls the other",
|
|
465
|
+
"when": "the called service is changed and released",
|
|
466
|
+
"then": "it reaches production on its own and the calling service is neither rebuilt nor redeployed",
|
|
467
|
+
"hubWhen": {
|
|
468
|
+
"SPLIT": [
|
|
469
|
+
"microservices",
|
|
470
|
+
"serverless"
|
|
471
|
+
]
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"id": "sc-owners",
|
|
476
|
+
"type": "scenario",
|
|
477
|
+
"label": "Ownership within limit",
|
|
478
|
+
"x": 520,
|
|
479
|
+
"y": 650,
|
|
480
|
+
"given": "the deployables and their owning teams",
|
|
481
|
+
"when": "the ownership is counted",
|
|
482
|
+
"then": "each has one owner and no team owns more than {{PER_TEAM}}",
|
|
483
|
+
"hubWhen": {
|
|
484
|
+
"SPLIT": [
|
|
485
|
+
"microservices",
|
|
486
|
+
"serverless"
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"id": "sc-functions",
|
|
492
|
+
"type": "scenario",
|
|
493
|
+
"label": "Function belongs somewhere",
|
|
494
|
+
"x": 520,
|
|
495
|
+
"y": 780,
|
|
496
|
+
"given": "the infrastructure templates",
|
|
497
|
+
"when": "a function without a context tag or with a 5-minute timeout is added",
|
|
498
|
+
"then": "the template check fails",
|
|
499
|
+
"hubWhen": {
|
|
500
|
+
"SPLIT": [
|
|
501
|
+
"serverless"
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"id": "sc-own-data",
|
|
507
|
+
"type": "scenario",
|
|
508
|
+
"label": "No foreign credentials",
|
|
509
|
+
"x": 520,
|
|
510
|
+
"y": 910,
|
|
511
|
+
"given": "the deployment configuration of every service",
|
|
512
|
+
"when": "the database credentials each receives are listed",
|
|
513
|
+
"then": "each receives only those of its own database",
|
|
514
|
+
"hubWhen": {
|
|
515
|
+
"DATA": [
|
|
516
|
+
"own"
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"id": "sc-schemas",
|
|
522
|
+
"type": "scenario",
|
|
523
|
+
"label": "Foreign schema refused",
|
|
524
|
+
"x": 520,
|
|
525
|
+
"y": 1040,
|
|
526
|
+
"given": "the ordering and billing modules with their own schemas and users",
|
|
527
|
+
"when": "ordering's user selects from a billing table",
|
|
528
|
+
"then": "the database refuses it with a permission error",
|
|
529
|
+
"hubWhen": {
|
|
530
|
+
"DATA": [
|
|
531
|
+
"schemas"
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"id": "sc-shared",
|
|
537
|
+
"type": "scenario",
|
|
538
|
+
"label": "Foreign write refused",
|
|
539
|
+
"x": 520,
|
|
540
|
+
"y": 1170,
|
|
541
|
+
"given": "the orders table owned by ordering",
|
|
542
|
+
"when": "billing's database user updates a row of it",
|
|
543
|
+
"then": "the database refuses it with a permission error",
|
|
544
|
+
"hubWhen": {
|
|
545
|
+
"DATA": [
|
|
546
|
+
"shared"
|
|
547
|
+
]
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"id": "sc-contexts",
|
|
552
|
+
"type": "scenario",
|
|
553
|
+
"label": "Context not split",
|
|
554
|
+
"x": 520,
|
|
555
|
+
"y": 1300,
|
|
556
|
+
"given": "the context map and the deployables",
|
|
557
|
+
"when": "each context is traced to the deployables holding its code",
|
|
558
|
+
"then": "every context is held by exactly one module or service",
|
|
559
|
+
"hubWhen": {
|
|
560
|
+
"BOUNDARY": [
|
|
561
|
+
"context"
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"id": "sc-team-changes",
|
|
567
|
+
"type": "scenario",
|
|
568
|
+
"label": "Changes stay with a team",
|
|
569
|
+
"x": 520,
|
|
570
|
+
"y": 1430,
|
|
571
|
+
"given": "the merged pull requests of a quarter and the owners of each part",
|
|
572
|
+
"when": "each change is matched to the teams whose parts it touches",
|
|
573
|
+
"then": "at least 80% touch the parts of one team only",
|
|
574
|
+
"hubWhen": {
|
|
575
|
+
"BOUNDARY": [
|
|
576
|
+
"team"
|
|
577
|
+
]
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"id": "sc-split-need",
|
|
582
|
+
"type": "scenario",
|
|
583
|
+
"label": "Split needs numbers",
|
|
584
|
+
"x": 520,
|
|
585
|
+
"y": 1560,
|
|
586
|
+
"given": "a proposal to extract the search into a service",
|
|
587
|
+
"when": "it is reviewed",
|
|
588
|
+
"then": "it goes ahead only with an ADR showing, for example, search load ten times the rest",
|
|
589
|
+
"hubWhen": {
|
|
590
|
+
"BOUNDARY": [
|
|
591
|
+
"need"
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"id": "sc-strangler",
|
|
597
|
+
"type": "scenario",
|
|
598
|
+
"label": "Route switched over",
|
|
599
|
+
"x": 520,
|
|
600
|
+
"y": 1690,
|
|
601
|
+
"given": "a rebuilt order history behind the routing facade",
|
|
602
|
+
"when": "its route is switched to the new part and the new part fails",
|
|
603
|
+
"then": "the route is switched back within minutes, and once stable for 30 days the old code is removed",
|
|
604
|
+
"hubWhen": {
|
|
605
|
+
"MIGRATION": [
|
|
606
|
+
"strangler"
|
|
607
|
+
]
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"id": "adr-monolith",
|
|
612
|
+
"type": "adr",
|
|
613
|
+
"label": "One monolith",
|
|
614
|
+
"x": 780,
|
|
615
|
+
"y": 0,
|
|
616
|
+
"concern": "decomposition",
|
|
617
|
+
"status": "accepted",
|
|
618
|
+
"date": "",
|
|
619
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
620
|
+
"decision": "The system is one deployable with one database, built by one pipeline in at most {{BUILD_MINUTES}} minutes and released as a whole; {{TEAMS}} teams work in it. Boundaries are drawn by {{BOUNDARY}}; data: {{DATA}}. It is revisited when the number of teams grows, the build passes {{BUILD_MINUTES}} minutes, or parts need different scaling. Criteria that made it the choice: one team or very few, a domain still being discovered, no platform for running many services.",
|
|
621
|
+
"consequences": "• Simplest to build, test, deploy and debug: local calls, one transaction, one log.\n• Everyone releases together, so a broken part blocks the release and teams wait on each other as they grow.\n• Without enforced boundaries the code tends to tangle; moving to modules later means drawing them first.\n• Scales as a whole: running more copies scales every part at once.",
|
|
622
|
+
"alternatives": "1. A modular monolith: the same single deployable with enforced module boundaries, ready to split later.\n2. Microservices: independent releases per team, at the cost of distribution and operations.\n3. Serverless functions: no servers to run, but many small units and provider limits.",
|
|
623
|
+
"hubWhen": {
|
|
624
|
+
"SPLIT": [
|
|
625
|
+
"monolith"
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"id": "adr-modular-monolith",
|
|
631
|
+
"type": "adr",
|
|
632
|
+
"label": "A modular monolith",
|
|
633
|
+
"x": 780,
|
|
634
|
+
"y": 130,
|
|
635
|
+
"concern": "decomposition",
|
|
636
|
+
"status": "accepted",
|
|
637
|
+
"date": "",
|
|
638
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
639
|
+
"decision": "The system is one deployable cut into modules, one per bounded context, each with a published API, its own data and an owning team; {{TEAMS}} teams work in it and it is built in at most {{BUILD_MINUTES}} minutes. Boundaries are drawn by {{BOUNDARY}}; data: {{DATA}}. Each module starts and is tested on its own (Spring Modulith's @ApplicationModuleTest on Spring Boot; on .NET one project per module with its own test project; in TypeScript an Nx project per module). A module is extracted into a service only when a team or a measured need justifies it (Module boundaries keeps the rules between modules).",
|
|
640
|
+
"consequences": "• Boundaries by domain without the network: one deploy, local calls, one transaction where really needed.\n• Modules with a clean API and private data can become services later with little rework.\n• All modules release together, so one broken module blocks the others' release.\n• One runtime: a module that needs very different scaling or technology is a reason to extract it.",
|
|
641
|
+
"alternatives": "1. A plain monolith: simpler, but boundaries erode and splitting later is harder.\n2. Microservices from the start: independent releases, at the cost of distribution before boundaries are proven.\n3. Separate repositories per module in one deployable: strong boundaries, slow cross-module changes.",
|
|
642
|
+
"hubWhen": {
|
|
643
|
+
"SPLIT": [
|
|
644
|
+
"modular"
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"id": "adr-microservices",
|
|
650
|
+
"type": "adr",
|
|
651
|
+
"label": "Microservices per context",
|
|
652
|
+
"x": 780,
|
|
653
|
+
"y": 260,
|
|
654
|
+
"concern": "decomposition",
|
|
655
|
+
"status": "accepted",
|
|
656
|
+
"date": "",
|
|
657
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
658
|
+
"decision": "The system is split into services, one per bounded context, each with its own repository or Nx project, pipeline, data store and one owning team; {{TEAMS}} teams own at most {{PER_TEAM}} services each. Boundaries are drawn by {{BOUNDARY}}; data: {{DATA}}. Services meet only through versioned contracts, and each is deployed on its own after its consumers' contracts pass (Pact can-i-deploy). A service runs on the shared platform (Kubernetes with a paved-road template, or a managed container service such as ECS, Cloud Run or Azure Container Apps), with per-service dashboards and on-call. Criteria that made it the choice: more teams than one deployable can carry, parts that scale or fail differently, known boundaries, and a platform to run them.",
|
|
659
|
+
"consequences": "• Teams release, scale and choose technology per service without waiting for each other.\n• Every call between contexts is a network call that can fail or be slow, and an operation across services needs events or sagas instead of one transaction.\n• More to run: a pipeline, data store, dashboards and on-call per service, and a platform team to make that cheap.\n• A wrong boundary is expensive to move; boundaries should be proven, ideally first as modules.",
|
|
660
|
+
"alternatives": "1. A modular monolith: the same boundaries in one deployable, simpler to run, released together.\n2. Services per technical layer (a data service, a UI service): every feature touches all of them.\n3. A distributed monolith with a shared database: services in name only.",
|
|
661
|
+
"hubWhen": {
|
|
662
|
+
"SPLIT": [
|
|
663
|
+
"microservices"
|
|
664
|
+
]
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"id": "adr-serverless",
|
|
669
|
+
"type": "adr",
|
|
670
|
+
"label": "Serverless functions per context",
|
|
671
|
+
"x": 780,
|
|
672
|
+
"y": 390,
|
|
673
|
+
"concern": "decomposition",
|
|
674
|
+
"status": "accepted",
|
|
675
|
+
"date": "",
|
|
676
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
677
|
+
"decision": "The system is built from functions grouped per bounded context: each context is one stack (AWS SAM, AWS CDK or the Serverless Framework on AWS Lambda; Bicep with Azure Functions; Terraform with Google Cloud Functions) with its functions, queues and data store, owned by one team; {{TEAMS}} teams own at most {{PER_TEAM}} stacks each. Each function has one trigger and a timeout of at most 30 seconds; longer work runs as a workflow (Step Functions, Durable Functions). Boundaries are drawn by {{BOUNDARY}}; data: {{DATA}}. Criteria that made it the choice: spiky or low event-driven load, short tasks, and a team at home with the provider's limits.",
|
|
678
|
+
"consequences": "• No servers to patch or scale; cost follows use and is near zero when idle.\n• Cold starts add latency to the first call after idle; latency-critical paths need provisioned concurrency.\n• Provider limits (duration, payload, concurrency) shape the design, and local testing needs emulators or a cloud sandbox.\n• Strong lock-in to the provider's triggers and services.",
|
|
679
|
+
"alternatives": "1. Containers per context (microservices): no cold starts or duration limits, but servers to run.\n2. A modular monolith on a managed platform: simplest, at the cost of paying for idle capacity.\n3. One function per endpoint deployed alone: maximal granularity, unmanageable ownership.",
|
|
680
|
+
"hubWhen": {
|
|
681
|
+
"SPLIT": [
|
|
682
|
+
"serverless"
|
|
683
|
+
]
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"id": "adr-own-database",
|
|
688
|
+
"type": "adr",
|
|
689
|
+
"label": "A database per deployable",
|
|
690
|
+
"x": 780,
|
|
691
|
+
"y": 520,
|
|
692
|
+
"concern": "decomposition",
|
|
693
|
+
"status": "accepted",
|
|
694
|
+
"date": "",
|
|
695
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
696
|
+
"decision": "Each deployable has its own database (a separate database or managed instance) and holds the only credentials to it; other deployables get its data through its API or by consuming its events into a copy of their own. Reports that need data from several deployables read a reporting store fed by events or change data capture (Debezium), never the services' databases.",
|
|
697
|
+
"consequences": "• Each deployable changes its schema and scales its store without asking anyone.\n• No joins or transactions across deployables: queries across them are API compositions or read models, and consistency across them is eventual.\n• More databases to back up, patch and watch.\n• Duplicated data must have one owner; copies are read-only.",
|
|
698
|
+
"alternatives": "1. One server with a schema per deployable: cheaper, same ownership, less isolation of load.\n2. A shared database: easy joins, but every schema change couples all its users.",
|
|
699
|
+
"hubWhen": {
|
|
700
|
+
"DATA": [
|
|
701
|
+
"own"
|
|
702
|
+
]
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"id": "adr-schema-per-module",
|
|
707
|
+
"type": "adr",
|
|
708
|
+
"label": "A schema per module",
|
|
709
|
+
"x": 780,
|
|
710
|
+
"y": 650,
|
|
711
|
+
"concern": "decomposition",
|
|
712
|
+
"status": "accepted",
|
|
713
|
+
"date": "",
|
|
714
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
715
|
+
"decision": "The modules share one database server; each module has a schema and a database user of its own, granted only on that schema, and its migrations (Flyway or Liquibase locations, EF Core migrations per DbContext) touch only it. A module that needs another's data calls its API or keeps a copy fed by its events; there are no cross-schema joins or foreign keys.",
|
|
716
|
+
"consequences": "• One server to run and back up, while a cross-module query fails at once.\n• A module can move to its own server later by pointing its user elsewhere.\n• No database-enforced references between modules; consistency between them is the modules' job.\n• Load is still shared: a heavy module slows the others.",
|
|
717
|
+
"alternatives": "1. A database per deployable: full isolation, more to run.\n2. One shared schema: joins anywhere, and boundaries only by convention.",
|
|
718
|
+
"hubWhen": {
|
|
719
|
+
"DATA": [
|
|
720
|
+
"schemas"
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"id": "adr-shared-schema",
|
|
726
|
+
"type": "adr",
|
|
727
|
+
"label": "Shared schema, owned writes",
|
|
728
|
+
"x": 780,
|
|
729
|
+
"y": 780,
|
|
730
|
+
"concern": "decomposition",
|
|
731
|
+
"status": "accepted",
|
|
732
|
+
"date": "",
|
|
733
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
734
|
+
"decision": "All parts use one schema. Every table has one owning module, recorded in a table comment and in the model; only the owner's database user may insert, update or delete it, and other modules read it only through views the owner publishes as its read API. New tables follow the module's name prefix. This is a stage: tables move into a schema per module as boundaries firm up.",
|
|
735
|
+
"consequences": "• Simple and cheap; existing queries and reports keep working.\n• Reads across modules stay possible and therefore coupling stays: a view is a contract to keep.\n• Single writers stop the worst coupling (two modules changing the same rows).\n• Splitting the data later means moving tables and replacing views with APIs or events.",
|
|
736
|
+
"alternatives": "1. A schema per module: enforced isolation on the same server.\n2. A database per deployable: full isolation, more to run.",
|
|
737
|
+
"hubWhen": {
|
|
738
|
+
"DATA": [
|
|
739
|
+
"shared"
|
|
740
|
+
]
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"id": "adr-strangler",
|
|
745
|
+
"type": "adr",
|
|
746
|
+
"label": "Strangler fig migration",
|
|
747
|
+
"x": 780,
|
|
748
|
+
"y": 910,
|
|
749
|
+
"concern": "decomposition",
|
|
750
|
+
"status": "accepted",
|
|
751
|
+
"date": "",
|
|
752
|
+
"context": "The system has to be built, released and run by a given number of teams. How it is split into deployables decides how independently they can work and how much there is to operate. The forces: several teams in one deployable wait for each other's releases and step on each other's code; every split adds network calls that fail and are slow, data that is no longer in one transaction, and pipelines, dashboards and on-call to run (the microservice premium); boundaries drawn before the domain is understood are expensive to move once they are services; two services sharing a database are one service released twice; and an existing system cannot be replaced in one step.",
|
|
753
|
+
"decision": "The old system is replaced piece by piece. A routing facade (an API gateway or reverse proxy: Envoy, NGINX, YARP, Spring Cloud Gateway, or the cloud's gateway) sits in front of it from the first step; capabilities are rebuilt one at a time in order of value and risk, their routes switched to the new parts and kept switchable back for 30 days, then the old code is removed. Data moves with its capability, synchronised both ways (change data capture) while both sides write. The share of traffic still reaching the old system is reported every month; it reaches zero within {{MIGRATION_MONTHS}} months.",
|
|
754
|
+
"consequences": "• Value arrives with every capability moved, and each step can be reversed.\n• For a while two systems run, and data synchronisation between them is extra work and risk.\n• The facade is on every request path and must be as reliable as the system.\n• Without a deadline and a measure the last 20% never moves; the monthly share keeps it honest.",
|
|
755
|
+
"alternatives": "1. A big-bang rewrite: no parallel running, but all value at the end and a high risk of overrun.\n2. Branch by abstraction inside the old code: no facade needed, but works only where the old code can still be changed.\n3. Leaving the old system and building around it: no migration cost, and the old system's problems stay.",
|
|
756
|
+
"hubWhen": {
|
|
757
|
+
"MIGRATION": [
|
|
758
|
+
"strangler"
|
|
759
|
+
]
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"id": "ff-build-time",
|
|
764
|
+
"type": "fitness-fn",
|
|
765
|
+
"label": "Pipeline within limit",
|
|
766
|
+
"x": 1040,
|
|
767
|
+
"y": 0,
|
|
768
|
+
"category": "process",
|
|
769
|
+
"threshold": "Build, test and package finish within {{BUILD_MINUTES}} minutes on the main branch",
|
|
770
|
+
"description": "The CI job that builds, tests and packages the deployable has a timeout; when it is hit, the job fails and the trend is reviewed as a signal to revisit the decomposition.\n\nTool: GitHub Actions (timeout-minutes)\n\n```yaml\n# .github/workflows/build.yml\nname: build\non: { push: { branches: [main] }, pull_request: {} }\njobs:\n build:\n runs-on: ubuntu-latest\n timeout-minutes: {{BUILD_MINUTES}} # ADR: one deployable stays fast to build\n steps:\n - uses: actions/checkout@v4\n - run: ./mvnw -B verify package\n```",
|
|
771
|
+
"hubWhen": {
|
|
772
|
+
"SPLIT": [
|
|
773
|
+
"monolith",
|
|
774
|
+
"modular"
|
|
775
|
+
]
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"id": "ff-module-alone",
|
|
780
|
+
"type": "fitness-fn",
|
|
781
|
+
"label": "Modules start alone",
|
|
782
|
+
"x": 1040,
|
|
783
|
+
"y": 130,
|
|
784
|
+
"category": "structural",
|
|
785
|
+
"threshold": "Every module starts and passes its integration tests with the other modules absent",
|
|
786
|
+
"description": "Each module has an integration test that bootstraps only that module (Spring Modulith's standalone bootstrap mode), with the APIs of the modules it depends on mocked. A module that needs another to start fails its test. On .NET, a WebApplicationFactory per module does the same.\n\nTool: Spring Modulith (@ApplicationModuleTest)\n\n```java\n@ApplicationModuleTest(mode = BootstrapMode.STANDALONE)\nclass OrderingModuleTest {\n @Autowired Ordering ordering; // the module's own API\n @MockitoBean BillingApi billing; // the API of a module ordering depends on\n\n @Test\n void placesAnOrderOnItsOwn(Scenario scenario) {\n scenario.stimulate(() -> ordering.place(new PlaceOrder(CUSTOMER, LINES)))\n .andWaitForEventOfType(OrderPlaced.class)\n .toArrive();\n }\n}\n```",
|
|
787
|
+
"hubWhen": {
|
|
788
|
+
"SPLIT": [
|
|
789
|
+
"modular"
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"id": "ff-can-i-deploy",
|
|
795
|
+
"type": "fitness-fn",
|
|
796
|
+
"label": "Deploys checked alone",
|
|
797
|
+
"x": 1040,
|
|
798
|
+
"y": 260,
|
|
799
|
+
"category": "process",
|
|
800
|
+
"threshold": "0 deployments that need another deployable released first; each deploys when its consumers' contracts pass",
|
|
801
|
+
"description": "Each deployable has its own pipeline, triggered only by changes in its own folder. Before deploying, it asks the Pact Broker whether the version is compatible with what is in production; it deploys alone if so, and the release is recorded for its consumers.\n\nTool: Pact Broker (can-i-deploy) in GitHub Actions\n\n```yaml\n# .github/workflows/ordering.yml\non: { push: { branches: [main], paths: ['services/ordering/**'] } }\njobs:\n deploy:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - run: >\n npx pact-broker can-i-deploy --pacticipant ordering\n --version ${{ github.sha }} --to-environment production\n --broker-base-url ${{ vars.PACT_BROKER_URL }}\n - run: ./deploy.sh services/ordering\n - run: >\n npx pact-broker record-deployment --pacticipant ordering\n --version ${{ github.sha }} --environment production\n```",
|
|
802
|
+
"hubWhen": {
|
|
803
|
+
"SPLIT": [
|
|
804
|
+
"microservices",
|
|
805
|
+
"serverless"
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"id": "ff-ownership",
|
|
811
|
+
"type": "fitness-fn",
|
|
812
|
+
"label": "Owners within limit",
|
|
813
|
+
"x": 1040,
|
|
814
|
+
"y": 390,
|
|
815
|
+
"category": "process",
|
|
816
|
+
"threshold": "Every deployable has one owner in its catalog entry; no team owns more than {{PER_TEAM}}",
|
|
817
|
+
"description": "Each deployable has a Backstage catalog-info.yaml naming its owner; a CI step counts deployables per owner and fails when one is missing or a team owns more than the limit.\n\nTool: yq over Backstage catalog-info.yaml\n\n```bash\n# every service folder has catalog-info.yaml with spec.owner\nfor f in services/*/catalog-info.yaml; do\n owner=$(yq -r '.spec.owner // \"\"' \"$f\")\n [ -n \"$owner\" ] || { echo \"no owner: $f\"; exit 1; }\n echo \"$owner\"\ndone | sort | uniq -c | awk -v max={{PER_TEAM}} '$1 > max { print \"too many for \" $2 \": \" $1; bad = 1 } END { exit bad }'\n```",
|
|
818
|
+
"hubWhen": {
|
|
819
|
+
"SPLIT": [
|
|
820
|
+
"microservices",
|
|
821
|
+
"serverless"
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"id": "ff-functions",
|
|
827
|
+
"type": "fitness-fn",
|
|
828
|
+
"label": "Functions belong to a stack",
|
|
829
|
+
"x": 1040,
|
|
830
|
+
"y": 520,
|
|
831
|
+
"category": "structural",
|
|
832
|
+
"threshold": "0 functions without a context and owner tag or with a timeout above 30 seconds",
|
|
833
|
+
"description": "A CloudFormation Guard rule runs over every synthesised template (SAM or CDK) in CI and fails on a function that does not belong to a context or runs too long.\n\nTool: AWS CloudFormation Guard (cfn-guard)\n\n```text\n# rules/functions.guard — cfn-guard validate -d template.yaml -r rules/functions.guard\nlet functions = Resources.*[ Type == 'AWS::Serverless::Function' ]\n\nrule functions_belong_to_a_context when %functions !empty {\n %functions.Properties.Tags.context exists\n %functions.Properties.Tags.owner exists\n %functions.Properties.Timeout <= 30\n}\n```",
|
|
834
|
+
"hubWhen": {
|
|
835
|
+
"SPLIT": [
|
|
836
|
+
"serverless"
|
|
837
|
+
]
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"id": "ff-own-database",
|
|
842
|
+
"type": "fitness-fn",
|
|
843
|
+
"label": "No foreign credentials",
|
|
844
|
+
"x": 1040,
|
|
845
|
+
"y": 650,
|
|
846
|
+
"category": "structural",
|
|
847
|
+
"threshold": "0 deployments that receive another deployable's database secret",
|
|
848
|
+
"description": "A policy over the Kubernetes manifests fails when a workload references a database secret other than its own (secrets are named db-<app>).\n\nTool: Conftest (Open Policy Agent)\n\n```rego\npackage main\nimport rego.v1\n\ndeny contains msg if {\n input.kind == \"Deployment\"\n app := input.metadata.labels[\"app.kubernetes.io/name\"]\n some c in input.spec.template.spec.containers\n some src in c.envFrom\n startswith(src.secretRef.name, \"db-\")\n src.secretRef.name != sprintf(\"db-%s\", [app])\n msg := sprintf(\"%s reads database secret %s (ADR A database per deployable)\", [app, src.secretRef.name])\n}\n```",
|
|
849
|
+
"hubWhen": {
|
|
850
|
+
"DATA": [
|
|
851
|
+
"own"
|
|
852
|
+
]
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"id": "ff-schema-grants",
|
|
857
|
+
"type": "fitness-fn",
|
|
858
|
+
"label": "Schemas closed to others",
|
|
859
|
+
"x": 1040,
|
|
860
|
+
"y": 780,
|
|
861
|
+
"category": "structural",
|
|
862
|
+
"threshold": "0 module users with any privilege on another module's schema",
|
|
863
|
+
"description": "An integration test starts PostgreSQL in a container, runs every module's migrations and grants, and runs this query; any row fails the test.\n\nTool: Testcontainers (PostgreSQL)\n\n```sql\n-- module users are named module_<name>, schemas <name>\nSELECT r.rolname AS module_user, n.nspname AS foreign_schema\nFROM pg_roles r CROSS JOIN pg_namespace n\nWHERE r.rolname LIKE 'module\\_%'\n AND n.nspname NOT IN ('public', 'information_schema') AND n.nspname NOT LIKE 'pg\\_%'\n AND n.nspname <> substring(r.rolname FROM 8)\n AND has_schema_privilege(r.rolname, n.oid, 'USAGE');\n-- expected: 0 rows\n```",
|
|
864
|
+
"hubWhen": {
|
|
865
|
+
"DATA": [
|
|
866
|
+
"schemas"
|
|
867
|
+
]
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"id": "ff-table-writers",
|
|
872
|
+
"type": "fitness-fn",
|
|
873
|
+
"label": "One writer per table",
|
|
874
|
+
"x": 1040,
|
|
875
|
+
"y": 910,
|
|
876
|
+
"category": "structural",
|
|
877
|
+
"threshold": "0 tables writable by a module user other than the owner's",
|
|
878
|
+
"description": "An integration test starts PostgreSQL in a container, runs the migrations and grants, and checks that each table (prefixed with its owning module) can be written only by its owner's user.\n\nTool: Testcontainers (PostgreSQL)\n\n```sql\n-- tables are named <module>_<name>, module users module_<module>\nSELECT r.rolname AS module_user, c.relname AS foreign_table\nFROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace\nCROSS JOIN pg_roles r\nWHERE n.nspname = 'public' AND c.relkind = 'r' AND r.rolname LIKE 'module\\_%'\n AND split_part(c.relname, '_', 1) <> substring(r.rolname FROM 8)\n AND has_table_privilege(r.rolname, c.oid, 'INSERT, UPDATE, DELETE');\n-- expected: 0 rows\n```",
|
|
879
|
+
"hubWhen": {
|
|
880
|
+
"DATA": [
|
|
881
|
+
"shared"
|
|
882
|
+
]
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"id": "ff-legacy-share",
|
|
887
|
+
"type": "fitness-fn",
|
|
888
|
+
"label": "Legacy traffic falls",
|
|
889
|
+
"x": 1040,
|
|
890
|
+
"y": 1040,
|
|
891
|
+
"category": "operational",
|
|
892
|
+
"threshold": "The share of requests reaching the old system falls every month and is 0 within {{MIGRATION_MONTHS}} months",
|
|
893
|
+
"description": "The routing facade labels each request with the backend that served it; a recording rule keeps the share of the old system, a dashboard shows the trend, and an alert fires when it has not fallen over a month.\n\nTool: Prometheus recording and alerting rules\n\n```yaml\ngroups:\n - name: strangler\n rules:\n - record: migration:legacy_share:ratio_7d\n expr: |\n sum(rate(facade_requests_total{backend=\"legacy\"}[7d])) / sum(rate(facade_requests_total[7d]))\n - alert: MigrationStalled\n expr: migration:legacy_share:ratio_7d >= migration:legacy_share:ratio_7d offset 30d\n labels: { severity: ticket }\n annotations:\n summary: \"Legacy share has not fallen in 30 days; it must reach 0 within {{MIGRATION_MONTHS}} months\"\n```",
|
|
894
|
+
"hubWhen": {
|
|
895
|
+
"MIGRATION": [
|
|
896
|
+
"strangler"
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
],
|
|
901
|
+
"relations": [
|
|
902
|
+
{
|
|
903
|
+
"id": "req-inventory--derives--need",
|
|
904
|
+
"sourceId": "req-inventory",
|
|
905
|
+
"targetId": "need",
|
|
906
|
+
"relationType": "derives"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"id": "req-revisit--derives--need",
|
|
910
|
+
"sourceId": "req-revisit",
|
|
911
|
+
"targetId": "need",
|
|
912
|
+
"relationType": "derives"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"id": "req-build--derives--need",
|
|
916
|
+
"sourceId": "req-build",
|
|
917
|
+
"targetId": "need",
|
|
918
|
+
"relationType": "derives"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"id": "req-modules--derives--need",
|
|
922
|
+
"sourceId": "req-modules",
|
|
923
|
+
"targetId": "need",
|
|
924
|
+
"relationType": "derives"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"id": "req-independent--derives--need",
|
|
928
|
+
"sourceId": "req-independent",
|
|
929
|
+
"targetId": "need",
|
|
930
|
+
"relationType": "derives"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"id": "req-owners--derives--need",
|
|
934
|
+
"sourceId": "req-owners",
|
|
935
|
+
"targetId": "need",
|
|
936
|
+
"relationType": "derives"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"id": "req-functions--derives--need",
|
|
940
|
+
"sourceId": "req-functions",
|
|
941
|
+
"targetId": "need",
|
|
942
|
+
"relationType": "derives"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"id": "req-own-data--derives--need",
|
|
946
|
+
"sourceId": "req-own-data",
|
|
947
|
+
"targetId": "need",
|
|
948
|
+
"relationType": "derives"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"id": "req-schemas--derives--need",
|
|
952
|
+
"sourceId": "req-schemas",
|
|
953
|
+
"targetId": "need",
|
|
954
|
+
"relationType": "derives"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"id": "req-shared--derives--need",
|
|
958
|
+
"sourceId": "req-shared",
|
|
959
|
+
"targetId": "need",
|
|
960
|
+
"relationType": "derives"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"id": "req-contexts--derives--need",
|
|
964
|
+
"sourceId": "req-contexts",
|
|
965
|
+
"targetId": "need",
|
|
966
|
+
"relationType": "derives"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"id": "req-team-changes--derives--need",
|
|
970
|
+
"sourceId": "req-team-changes",
|
|
971
|
+
"targetId": "need",
|
|
972
|
+
"relationType": "derives"
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
"id": "req-split-need--derives--need",
|
|
976
|
+
"sourceId": "req-split-need",
|
|
977
|
+
"targetId": "need",
|
|
978
|
+
"relationType": "derives"
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"id": "req-strangler--derives--need",
|
|
982
|
+
"sourceId": "req-strangler",
|
|
983
|
+
"targetId": "need",
|
|
984
|
+
"relationType": "derives"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"id": "sc-inventory--verifies--req-inventory",
|
|
988
|
+
"sourceId": "sc-inventory",
|
|
989
|
+
"targetId": "req-inventory",
|
|
990
|
+
"relationType": "verifies"
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"id": "sc-revisit--verifies--req-revisit",
|
|
994
|
+
"sourceId": "sc-revisit",
|
|
995
|
+
"targetId": "req-revisit",
|
|
996
|
+
"relationType": "verifies"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"id": "sc-build--verifies--req-build",
|
|
1000
|
+
"sourceId": "sc-build",
|
|
1001
|
+
"targetId": "req-build",
|
|
1002
|
+
"relationType": "verifies"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"id": "sc-modules--verifies--req-modules",
|
|
1006
|
+
"sourceId": "sc-modules",
|
|
1007
|
+
"targetId": "req-modules",
|
|
1008
|
+
"relationType": "verifies"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"id": "sc-independent--verifies--req-independent",
|
|
1012
|
+
"sourceId": "sc-independent",
|
|
1013
|
+
"targetId": "req-independent",
|
|
1014
|
+
"relationType": "verifies"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"id": "sc-owners--verifies--req-owners",
|
|
1018
|
+
"sourceId": "sc-owners",
|
|
1019
|
+
"targetId": "req-owners",
|
|
1020
|
+
"relationType": "verifies"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"id": "sc-functions--verifies--req-functions",
|
|
1024
|
+
"sourceId": "sc-functions",
|
|
1025
|
+
"targetId": "req-functions",
|
|
1026
|
+
"relationType": "verifies"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"id": "sc-own-data--verifies--req-own-data",
|
|
1030
|
+
"sourceId": "sc-own-data",
|
|
1031
|
+
"targetId": "req-own-data",
|
|
1032
|
+
"relationType": "verifies"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"id": "sc-schemas--verifies--req-schemas",
|
|
1036
|
+
"sourceId": "sc-schemas",
|
|
1037
|
+
"targetId": "req-schemas",
|
|
1038
|
+
"relationType": "verifies"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"id": "sc-shared--verifies--req-shared",
|
|
1042
|
+
"sourceId": "sc-shared",
|
|
1043
|
+
"targetId": "req-shared",
|
|
1044
|
+
"relationType": "verifies"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"id": "sc-contexts--verifies--req-contexts",
|
|
1048
|
+
"sourceId": "sc-contexts",
|
|
1049
|
+
"targetId": "req-contexts",
|
|
1050
|
+
"relationType": "verifies"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"id": "sc-team-changes--verifies--req-team-changes",
|
|
1054
|
+
"sourceId": "sc-team-changes",
|
|
1055
|
+
"targetId": "req-team-changes",
|
|
1056
|
+
"relationType": "verifies"
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"id": "sc-split-need--verifies--req-split-need",
|
|
1060
|
+
"sourceId": "sc-split-need",
|
|
1061
|
+
"targetId": "req-split-need",
|
|
1062
|
+
"relationType": "verifies"
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"id": "sc-strangler--verifies--req-strangler",
|
|
1066
|
+
"sourceId": "sc-strangler",
|
|
1067
|
+
"targetId": "req-strangler",
|
|
1068
|
+
"relationType": "verifies"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"id": "ff-build-time--implements--adr-monolith",
|
|
1072
|
+
"sourceId": "ff-build-time",
|
|
1073
|
+
"targetId": "adr-monolith",
|
|
1074
|
+
"relationType": "implements"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"id": "ff-build-time--implements--adr-modular-monolith",
|
|
1078
|
+
"sourceId": "ff-build-time",
|
|
1079
|
+
"targetId": "adr-modular-monolith",
|
|
1080
|
+
"relationType": "implements"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"id": "ff-module-alone--implements--adr-modular-monolith",
|
|
1084
|
+
"sourceId": "ff-module-alone",
|
|
1085
|
+
"targetId": "adr-modular-monolith",
|
|
1086
|
+
"relationType": "implements"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"id": "ff-can-i-deploy--implements--adr-microservices",
|
|
1090
|
+
"sourceId": "ff-can-i-deploy",
|
|
1091
|
+
"targetId": "adr-microservices",
|
|
1092
|
+
"relationType": "implements"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"id": "ff-can-i-deploy--implements--adr-serverless",
|
|
1096
|
+
"sourceId": "ff-can-i-deploy",
|
|
1097
|
+
"targetId": "adr-serverless",
|
|
1098
|
+
"relationType": "implements"
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"id": "ff-ownership--implements--adr-microservices",
|
|
1102
|
+
"sourceId": "ff-ownership",
|
|
1103
|
+
"targetId": "adr-microservices",
|
|
1104
|
+
"relationType": "implements"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"id": "ff-ownership--implements--adr-serverless",
|
|
1108
|
+
"sourceId": "ff-ownership",
|
|
1109
|
+
"targetId": "adr-serverless",
|
|
1110
|
+
"relationType": "implements"
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
"id": "ff-functions--implements--adr-serverless",
|
|
1114
|
+
"sourceId": "ff-functions",
|
|
1115
|
+
"targetId": "adr-serverless",
|
|
1116
|
+
"relationType": "implements"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"id": "ff-own-database--implements--adr-own-database",
|
|
1120
|
+
"sourceId": "ff-own-database",
|
|
1121
|
+
"targetId": "adr-own-database",
|
|
1122
|
+
"relationType": "implements"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"id": "ff-schema-grants--implements--adr-schema-per-module",
|
|
1126
|
+
"sourceId": "ff-schema-grants",
|
|
1127
|
+
"targetId": "adr-schema-per-module",
|
|
1128
|
+
"relationType": "implements"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"id": "ff-table-writers--implements--adr-shared-schema",
|
|
1132
|
+
"sourceId": "ff-table-writers",
|
|
1133
|
+
"targetId": "adr-shared-schema",
|
|
1134
|
+
"relationType": "implements"
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"id": "ff-legacy-share--implements--adr-strangler",
|
|
1138
|
+
"sourceId": "ff-legacy-share",
|
|
1139
|
+
"targetId": "adr-strangler",
|
|
1140
|
+
"relationType": "implements"
|
|
1141
|
+
}
|
|
1142
|
+
]
|
|
1143
|
+
}
|