Lawfare Group → Knowledge Institute → Lawfare Academy

← Course syllabus · Related lesson

Make repeated, late and partial integration events explainable

Current complete on-site edition 4

Required teaching and complete optional models are supplied on LawfareGroup.com. Publisher and primary links are optional provenance or further reading. Florida is the contemporary state-law default; federal rules and explicitly comparative material are distinguished. Independent subject review and observed human learner testing remain pending.

Cumulative information-system dossier, transfer models and 30-point rubric

Preserved original teaching integrated with complete current on-site preparation. Independent human subject review and observed learner testing remain pending.

Learning objectives

A customer name is an attribute, not a durable relationship

Harbor has two customers named Taylor and one customer whose trading name changes. A name-based join can merge different parties or split one party across periods. Give each customer a stable customer identifier; give jobs, invoices and payments their own identifiers. A job belongs to a customer, an invoice may cover multiple job lines and a payment may be allocated across invoices. State those relationships before choosing tables.

Separate an invoice header from invoice lines to avoid repeating mutable customer or invoice-level facts in every line. A foreign key can prevent a line referring to a nonexistent invoice, but it cannot prove that the invoice represents authorized work. Technical integrity and business authorization are complementary controls. Preserve corrections with a reason and history rather than changing identifiers to conceal discrepancies.

Document currency, units and timestamp semantics. A total of 10,000 has no stable meaning without those definitions. A system can enforce a numeric type while accepting the wrong currency or tax basis. Validate permitted values and reconcile substantive meaning as well as storage structure.

A timeout is uncertainty about outcome

Suppose accounting receives invoice event E001, commits invoice I001 for 12,000 and then the network loses the acknowledgement. The sender cannot infer that the commit failed. Retrying without a stable event identity can create a second invoice. Use an idempotency key representing the intended business operation, and store the recognized key and business effect together under an appropriate transaction boundary.

On an exact replay of E001 with the same content, return the recorded result without reapplying the effect. Reusing E001 with a different amount is a conflict requiring rejection or investigation, not permission to overwrite the invoice. Compare a stable payload representation or business fields, and define how authorized corrections receive their own linked identities. The teaching lab stores a tuple as the simplified fingerprint; production designs need a carefully specified canonical representation and concurrency controls.

A local database transaction can make a local effect and processed-event record atomic. It does not make an external email or a remote accounting system part of the same atomic commit. An outbox can record an intended outgoing event in the local transaction, followed by retried delivery; the receiver must still cope with duplicates. Exactly-once language needs a stated boundary and assumptions.

Reconciliation complements prevention

The synthetic stream contains E001 for I001 worth 12,000, an exact replay of E001, E002 for I002 worth 8,000 and E003 as a −1,000 correction linked to I001. There are four received messages, three distinct accepted operations and a net invoice balance of 19,000. Counting messages as invoices or summing every received amount produces a misleading report.

Reconcile accepted identities, rejected conflicts, source counts, currency and amounts. A balanced grand total can hide an omitted 1,000 item and a duplicated different 1,000 item. Compare entity identities and control categories, not only one number. Age pending and failed events with an accountable owner. A dead-letter queue is evidence awaiting resolution, not successful integration.

Late cancellation and correction events also require a policy. Distinguish the current operational projection from an as-of report, and retain occurrence and receipt times. Consider concurrency, recovery after a crash between steps and safe replay of a known fixture. The isolated lab demonstrates duplicate handling for its stated serial model; it does not prove distributed correctness or authorize changes to production records.

Worked example: Four messages do not mean four invoices

12,000 + replayed 12,000 + 8,000 − 1,000 would incorrectly give 31,000. Apply each distinct accepted operation once: 12,000 + 8,000 − 1,000 = 19,000.

Worked example: A reused key can reveal a conflict

If E001 reappears as 13,000 instead of 12,000, flag conflicting content and preserve the original effect. An authorized 1,000 change needs a separately identified correction and approval evidence.

Progressive optional practice

Attempt each problem before opening its model. Then revise the reasoning under the changed conditions.

Guided

What does a lost acknowledgement establish?

Compare the model reasoning

The sender does not know the outcome; the receiver may have committed.

Changed conditions

A read-back finds I001 already committed.

Compare the revised analysis

Reconcile with the same operation identity instead of creating a new invoice.

Independent

Why is a total alone insufficient?

Compare the model reasoning

Equal-value errors can cancel numerically while identities remain wrong.

Changed conditions

One 1,000 line is omitted and another duplicated.

Compare the revised analysis

The total can match while both identity controls fail.

Transfer

Does a local transaction guarantee a remote email is delivered exactly once?

Compare the model reasoning

No; the remote action lies outside that local commit boundary.

Changed conditions

A transactional outbox is added.

Compare the revised analysis

It makes the local delivery intent durable, but delivery retries and receiver deduplication still need explicit handling.

Preserved historical development snapshot · Course content review

Source readings and scope

Introduction to Computer Science — 8.1 Data Management Focus — The complete current on-site studios supply all required conceptual preparation with worked reasoning and optional practice. These original publisher links remain optional provenance or further reading; outside visits are not required. Historical source availability is separate from current on-site content acceptance. The isolated laboratory checks synthetic state, integration and decision mechanisms; it does not validate a production system, certify cybersecurity or test an actual learner. Florida is the state-law default; no universal legal retention period or breach deadline is asserted.

Introduction to Computer Science — 8.2 Data Management Systems — The complete current on-site studios supply all required conceptual preparation with worked reasoning and optional practice. These original publisher links remain optional provenance or further reading; outside visits are not required. Historical source availability is separate from current on-site content acceptance. The isolated laboratory checks synthetic state, integration and decision mechanisms; it does not validate a production system, certify cybersecurity or test an actual learner. Florida is the state-law default; no universal legal retention period or breach deadline is asserted.

Introduction to Computer Science — 8.3 Relational Database Management Systems — The complete current on-site studios supply all required conceptual preparation with worked reasoning and optional practice. These original publisher links remain optional provenance or further reading; outside visits are not required. Historical source availability is separate from current on-site content acceptance. The isolated laboratory checks synthetic state, integration and decision mechanisms; it does not validate a production system, certify cybersecurity or test an actual learner. Florida is the state-law default; no universal legal retention period or breach deadline is asserted.

Reproduce the worked examples in Python 3. Standard library only; synthetic data; no production records or network access.