@radicaltools/cli 0.6.1 → 0.6.2
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/dist/{chunk-SBQRTX3Y.js → chunk-5EK2V6G3.js} +1 -1
- package/dist/{dist-LSHMW73I.js → dist-BJQ35APN.js} +2 -2
- package/dist/hub-catalogue/concern/concern-accessibility.radical +85 -1
- package/dist/hub-catalogue/concern/concern-api-collections.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-errors.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-idempotency.radical +121 -3
- package/dist/hub-catalogue/concern/concern-api-resource-design.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-style-guide.radical +78 -1
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +83 -7
- package/dist/hub-catalogue/concern/concern-audit-trail.radical +77 -1
- package/dist/hub-catalogue/concern/concern-authentication.radical +178 -8
- package/dist/hub-catalogue/concern/concern-authorization.radical +133 -7
- package/dist/hub-catalogue/concern/concern-availability.radical +156 -6
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +71 -8
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +136 -6
- package/dist/hub-catalogue/concern/concern-caching.radical +73 -1
- package/dist/hub-catalogue/concern/concern-capacity.radical +124 -5
- package/dist/hub-catalogue/concern/concern-ci-cd-pipeline.radical +154 -15
- package/dist/hub-catalogue/concern/concern-code-documentation.radical +131 -13
- package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +116 -7
- package/dist/hub-catalogue/concern/concern-code-review-branching.radical +174 -13
- package/dist/hub-catalogue/concern/concern-code-style.radical +148 -16
- package/dist/hub-catalogue/concern/concern-communication-style.radical +94 -7
- package/dist/hub-catalogue/concern/concern-data-classification.radical +77 -1
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +87 -5
- package/dist/hub-catalogue/concern/concern-data-store.radical +87 -5
- package/dist/hub-catalogue/concern/concern-decomposition.radical +78 -1
- package/dist/hub-catalogue/concern/concern-definition-of-done.radical +150 -11
- package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +130 -5
- package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +127 -10
- package/dist/hub-catalogue/concern/concern-deployment.radical +113 -9
- package/dist/hub-catalogue/concern/concern-encryption.radical +146 -5
- package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +118 -12
- package/dist/hub-catalogue/concern/concern-eu-dora.radical +69 -1
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +148 -9
- package/dist/hub-catalogue/concern/concern-incident-management.radical +122 -1
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +54 -1
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +110 -5
- package/dist/hub-catalogue/concern/concern-messaging.radical +89 -2
- package/dist/hub-catalogue/concern/concern-mobile-performance.radical +67 -1
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +92 -5
- package/dist/hub-catalogue/concern/concern-observability.radical +105 -1
- package/dist/hub-catalogue/concern/concern-operational-readiness.radical +140 -5
- package/dist/hub-catalogue/concern/concern-personal-data.radical +206 -7
- package/dist/hub-catalogue/concern/concern-quality-priorities.radical +104 -12
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +110 -1
- package/dist/hub-catalogue/concern/concern-release-versioning.radical +99 -7
- package/dist/hub-catalogue/concern/concern-retention.radical +130 -9
- package/dist/hub-catalogue/concern/concern-secrets.radical +196 -12
- package/dist/hub-catalogue/concern/concern-secure-coding.radical +122 -1
- package/dist/hub-catalogue/concern/concern-secure-development.radical +118 -1
- package/dist/hub-catalogue/concern/concern-security-detection.radical +124 -1
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +116 -1
- package/dist/hub-catalogue/concern/concern-technical-debt.radical +162 -19
- package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +152 -18
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +111 -1
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +83 -7
- package/dist/hub-catalogue/concern/concern-threat-modelling.radical +120 -1
- package/dist/hub-catalogue/concern/concern-usability.radical +84 -5
- package/dist/index.js +68 -18
- package/dist/{pdfjs-WWNLOMK2.js → pdfjs-4U3YUAVN.js} +1 -1
- package/dist/{undici-53QU2XSN.js → undici-7IHHEPSO.js} +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,84 @@
|
|
|
18
18
|
"trigger": "LIST RELATIONS WHERE (source.type = \"container\" OR source.type = \"component\" OR source.type = \"webapp\" OR source.type = \"system\") AND source.external != true AND (target.type = \"database\" OR target.type = \"queue\") AND target.external != true",
|
|
19
19
|
"applyTo": "source",
|
|
20
20
|
"why": "these elements write to stores or queues, so how an operation that changes several records stays consistent, and what readers may see meanwhile, has to be decided.",
|
|
21
|
-
"group": "architecture"
|
|
21
|
+
"group": "architecture",
|
|
22
|
+
"scope": {
|
|
23
|
+
"group": "architecture",
|
|
24
|
+
"questions": [
|
|
25
|
+
{
|
|
26
|
+
"key": "TEAMS",
|
|
27
|
+
"label": "How many teams build it?",
|
|
28
|
+
"default": "one",
|
|
29
|
+
"hint": "Several teams need the system cut into parts each can own and change alone.",
|
|
30
|
+
"options": [
|
|
31
|
+
{
|
|
32
|
+
"value": "one",
|
|
33
|
+
"label": "one team or fewer",
|
|
34
|
+
"description": "One person or one team builds all of it."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"value": "several",
|
|
38
|
+
"label": "several teams",
|
|
39
|
+
"description": "Several teams each own parts of it."
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"key": "SCALE",
|
|
45
|
+
"label": "How large is it?",
|
|
46
|
+
"default": "small",
|
|
47
|
+
"hint": "Caches, queues and split services pay for themselves only at some scale.",
|
|
48
|
+
"options": [
|
|
49
|
+
{
|
|
50
|
+
"value": "small",
|
|
51
|
+
"label": "small",
|
|
52
|
+
"description": "One site or one team's users; up to some thousands of users or requests a day."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"value": "medium",
|
|
56
|
+
"label": "medium",
|
|
57
|
+
"description": "Several sites or a region; tens of thousands of users a day, or peaks it must be sized for."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"value": "large",
|
|
61
|
+
"label": "large",
|
|
62
|
+
"description": "Hundreds of thousands of users or more, several regions, load that scales out and back."
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"key": "INTEGRATIONS",
|
|
68
|
+
"label": "How many other systems does it depend on?",
|
|
69
|
+
"default": "few",
|
|
70
|
+
"hint": "Every system it calls can be slow or down; many of them need resilience patterns.",
|
|
71
|
+
"options": [
|
|
72
|
+
{
|
|
73
|
+
"value": "few",
|
|
74
|
+
"label": "a few",
|
|
75
|
+
"description": "Up to two or three external systems (a payment provider, an e-mail service)."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"value": "many",
|
|
79
|
+
"label": "many",
|
|
80
|
+
"description": "Many external or internal systems it calls or exchanges data with."
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"when": [
|
|
86
|
+
{
|
|
87
|
+
"SCALE": [
|
|
88
|
+
"medium",
|
|
89
|
+
"large"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"TEAMS": [
|
|
94
|
+
"several"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
22
99
|
},
|
|
23
100
|
"sources": [
|
|
24
101
|
{
|
|
@@ -117,7 +194,12 @@
|
|
|
117
194
|
"label": "replicas with bounded staleness",
|
|
118
195
|
"description": "Reads may be a few seconds old, never more than a stated bound, and decisions that write are taken on the primary. Pick it for catalogues, dashboards and feeds where a few seconds do not matter."
|
|
119
196
|
}
|
|
120
|
-
]
|
|
197
|
+
],
|
|
198
|
+
"scopeWhen": {
|
|
199
|
+
"SCALE": [
|
|
200
|
+
"large"
|
|
201
|
+
]
|
|
202
|
+
}
|
|
121
203
|
},
|
|
122
204
|
{
|
|
123
205
|
"key": "PROPAGATION_SECONDS",
|
|
@@ -463,7 +545,7 @@
|
|
|
463
545
|
"status": "accepted",
|
|
464
546
|
"date": "",
|
|
465
547
|
"context": "This element writes to stores and queues, and one business operation often changes several records, sometimes in several stores or services. The forces: a crash between two writes leaves half an operation behind; writing to a database and then to a broker (a dual write) loses or invents events when either fails; concurrent transactions at the default isolation level lose updates and break invariants that span rows; brokers deliver at least once, so every message may come twice; replicas and caches lag, so a user may not see what they just saved; and when several elements write the same data, nobody knows which copy is the truth.",
|
|
466
|
-
"decision": "Each business operation runs in one database transaction (PostgreSQL, MySQL InnoDB or SQL Server), opened and committed by one unit of work at the application's edge: Spring @Transactional, EF Core SaveChanges, Prisma $transaction or a hand-written withTransaction. No call to another service or broker happens inside it. Isolation: {{ISOLATION}}.
|
|
548
|
+
"decision": "Each business operation runs in one database transaction (PostgreSQL, MySQL InnoDB or SQL Server), opened and committed by one unit of work at the application's edge: Spring @Transactional, EF Core SaveChanges, Prisma $transaction or a hand-written withTransaction. No call to another service or broker happens inside it. Isolation: {{ISOLATION}}. Which element writes each table is decided in the Decomposition pack. Rules that span rows are database constraints where SQL can state them.",
|
|
467
549
|
"consequences": "• All-or-nothing comes from the database, with no extra machinery.\n• Every record the operation changes must stay in that database: splitting it into services later means revisiting this decision.\n• Long transactions hold locks: work that is slow or calls out happens before or after, not inside.\n• Nothing outside the database learns of the change atomically; once events are needed, an outbox is.",
|
|
468
550
|
"alternatives": "1. A transactional outbox: the same transaction plus reliable events for others.\n2. A saga: when the data is spread over services.\n3. Distributed transactions (XA, two-phase commit): atomic across stores, but blocking, rarely supported by brokers and cloud services.",
|
|
469
551
|
"hubWhen": {
|
|
@@ -482,7 +564,7 @@
|
|
|
482
564
|
"status": "accepted",
|
|
483
565
|
"date": "",
|
|
484
566
|
"context": "This element writes to stores and queues, and one business operation often changes several records, sometimes in several stores or services. The forces: a crash between two writes leaves half an operation behind; writing to a database and then to a broker (a dual write) loses or invents events when either fails; concurrent transactions at the default isolation level lose updates and break invariants that span rows; brokers deliver at least once, so every message may come twice; replicas and caches lag, so a user may not see what they just saved; and when several elements write the same data, nobody knows which copy is the truth.",
|
|
485
|
-
"decision": "State changes and the events that announce them are written in one local transaction: the event goes to an outbox table, and a relay publishes it to the broker within {{PROPAGATION_SECONDS}} seconds, then marks it sent. The relay is change data capture with Debezium (its outbox event router) when Kafka Connect is already run, otherwise a polling publisher, or the framework's outbox (Spring Modulith event publication registry, MassTransit or NServiceBus outbox). Nothing publishes to the broker directly. Delivery is at least once; consumers absorb duplicates as decided in the Messaging pack. Isolation: {{ISOLATION}}.
|
|
567
|
+
"decision": "State changes and the events that announce them are written in one local transaction: the event goes to an outbox table, and a relay publishes it to the broker within {{PROPAGATION_SECONDS}} seconds, then marks it sent. The relay is change data capture with Debezium (its outbox event router) when Kafka Connect is already run, otherwise a polling publisher, or the framework's outbox (Spring Modulith event publication registry, MassTransit or NServiceBus outbox). Nothing publishes to the broker directly. Delivery is at least once; consumers absorb duplicates as decided in the Messaging pack. Isolation: {{ISOLATION}}. Which element writes each table is decided in the Decomposition pack.",
|
|
486
568
|
"consequences": "• No lost or invented events: an event exists if and only if its change committed.\n• Delivery is at least once, so every consumer must be idempotent (the Messaging pack decides how).\n• Others see the change up to {{PROPAGATION_SECONDS}} seconds later; the relay's lag must be watched.\n• The outbox table needs cleaning up, and event order holds only per aggregate key.",
|
|
487
569
|
"alternatives": "1. Publish after commit (dual write): simpler, but a crash between commit and publish loses the event.\n2. Event sourcing: the events are the state, which removes the dual write but changes the whole persistence model.\n3. Two-phase commit between database and broker: blocking and seldom supported.",
|
|
488
570
|
"hubWhen": {
|
|
@@ -501,7 +583,7 @@
|
|
|
501
583
|
"status": "accepted",
|
|
502
584
|
"date": "",
|
|
503
585
|
"context": "This element writes to stores and queues, and one business operation often changes several records, sometimes in several stores or services. The forces: a crash between two writes leaves half an operation behind; writing to a database and then to a broker (a dual write) loses or invents events when either fails; concurrent transactions at the default isolation level lose updates and break invariants that span rows; brokers deliver at least once, so every message may come twice; replicas and caches lag, so a user may not see what they just saved; and when several elements write the same data, nobody knows which copy is the truth.",
|
|
504
|
-
"decision": "An operation that changes data in several services runs as an orchestrated saga: each step a local transaction in its own service, each with a compensating step, the saga's state durable so it resumes after a restart. The orchestrator is Temporal, AWS Step Functions, Camunda 8 or MassTransit state machines: Temporal when the team writes workflows in code and runs it itself or on Temporal Cloud, Step Functions on AWS for few steps and managed operation, Camunda when business owners read and change BPMN. Choreography by events only for two or three steps. Records the saga changes stay pending until it completes; a saga not done within {{SAGA_MINUTES}} minutes is compensated. The orchestrator calls each step over its own durable queue; each step's own state change and the events it emits go through that service's transactional outbox, and consumers absorb duplicates as decided in the Messaging pack. Isolation of each local transaction: {{ISOLATION}}.
|
|
586
|
+
"decision": "An operation that changes data in several services runs as an orchestrated saga: each step a local transaction in its own service, each with a compensating step, the saga's state durable so it resumes after a restart. The orchestrator is Temporal, AWS Step Functions, Camunda 8 or MassTransit state machines: Temporal when the team writes workflows in code and runs it itself or on Temporal Cloud, Step Functions on AWS for few steps and managed operation, Camunda when business owners read and change BPMN. Choreography by events only for two or three steps. Records the saga changes stay pending until it completes; a saga not done within {{SAGA_MINUTES}} minutes is compensated. The orchestrator calls each step over its own durable queue; each step's own state change and the events it emits go through that service's transactional outbox, and consumers absorb duplicates as decided in the Messaging pack. Isolation of each local transaction: {{ISOLATION}}. Which element writes each table is decided in the Decomposition pack.",
|
|
505
587
|
"consequences": "• Each service keeps its own database and its own transactions.\n• No isolation between sagas: others see pending states, and the design has to say what they may do with them.\n• Every step needs a compensating step that cannot fail for good, which is real design work (refunds, releases, cancellation notices).\n• An orchestrator is one more system to run and to keep available.",
|
|
506
588
|
"alternatives": "1. Put the data in one database and use one transaction: simpler, if the service boundaries allow.\n2. Distributed transactions (XA, two-phase commit): atomic but blocking, and rarely available across services and SaaS APIs.\n3. Choreography without an orchestrator: no central component, but the flow is hard to see and to change past three steps.",
|
|
507
589
|
"hubWhen": {
|
|
@@ -19,7 +19,60 @@
|
|
|
19
19
|
"id": "data-store",
|
|
20
20
|
"trigger": "LIST NODES WHERE type = \"database\" AND external != true",
|
|
21
21
|
"why": "these elements keep the system's data, so the kind of store, the product, who runs it and how its schema changes have to be decided.",
|
|
22
|
-
"group": "technology"
|
|
22
|
+
"group": "technology",
|
|
23
|
+
"scope": {
|
|
24
|
+
"group": "technology",
|
|
25
|
+
"questions": [
|
|
26
|
+
{
|
|
27
|
+
"key": "STANDARDS",
|
|
28
|
+
"label": "Does the organisation keep technology standards?",
|
|
29
|
+
"default": "no",
|
|
30
|
+
"hint": "A tech radar records which technologies to adopt, try, hold or retire.",
|
|
31
|
+
"options": [
|
|
32
|
+
{
|
|
33
|
+
"value": "no",
|
|
34
|
+
"label": "no",
|
|
35
|
+
"description": "Each system picks its own technologies."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"value": "yes",
|
|
39
|
+
"label": "yes",
|
|
40
|
+
"description": "The organisation keeps technology standards or a tech radar that systems follow."
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "TEAMS",
|
|
46
|
+
"label": "How many teams choose technology?",
|
|
47
|
+
"default": "one",
|
|
48
|
+
"hint": "Several teams choosing alone end up with many stacks to keep up.",
|
|
49
|
+
"options": [
|
|
50
|
+
{
|
|
51
|
+
"value": "one",
|
|
52
|
+
"label": "one team",
|
|
53
|
+
"description": "One team chooses for the whole system."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": "several",
|
|
57
|
+
"label": "several teams",
|
|
58
|
+
"description": "Several teams each choose for their parts."
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"when": [
|
|
64
|
+
{
|
|
65
|
+
"STANDARDS": [
|
|
66
|
+
"yes"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"TEAMS": [
|
|
71
|
+
"several"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
23
76
|
},
|
|
24
77
|
"sources": [
|
|
25
78
|
{
|
|
@@ -124,7 +177,12 @@
|
|
|
124
177
|
"label": "self-hosted by us",
|
|
125
178
|
"description": "We run the engine on our Kubernetes (CloudNativePG, Percona or MongoDB operators) or virtual machines (Patroni). Pick it when data must stay on premises, a provider is ruled out, or the scale makes a managed service too costly, and people with the skills are on call. With a key-value store this means Redis or Valkey, not DynamoDB."
|
|
126
179
|
}
|
|
127
|
-
]
|
|
180
|
+
],
|
|
181
|
+
"scopeWhen": {
|
|
182
|
+
"STANDARDS": [
|
|
183
|
+
"yes"
|
|
184
|
+
]
|
|
185
|
+
}
|
|
128
186
|
},
|
|
129
187
|
{
|
|
130
188
|
"key": "MIGRATIONS",
|
|
@@ -203,6 +261,10 @@
|
|
|
203
261
|
"MODEL": [
|
|
204
262
|
"relational",
|
|
205
263
|
"document"
|
|
264
|
+
],
|
|
265
|
+
"HOSTING": [
|
|
266
|
+
"managed",
|
|
267
|
+
"self"
|
|
206
268
|
]
|
|
207
269
|
}
|
|
208
270
|
},
|
|
@@ -339,6 +401,10 @@
|
|
|
339
401
|
"hubWhen": {
|
|
340
402
|
"CONSISTENCY": [
|
|
341
403
|
"eventual"
|
|
404
|
+
],
|
|
405
|
+
"HOSTING": [
|
|
406
|
+
"managed",
|
|
407
|
+
"self"
|
|
342
408
|
]
|
|
343
409
|
}
|
|
344
410
|
},
|
|
@@ -401,6 +467,10 @@
|
|
|
401
467
|
"MODEL": [
|
|
402
468
|
"relational",
|
|
403
469
|
"document"
|
|
470
|
+
],
|
|
471
|
+
"HOSTING": [
|
|
472
|
+
"managed",
|
|
473
|
+
"self"
|
|
404
474
|
]
|
|
405
475
|
}
|
|
406
476
|
},
|
|
@@ -532,6 +602,10 @@
|
|
|
532
602
|
"hubWhen": {
|
|
533
603
|
"CONSISTENCY": [
|
|
534
604
|
"eventual"
|
|
605
|
+
],
|
|
606
|
+
"HOSTING": [
|
|
607
|
+
"managed",
|
|
608
|
+
"self"
|
|
535
609
|
]
|
|
536
610
|
}
|
|
537
611
|
},
|
|
@@ -575,7 +649,7 @@
|
|
|
575
649
|
"status": "accepted",
|
|
576
650
|
"date": "",
|
|
577
651
|
"context": "This element keeps the system's data, and the store chosen for it outlives most of the code around it: data is far harder to move than code. The forces: the way the data is queried (ad hoc and across entities, whole aggregates by id, or a few known lookups at very high volume) favours different data models; some operations must never be seen half done, while others can accept reading slightly old data in exchange for scale and availability; a managed service takes patching, failover and backups off the team but adds a provider, its limits and its bill, while self-hosting needs people who can run the engine at three in the morning; and the schema will change many times while the system is live, so every change has to be repeatable and safe for the code version still running. Backup and recovery is its own concern; whether a change ships as expand and contract or in a window is decided in the Deployment and rollback pack.",
|
|
578
|
-
"decision": "The data is kept in a relational database: PostgreSQL by default, MySQL where the team or platform already runs it. Consistency: {{CONSISTENCY}}; where it is eventual, reads are at most {{STALE_SECONDS}} seconds old.
|
|
652
|
+
"decision": "The data is kept in a relational database: PostgreSQL by default, MySQL where the team or platform already runs it. Consistency: {{CONSISTENCY}}; where it is eventual, reads are at most {{STALE_SECONDS}} seconds old. Schema changes: {{MIGRATIONS}}; whether a change ships as expand and contract or in a window, and how migrations are linted for it, is decided in the Deployment and rollback pack. Constraints, not only code, enforce the invariants; JSONB columns hold the parts whose shape varies. Choosing PostgreSQL or MySQL: PostgreSQL for richer types (JSONB, arrays, ranges), extensions (PostGIS, pgvector) and transactional DDL; MySQL when existing operations know it. Choosing managed or self-hosted: managed unless data residency, cost at scale or an on-premises platform rules it out.",
|
|
579
653
|
"consequences": "• Any query can be written later, including the reports and back-office searches nobody listed today.\n• Transactions and constraints keep the data consistent across entities without application code.\n• Scaling writes past one primary needs partitioning, sharding (Citus, Vitess) or a different store for the hot path.\n• Every schema change is a migration, planned with the code version still running.",
|
|
580
654
|
"alternatives": "1. A document database: aggregates read whole and flexible shapes, at the cost of joins and cross-document constraints.\n2. A key-value store: scale and latency for known lookups, no ad hoc queries.\n3. A distributed SQL database (CockroachDB, YugabyteDB, Spanner): relational with horizontal write scale, more cost and latency per write.",
|
|
581
655
|
"hubWhen": {
|
|
@@ -594,7 +668,7 @@
|
|
|
594
668
|
"status": "accepted",
|
|
595
669
|
"date": "",
|
|
596
670
|
"context": "This element keeps the system's data, and the store chosen for it outlives most of the code around it: data is far harder to move than code. The forces: the way the data is queried (ad hoc and across entities, whole aggregates by id, or a few known lookups at very high volume) favours different data models; some operations must never be seen half done, while others can accept reading slightly old data in exchange for scale and availability; a managed service takes patching, failover and backups off the team but adds a provider, its limits and its bill, while self-hosting needs people who can run the engine at three in the morning; and the schema will change many times while the system is live, so every change has to be repeatable and safe for the code version still running. Backup and recovery is its own concern; whether a change ships as expand and contract or in a window is decided in the Deployment and rollback pack.",
|
|
597
|
-
"decision": "The data is kept in a document database, MongoDB, one document per aggregate, with a JSON Schema validator on every collection. Consistency: {{CONSISTENCY}} (majority write concern; reads from the primary or with majority read concern where it must be strong); where it is eventual, secondaries serve reads at most {{STALE_SECONDS}} seconds old.
|
|
671
|
+
"decision": "The data is kept in a document database, MongoDB, one document per aggregate, with a JSON Schema validator on every collection. Consistency: {{CONSISTENCY}} (majority write concern; reads from the primary or with majority read concern where it must be strong); where it is eventual, secondaries serve reads at most {{STALE_SECONDS}} seconds old. Schema changes: {{MIGRATIONS}}; whether a change ships as expand and contract or in a window is decided in the Deployment and rollback pack. References between aggregates by id; multi-document transactions only where one operation must change two aggregates. Choosing MongoDB or a PostgreSQL JSONB column: MongoDB when most data is documents and scale-out by sharding is likely; JSONB when only a part of a mostly relational model varies in shape. Amazon DocumentDB or Azure Cosmos DB for MongoDB only after checking the features you need are compatible.",
|
|
598
672
|
"consequences": "• An aggregate is read and written in one operation, with no mapping to tables.\n• Shapes can vary between records, and the validator still stops malformed writes.\n• Joins and constraints across documents are the application's job; queries not planned for need new indexes or pipelines.\n• Data duplicated across documents for read speed must be kept in step by code.",
|
|
599
673
|
"alternatives": "1. A relational database with JSONB columns: constraints and joins with flexible parts.\n2. A key-value store: simpler and faster for lookups by key, no queries on content.\n3. A search engine (OpenSearch) as the main store: great for text search, weak as a system of record.",
|
|
600
674
|
"hubWhen": {
|
|
@@ -613,7 +687,7 @@
|
|
|
613
687
|
"status": "accepted",
|
|
614
688
|
"date": "",
|
|
615
689
|
"context": "This element keeps the system's data, and the store chosen for it outlives most of the code around it: data is far harder to move than code. The forces: the way the data is queried (ad hoc and across entities, whole aggregates by id, or a few known lookups at very high volume) favours different data models; some operations must never be seen half done, while others can accept reading slightly old data in exchange for scale and availability; a managed service takes patching, failover and backups off the team but adds a provider, its limits and its bill, while self-hosting needs people who can run the engine at three in the morning; and the schema will change many times while the system is live, so every change has to be repeatable and safe for the code version still running. Backup and recovery is its own concern; whether a change ships as expand and contract or in a window is decided in the Deployment and rollback pack.",
|
|
616
|
-
"decision": "The data is kept in a key-value store designed from its access patterns: Amazon DynamoDB (single-table design, keys and global secondary indexes per listed access pattern, on-demand or provisioned capacity) for durable data on AWS; Redis (or Valkey) with persistence only for small, short-lived or rebuildable data such as sessions, counters and rate limits. Key reads and writes answer within {{P99_MS}} ms at the 99th percentile, measured by the store. Consistency: {{CONSISTENCY}} (DynamoDB strongly consistent reads and TransactWriteItems where it must be strong); where it is eventual, replicas and global tables lag at most {{STALE_SECONDS}} seconds.
|
|
690
|
+
"decision": "The data is kept in a key-value store designed from its access patterns: Amazon DynamoDB (single-table design, keys and global secondary indexes per listed access pattern, on-demand or provisioned capacity) for durable data on AWS; Redis (or Valkey) with persistence only for small, short-lived or rebuildable data such as sessions, counters and rate limits. Key reads and writes answer within {{P99_MS}} ms at the 99th percentile, measured by the store. Consistency: {{CONSISTENCY}} (DynamoDB strongly consistent reads and TransactWriteItems where it must be strong); where it is eventual, replicas and global tables lag at most {{STALE_SECONDS}} seconds. Schema changes: tables and indexes are infrastructure code applied by the pipeline; item shapes carry a schema version and old items are upgraded in code when read. No Scan on a request path. Choosing DynamoDB or Redis: DynamoDB when the data must survive and grow without limit; Redis when it fits in memory and losing the last second is acceptable. Outside AWS: Azure Cosmos DB or Google Bigtable play DynamoDB's part.",
|
|
617
691
|
"consequences": "• Single-digit-millisecond latency at any scale, with capacity that scales without re-architecture.\n• Every query must be designed up front; a new access pattern means a new index or a backfill.\n• No joins and limited transactions; reports and analytics go to an export (DynamoDB to S3, Athena) rather than the store.\n• DynamoDB ties the element to AWS; the item and transaction limits shape the design.",
|
|
618
692
|
"alternatives": "1. A relational database: any query, transactions and constraints, with less headroom for scale.\n2. A document database: richer queries on content, more operational work.\n3. A cache in front of a relational database: keeps queries flexible and lookups fast, adds invalidation.",
|
|
619
693
|
"hubWhen": {
|
|
@@ -742,6 +816,10 @@
|
|
|
742
816
|
"hubWhen": {
|
|
743
817
|
"MODEL": [
|
|
744
818
|
"relational"
|
|
819
|
+
],
|
|
820
|
+
"HOSTING": [
|
|
821
|
+
"managed",
|
|
822
|
+
"self"
|
|
745
823
|
]
|
|
746
824
|
}
|
|
747
825
|
},
|
|
@@ -870,6 +948,10 @@
|
|
|
870
948
|
],
|
|
871
949
|
"MODEL": [
|
|
872
950
|
"relational"
|
|
951
|
+
],
|
|
952
|
+
"HOSTING": [
|
|
953
|
+
"managed",
|
|
954
|
+
"self"
|
|
873
955
|
]
|
|
874
956
|
}
|
|
875
957
|
},
|
|
@@ -19,7 +19,84 @@
|
|
|
19
19
|
"id": "decomposition",
|
|
20
20
|
"trigger": "LIST NODES WHERE type = \"system\" AND external != true",
|
|
21
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"
|
|
22
|
+
"group": "architecture",
|
|
23
|
+
"scope": {
|
|
24
|
+
"group": "architecture",
|
|
25
|
+
"questions": [
|
|
26
|
+
{
|
|
27
|
+
"key": "TEAMS",
|
|
28
|
+
"label": "How many teams build it?",
|
|
29
|
+
"default": "one",
|
|
30
|
+
"hint": "Several teams need the system cut into parts each can own and change alone.",
|
|
31
|
+
"options": [
|
|
32
|
+
{
|
|
33
|
+
"value": "one",
|
|
34
|
+
"label": "one team or fewer",
|
|
35
|
+
"description": "One person or one team builds all of it."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"value": "several",
|
|
39
|
+
"label": "several teams",
|
|
40
|
+
"description": "Several teams each own parts of it."
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "SCALE",
|
|
46
|
+
"label": "How large is it?",
|
|
47
|
+
"default": "small",
|
|
48
|
+
"hint": "Caches, queues and split services pay for themselves only at some scale.",
|
|
49
|
+
"options": [
|
|
50
|
+
{
|
|
51
|
+
"value": "small",
|
|
52
|
+
"label": "small",
|
|
53
|
+
"description": "One site or one team's users; up to some thousands of users or requests a day."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": "medium",
|
|
57
|
+
"label": "medium",
|
|
58
|
+
"description": "Several sites or a region; tens of thousands of users a day, or peaks it must be sized for."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"value": "large",
|
|
62
|
+
"label": "large",
|
|
63
|
+
"description": "Hundreds of thousands of users or more, several regions, load that scales out and back."
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"key": "INTEGRATIONS",
|
|
69
|
+
"label": "How many other systems does it depend on?",
|
|
70
|
+
"default": "few",
|
|
71
|
+
"hint": "Every system it calls can be slow or down; many of them need resilience patterns.",
|
|
72
|
+
"options": [
|
|
73
|
+
{
|
|
74
|
+
"value": "few",
|
|
75
|
+
"label": "a few",
|
|
76
|
+
"description": "Up to two or three external systems (a payment provider, an e-mail service)."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"value": "many",
|
|
80
|
+
"label": "many",
|
|
81
|
+
"description": "Many external or internal systems it calls or exchanges data with."
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"when": [
|
|
87
|
+
{
|
|
88
|
+
"SCALE": [
|
|
89
|
+
"medium",
|
|
90
|
+
"large"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"TEAMS": [
|
|
95
|
+
"several"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
23
100
|
},
|
|
24
101
|
"sources": [
|
|
25
102
|
{
|