AISE502/moodle/week_05.html

52 lines
5.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- ==========================================================================
AISE502 · Moodle course page · Week 5
Section title (Edit section → Section name): Week 5: Patterns II – Microservices and Event-Driven Architecture
Three blocks follow, matching the FHGR section template. Paste each block into the
corresponding 'Text and media area' (editor → source code view), or all three into one.
The slide set of lecture 5 is added by the lecturer as a file resource below block 2.
Generated by src/build_moodle.py from src/content/week_05.json – edit the JSON, not this file.
========================================================================== -->
<!-- BLOCK 1 · Learning objectives -->
<h4>🎯 Learning objectives</h4>
<ul>
<li>I can derive the MS and EDA capability profiles from their tactics and quantum boundaries, cell by cell.</li>
<li>I can explain why compensation in a saga is not rollback and why D4 = −− is structural for MS.</li>
<li>I can judge when MS is legitimately forced (D11 measurably binding) and when to avoid it.</li>
<li>I know the distributed monolith and its measures: lockstep release ratio, cross-service change dispersion, synchronised version bumps.</li>
<li>I can distinguish the broker and mediator topologies of EDA and name what each gives and takes.</li>
<li>I can explain EDA's threefold decoupling and why D4, D8 and D9 are the same coin's other side.</li>
<li>I can explain why EDA is rated ++ on D12: queues absorb what LLMs are worst at.</li>
<li>I know the seven resilience primitives for distributed edges and the measure attached to each.</li>
</ul>
<!-- BLOCK 2 · Theory -->
<h4>🧑‍🏫 Theory</h4>
<p><strong>Lecture 5: Patterns II – Microservices and Event-Driven Architecture</strong> · 2 lessons lecture + 2 lessons exercise<br>
This lecture derives the capability profiles of the two distributed patterns, MS and EDA, from their tactics and quantum boundaries, and introduces the resilience primitives for distributed edges.</p>
<ul>
<li>MS and EDA form the catalogue's distributed half: MS distributes by domain, EDA decouples in time; both multiply quanta and pay D8 = −− before the first feature ships.</li>
<li>MS – services around business capabilities, one quantum each, database per service – is the only pattern rated ++ on D11: adopt for measured organisational scale, never for traffic alone.</li>
<li>The bill is structural: D4 = −− because cross-service consistency needs sagas, and compensation is not rollback; D8 and D10 = −− because the premium is platform staffing.</li>
<li>The distributed monolith is the most common failure outcome, measurable as lockstep release ratio; Monzo and Segment show viability depends on where boundaries run (Maxim 4) and central platform investment.</li>
<li>EDA connects asynchronously decoupled producers and consumers through a messaging substrate; they share event schemas, never knowledge of each other. Broker topology maximises scaling, mediator topology gives workflow visibility.</li>
<li>EDA's decoupling is threefold (topology, time, organisation); eventual consistency moves correctness into the design, keeping D4 and D8 at −− and D9 at −; no broker removes the trade.</li>
<li>EDA is rated ++ on D12: queues absorb LLM latency, rate limits and outages, and the event log doubles as audit journal; EDA takes the project's edges, MM+HX core unchanged.</li>
<li>The seven resilience primitives – timeout, retry with backoff, circuit breaker, bulkhead, fallback, dead-letter queue, idempotent consumer – are constitutive tactics, each becoming a fitness function in the measurement contract.</li>
</ul>
<p>📎 <strong>Materials:</strong> Slide set of Lecture 5 <em>(added below by the lecturer)</em> · Script: Part II – Sections 11 (MS – Microservices) and 12 (EDA – Event-Driven Architecture).</p>
<!-- BLOCK 3 · Self-study and assignments -->
<h4>🧑‍💻 Self-study and assignments</h4>
<p><strong>📖 Reading before the lecture:</strong> Part II – Sections 11 (MS – Microservices) and 12 (EDA – Event-Driven Architecture).</p>
<p><strong>🧩 Exercise session:</strong> Architecture study II (2 lessons): teams design the edges of their platform – the ingestion queue and resilience against external-API failure – sketch the service contracts and run the matrix pre-filter of the candidate patterns against their A1 requirements profile.</p>
<p><strong>🛠️ Project work this week</strong> · Milestone M2 – Architecture Decision and Solution Design (weeks 4–7)</p>
<ul>
<li>Design the edges of your platform: the ingestion queue for analysis requests, and resilience against external-API failure – timeouts, retries with backoff, circuit breaker, fallback and DLQ on every external call.</li>
<li>Sketch the service contracts: which events exist, which schemas, who produces and who consumes.</li>
<li>Run the matrix pre-filter: hold your A1 requirements profile R(platform) against all candidate patterns seen so far and record which survive stage 1 (shape gate) and stage 2 (vetoes) – next week's full three-stage match builds on it.</li>
<li>Study this week's reference systems: Google's Online Boutique (twelve polyglot services, gRPC contracts) and Home Assistant's homeassistant/core.py (Event, EventBus, async_fire) – read exactly that one file.</li>
<li>Record the edge design and contracts in the M2 architecture dossier (bounded contexts → service decomposition and contracts); production code starts only after the design-review gate – exploratory spikes are allowed.</li>
</ul>
<p><em>No deliverable is due this week.</em></p>