Deterministic Simulation Testing

Martin Fowler · 2026年11月17日

AI 摘要 AI 生成,可能有误

The article describes deterministic simulation testing as a technique for testing distributed systems, where real clocks, networks, and storage are replaced with simulated components driven by a single-threaded execution loop. This approach makes it possible to simulate both hard failures and routine slowdowns like network and disk latency spikes while ensuring every execution is reproducible. The concept is explained using a quorum key-value store as an example, with code drawn from Tickloom, a Java implementation of the technique.

Distributed systems are hard to test because partial failures overlap with live traffic and the same fault can produce different execution traces on different runs. Unmesh Joshi describes how deterministic simulation testing addresses this by replacing real clocks, networks, and storage with simulated components driven by a single-threaded execution loop. This allows simulating both hard failures and routine slowdowns—such as network and disk latency spikes—and more importantly makes every execution reproducible. This article explains the technique using a quorum key-value store as a running example, with code from Tickloom, a Java implementation of the approach.

more…

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Martin Fowler

Fragments: November 20

AI 摘要This 'Fragments' roundup covers several tech topics, including an experiment showing that code with better CodeHealth scores costs agents 22-35% less to review, Steve Yegge's warning to pace AI-driven software factories to human-governable speeds, and Chad Fowler's vision of SaaS evolving into stable platforms topped by agent-generated custom applications. It also discusses concerns about AI corrigibility being underprioritized and Jason Koebler's story of Meta's Muse agent suing Meta after wrongly disabling a business account, which raises questions about how AI agents may overwhelm systems designed for humans. The piece closes with commentary on Jensen Huang's crisis at Nvidia, contrasting his highly centralized leadership with Steve Jobs' legacy of building a company that could thrive without him.

Data Contracts

AI 摘要Data contracts describe the contents and guarantees of datasets by applying API design practices to data, treating them as data-providing services with clearly defined interfaces. Simon Harrer and Arif Wider explain in detail what data contracts are and how to use them. This approach significantly increases the robustness of large-scale data landscapes and provides people and AI agents with explicit, trustworthy metadata for autonomous data work, driving growing enterprise adoption.

Bliki: Generated Glossary

AI 摘要The article proposes using LLMs to generate glossaries of an organization's specialized vocabulary from internal sources like documents, emails, and chat logs, since terms unfamiliar to the model hinder its effectiveness in that domain. Human experts should review the drafts, and the glossaries should be kept in version control, refreshed regularly, and organized per bounded context rather than forced into a single standard. Glossaries support agentic engineering by informing code generation, checking terminology usage, marking deprecated or forbidden terms, and revealing how the same term is used differently across contexts.

Tests as data: ensuring AI-generated code does what we want

AI 摘要The article argues that when AI coding agents write both production and test code, developers risk losing the assurance that automated tests protect against functional errors. Matteo Vaccari proposes that developers become customers of AI-generated code, so customer tests should serve as the primary contract between humans and AI, and that expressing this contract as test data rather than test code protects it from unexpected modifications by coding agents. While DSL parsers and custom test runners were once expensive to build, AI now makes them cheap, enabling human-readable tests that establish this contract.

Fragments: November 10

AI 摘要This 'Fragments' roundup covers the November Thoughtworks Technology Radar, which is dominated by AI blips and highlights the enterprise challenges of scaling agentic AI: shared context, token cost, cognitive load, security, and platform building. It also discusses Ben Thompson's analysis of the bipartisan backlash against data centers (whose main beneficiaries will be incumbent data center owners), Hadley Wickham's finding that per-token API prices appear largely unsubsidized, research on 'Weight-Space Programming' where models can interpret and generate neural network weights, and the CAFE(S) framework for assessing the quality of context supplied to AI agents. The post closes by noting that enterprises now spend far more tokens verifying AI outputs than generating them.