631 lines
23 KiB
HTML
631 lines
23 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>VBD Diagrams - Volatility-Based Decomposition</title>
|
|
<style>
|
|
:root {
|
|
--walmart-blue: #0053e2;
|
|
--walmart-blue-light: #e6effc;
|
|
--walmart-spark: #ffc220;
|
|
--walmart-green: #2a8703;
|
|
--walmart-gray-dark: #2e2f32;
|
|
--walmart-gray-mid: #6d6e71;
|
|
--walmart-gray-light: #f5f5f5;
|
|
--walmart-red: #ea1100;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
background: white;
|
|
color: var(--walmart-gray-dark);
|
|
line-height: 1.6;
|
|
padding: 40px;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
h1 {
|
|
color: var(--walmart-blue);
|
|
border-bottom: 3px solid var(--walmart-spark);
|
|
padding-bottom: 10px;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
h2 {
|
|
color: var(--walmart-blue);
|
|
margin-top: 60px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.diagram-container {
|
|
background: var(--walmart-gray-light);
|
|
border-radius: 12px;
|
|
padding: 40px;
|
|
margin: 20px 0 40px 0;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.diagram-note {
|
|
font-size: 0.9em;
|
|
color: var(--walmart-gray-mid);
|
|
font-style: italic;
|
|
margin-top: 15px;
|
|
}
|
|
|
|
/* Component Roles Diagram */
|
|
.component-diagram {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.component-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 30px;
|
|
}
|
|
|
|
.component-box {
|
|
padding: 20px 30px;
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
min-width: 180px;
|
|
font-weight: 600;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.manager {
|
|
background: var(--walmart-blue);
|
|
color: white;
|
|
}
|
|
|
|
.engine {
|
|
background: var(--walmart-spark);
|
|
color: var(--walmart-gray-dark);
|
|
}
|
|
|
|
.accessor {
|
|
background: var(--walmart-green);
|
|
color: white;
|
|
}
|
|
|
|
.utility {
|
|
background: var(--walmart-gray-mid);
|
|
color: white;
|
|
}
|
|
|
|
.arrow {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
color: var(--walmart-gray-mid);
|
|
}
|
|
|
|
.arrow-line {
|
|
width: 2px;
|
|
height: 30px;
|
|
background: var(--walmart-gray-mid);
|
|
}
|
|
|
|
.arrow-head {
|
|
width: 0;
|
|
height: 0;
|
|
border-left: 8px solid transparent;
|
|
border-right: 8px solid transparent;
|
|
border-top: 10px solid var(--walmart-gray-mid);
|
|
}
|
|
|
|
.arrow-label {
|
|
font-size: 0.75em;
|
|
color: var(--walmart-gray-mid);
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.horizontal-arrow {
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--walmart-gray-mid);
|
|
}
|
|
|
|
.h-arrow-line {
|
|
width: 40px;
|
|
height: 2px;
|
|
background: var(--walmart-gray-mid);
|
|
}
|
|
|
|
.h-arrow-head {
|
|
width: 0;
|
|
height: 0;
|
|
border-top: 8px solid transparent;
|
|
border-bottom: 8px solid transparent;
|
|
border-left: 10px solid var(--walmart-gray-mid);
|
|
}
|
|
|
|
.side-utility {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.utility-bracket {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.bracket-line {
|
|
width: 2px;
|
|
height: 100px;
|
|
background: var(--walmart-gray-mid);
|
|
position: relative;
|
|
}
|
|
|
|
.bracket-line::before,
|
|
.bracket-line::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 15px;
|
|
height: 2px;
|
|
background: var(--walmart-gray-mid);
|
|
left: 0;
|
|
}
|
|
|
|
.bracket-line::before { top: 0; }
|
|
.bracket-line::after { bottom: 0; }
|
|
|
|
/* Communication Rules */
|
|
.rules-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 15px;
|
|
margin-top: 30px;
|
|
}
|
|
|
|
.rule-card {
|
|
background: white;
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
border-left: 4px solid;
|
|
}
|
|
|
|
.rule-card.manager-rules { border-color: var(--walmart-blue); }
|
|
.rule-card.engine-rules { border-color: var(--walmart-spark); }
|
|
.rule-card.accessor-rules { border-color: var(--walmart-green); }
|
|
.rule-card.utility-rules { border-color: var(--walmart-gray-mid); }
|
|
|
|
.rule-card h4 {
|
|
margin: 0 0 10px 0;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.rule-card ul {
|
|
margin: 0;
|
|
padding-left: 18px;
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
.rule-card li {
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.must-not { color: var(--walmart-red); }
|
|
.may { color: var(--walmart-green); }
|
|
|
|
/* Sequence Flow Diagram */
|
|
.sequence-diagram {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0;
|
|
}
|
|
|
|
.sequence-row {
|
|
display: grid;
|
|
grid-template-columns: 150px 1fr 1fr 1fr 1fr;
|
|
gap: 20px;
|
|
padding: 15px 0;
|
|
border-bottom: 1px dashed #ddd;
|
|
}
|
|
|
|
.sequence-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.sequence-header {
|
|
font-weight: 700;
|
|
background: white;
|
|
padding: 10px;
|
|
border-radius: 6px;
|
|
text-align: center;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.sequence-header.manager { border: 2px solid var(--walmart-blue); color: var(--walmart-blue); }
|
|
.sequence-header.engine { border: 2px solid var(--walmart-spark); color: #996600; }
|
|
.sequence-header.accessor { border: 2px solid var(--walmart-green); color: var(--walmart-green); }
|
|
.sequence-header.utility { border: 2px solid var(--walmart-gray-mid); color: var(--walmart-gray-mid); }
|
|
|
|
.sequence-step {
|
|
font-size: 0.8em;
|
|
padding: 8px;
|
|
background: white;
|
|
border-radius: 4px;
|
|
text-align: center;
|
|
}
|
|
|
|
.step-label {
|
|
font-weight: 600;
|
|
font-size: 0.75em;
|
|
color: white;
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.step-label.s1 { background: var(--walmart-blue); }
|
|
.step-label.s2 { background: var(--walmart-spark); color: var(--walmart-gray-dark); }
|
|
.step-label.s3 { background: var(--walmart-green); }
|
|
.step-label.s4 { background: var(--walmart-gray-mid); }
|
|
.step-label.s5 { background: var(--walmart-blue); }
|
|
|
|
/* Volatility Axes Diagram */
|
|
.volatility-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 25px;
|
|
}
|
|
|
|
.volatility-card {
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 25px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
|
|
}
|
|
|
|
.volatility-card h3 {
|
|
margin: 0 0 15px 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.volatility-icon {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
.func-icon { background: var(--walmart-blue-light); }
|
|
.nonfunc-icon { background: #fff3cd; }
|
|
.cross-icon { background: #e8e8e8; }
|
|
.env-icon { background: #d4edda; }
|
|
|
|
.volatility-card p {
|
|
margin: 0 0 15px 0;
|
|
font-size: 0.9em;
|
|
color: var(--walmart-gray-mid);
|
|
}
|
|
|
|
.examples-list {
|
|
background: var(--walmart-gray-light);
|
|
padding: 12px 15px;
|
|
border-radius: 6px;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.examples-list strong {
|
|
color: var(--walmart-gray-dark);
|
|
}
|
|
|
|
.handled-by {
|
|
margin-top: 12px;
|
|
font-size: 0.8em;
|
|
padding: 8px 12px;
|
|
border-radius: 20px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.handled-by.by-engine { background: var(--walmart-spark); color: var(--walmart-gray-dark); }
|
|
.handled-by.by-accessor { background: var(--walmart-green); color: white; }
|
|
.handled-by.by-utility { background: var(--walmart-gray-mid); color: white; }
|
|
.handled-by.by-manager { background: var(--walmart-blue); color: white; }
|
|
|
|
/* Legend */
|
|
.legend {
|
|
display: flex;
|
|
gap: 20px;
|
|
justify-content: center;
|
|
margin-top: 30px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.legend-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
.legend-color {
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.footer {
|
|
margin-top: 60px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #ddd;
|
|
text-align: center;
|
|
color: var(--walmart-gray-mid);
|
|
font-size: 0.85em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>📐 Volatility-Based Decomposition Diagrams</h1>
|
|
<p>Visual reference for the VBD whitepaper by William Christopher Anderson</p>
|
|
|
|
<!-- DIAGRAM 1: Component Roles -->
|
|
<h2>1. Component Roles & Communication Rules</h2>
|
|
<div class="diagram-container">
|
|
<div class="component-diagram" style="position: relative;">
|
|
<!-- SVG just for the curved arrow -->
|
|
<svg width="500" height="100%" style="position: absolute; top: 0; right: -60px; pointer-events: none; z-index: 0;">
|
|
<defs>
|
|
<marker id="arrowhead-blue" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
|
|
<polygon points="0 0, 10 3.5, 0 7" fill="#0053e2" />
|
|
</marker>
|
|
</defs>
|
|
<!-- Manager to Resource Accessor (curved arrow on the right side) -->
|
|
<path d="M 100 40 C 180 40, 180 260, 110 315" stroke="#0053e2" stroke-width="2" fill="none" stroke-dasharray="5,3" marker-end="url(#arrowhead-blue)" />
|
|
<text x="170" y="175" fill="#0053e2" font-size="11" font-style="italic">may</text>
|
|
<text x="170" y="188" fill="#0053e2" font-size="11" font-style="italic">invoke</text>
|
|
</svg>
|
|
|
|
<!-- Component boxes stacked with inline arrows -->
|
|
<div style="display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1;">
|
|
<!-- Manager -->
|
|
<div class="component-box manager">
|
|
📋 MANAGER<br>
|
|
<small style="font-weight:400">Orchestration & Intent</small>
|
|
</div>
|
|
|
|
<!-- Arrow: Manager to Engine -->
|
|
<div class="arrow">
|
|
<div class="arrow-line"></div>
|
|
<div class="arrow-head"></div>
|
|
<span class="arrow-label">invokes</span>
|
|
</div>
|
|
|
|
<!-- Engine -->
|
|
<div class="component-box engine">
|
|
⚙️ ENGINE<br>
|
|
<small style="font-weight:400">Business Rules & Logic</small>
|
|
</div>
|
|
|
|
<!-- Arrow: Engine to Resource Accessor -->
|
|
<div class="arrow">
|
|
<div class="arrow-line"></div>
|
|
<div class="arrow-head"></div>
|
|
<span class="arrow-label">may call</span>
|
|
</div>
|
|
|
|
<!-- Resource Accessor -->
|
|
<div class="component-box accessor">
|
|
🔌 RESOURCE ACCESSOR<br>
|
|
<small style="font-weight:400">Data, Services & Infrastructure</small>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Side: Utilities -->
|
|
<div style="margin-top: 30px; display: flex; flex-direction: column; align-items: center;">
|
|
<div class="component-box utility">
|
|
🔧 UTILITIES<br>
|
|
<small style="font-weight:400">Logging, Monitoring, Security</small>
|
|
</div>
|
|
<span style="font-size: 0.85em; color: var(--walmart-gray-mid); margin-top: 8px;">Cross-cutting • Used by all layers</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Communication Rules -->
|
|
<div class="rules-grid">
|
|
<div class="rule-card manager-rules">
|
|
<h4>📋 Managers</h4>
|
|
<ul>
|
|
<li class="must-not">MUST NOT compute</li>
|
|
<li class="must-not">MUST NOT share state</li>
|
|
<li class="may">MAY invoke Engines</li>
|
|
<li class="may">MAY invoke Resource Accessors</li>
|
|
<li class="may">MAY queue to Managers</li>
|
|
</ul>
|
|
</div>
|
|
<div class="rule-card engine-rules">
|
|
<h4>⚙️ Engines</h4>
|
|
<ul>
|
|
<li class="must-not">MUST NOT call Engines</li>
|
|
<li class="must-not">MUST NOT use queues</li>
|
|
<li class="may">MAY call Resource Accessors</li>
|
|
<li>Unaware of workflow</li>
|
|
</ul>
|
|
</div>
|
|
<div class="rule-card accessor-rules">
|
|
<h4>🔌 Resource Accessors</h4>
|
|
<ul>
|
|
<li class="must-not">MUST NOT call Engines</li>
|
|
<li class="must-not">MUST NOT call Resource Accessors</li>
|
|
<li class="must-not">MUST NOT use queues</li>
|
|
<li>No business logic</li>
|
|
</ul>
|
|
</div>
|
|
<div class="rule-card utility-rules">
|
|
<h4>🔧 Utilities</h4>
|
|
<ul>
|
|
<li class="must-not">MUST NOT coordinate</li>
|
|
<li class="must-not">MUST NOT enforce policy</li>
|
|
<li>Domain-agnostic</li>
|
|
<li>Shared capabilities</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="legend">
|
|
<div class="legend-item"><div class="legend-color" style="background: var(--walmart-blue)"></div> Manager (Stable)</div>
|
|
<div class="legend-item"><div class="legend-color" style="background: var(--walmart-spark)"></div> Engine (High Volatility)</div>
|
|
<div class="legend-item"><div class="legend-color" style="background: var(--walmart-green)"></div> Resource Accessor (Resources & Integration)</div>
|
|
<div class="legend-item"><div class="legend-color" style="background: var(--walmart-gray-mid)"></div> Utility (Cross-cutting)</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- DIAGRAM 2: Sequence Flow -->
|
|
<h2>2. Core Use Case Flow Example</h2>
|
|
<div class="diagram-container">
|
|
<p style="margin-bottom: 20px;"><strong>Example:</strong> Order Processing Core Use Case</p>
|
|
|
|
<div class="sequence-diagram">
|
|
<div class="sequence-row">
|
|
<div></div>
|
|
<div class="sequence-header manager">Order Manager</div>
|
|
<div class="sequence-header engine">Pricing Engine</div>
|
|
<div class="sequence-header accessor">Order Resource Accessor</div>
|
|
<div class="sequence-header utility">Logging Utility</div>
|
|
</div>
|
|
|
|
<div class="sequence-row">
|
|
<div style="font-size: 0.85em; text-align: right; padding-right: 10px;">① Request</div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s1">RECEIVE</span><br>
|
|
Receives order request, begins orchestration
|
|
</div>
|
|
<div></div>
|
|
<div></div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s4">LOG</span><br>
|
|
Correlation ID assigned
|
|
</div>
|
|
</div>
|
|
|
|
<div class="sequence-row">
|
|
<div style="font-size: 0.85em; text-align: right; padding-right: 10px;">② Price</div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s1">INVOKE</span><br>
|
|
Calls Pricing Engine
|
|
</div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s2">CALCULATE</span><br>
|
|
Applies rules, tiers, promotions
|
|
</div>
|
|
<div></div>
|
|
<div></div>
|
|
</div>
|
|
|
|
<div class="sequence-row">
|
|
<div style="font-size: 0.85em; text-align: right; padding-right: 10px;">③ Persist</div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s1">INVOKE</span><br>
|
|
Calls Repository
|
|
</div>
|
|
<div></div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s3">STORE</span><br>
|
|
Persists order to database
|
|
</div>
|
|
<div></div>
|
|
</div>
|
|
|
|
<div class="sequence-row">
|
|
<div style="font-size: 0.85em; text-align: right; padding-right: 10px;">④ Complete</div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s1">RETURN</span><br>
|
|
Returns confirmation
|
|
</div>
|
|
<div></div>
|
|
<div></div>
|
|
<div class="sequence-step">
|
|
<span class="step-label s4">LOG</span><br>
|
|
Completion logged
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<p class="diagram-note">Note: Manager coordinates but never computes. Engine calculates but is unaware of workflow. Accessor persists but has no business logic. Utilities are invoked orthogonally by all layers.</p>
|
|
</div>
|
|
|
|
<!-- DIAGRAM 3: Volatility Axes -->
|
|
<h2>3. The Four Volatility Axes</h2>
|
|
<div class="diagram-container">
|
|
<div class="volatility-grid">
|
|
<div class="volatility-card">
|
|
<h3>
|
|
<span class="volatility-icon func-icon">📊</span>
|
|
Functional Volatility
|
|
</h3>
|
|
<p>Changes to system behavior driven by business needs, user feedback, or regulations.</p>
|
|
<div class="examples-list">
|
|
<strong>Examples:</strong> New features, modified workflows, removed functionality, policy changes
|
|
</div>
|
|
<span class="handled-by by-manager">📋 Managers</span>
|
|
<span class="handled-by by-engine" style="margin-left: 8px;">⚙️ Engines</span>
|
|
<span class="handled-by by-accessor" style="margin-left: 8px;">🔌 Resource Accessors</span>
|
|
</div>
|
|
|
|
<div class="volatility-card">
|
|
<h3>
|
|
<span class="volatility-icon nonfunc-icon">⚡</span>
|
|
Non-Functional Volatility
|
|
</h3>
|
|
<p>Changes to system qualities like performance, scalability, reliability, security.</p>
|
|
<div class="examples-list">
|
|
<strong>Examples:</strong> Infrastructure upgrades, scaling requirements, SLA changes
|
|
</div>
|
|
<span class="handled-by" style="background: var(--walmart-gray-light); color: var(--walmart-gray-dark); border: 1px solid #ccc;">✨ Systemic benefit of VBD</span>
|
|
</div>
|
|
|
|
<div class="volatility-card">
|
|
<h3>
|
|
<span class="volatility-icon cross-icon">🔗</span>
|
|
Cross-Cutting Volatility
|
|
</h3>
|
|
<p>Changes to concerns that span multiple components: logging, auth, monitoring.</p>
|
|
<div class="examples-list">
|
|
<strong>Examples:</strong> New observability requirements, auth protocol changes, audit logging
|
|
</div>
|
|
<span class="handled-by by-utility">🔧 Utilities</span>
|
|
</div>
|
|
|
|
<div class="volatility-card">
|
|
<h3>
|
|
<span class="volatility-icon env-icon">🌍</span>
|
|
Environmental & Infrastructure Volatility
|
|
</h3>
|
|
<p>Changes to databases, external systems, vendors, deployment platforms, and third-party integrations.</p>
|
|
<div class="examples-list">
|
|
<strong>Examples:</strong> Database migrations, vendor swaps, API versioning, cloud platform changes, protocol updates
|
|
</div>
|
|
<span class="handled-by by-accessor">🔌 Resource Accessors</span>
|
|
<span class="handled-by" style="background: var(--walmart-gray-light); color: var(--walmart-gray-dark); border: 1px solid #ccc; margin-left: 8px;">✨ Systemic benefit of VBD</span>
|
|
</div>
|
|
</div>
|
|
|
|
<p class="diagram-note">By aligning component boundaries with these volatility axes, changes are localized and predictable. The Manager layer remains stable because it only expresses intent—it doesn't implement volatile logic.</p>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Generated for: <strong>Volatility-Based Decomposition (VBD) in Software Architecture</strong></p>
|
|
<p>Author: William Christopher Anderson • February 2026</p>
|
|
</div>
|
|
</body>
|
|
</html> |