Skip to content
0:00 / 0:00

#foundationdb#deterministicsimulation#flow

"Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson

Strange Loop Conference

88K subscribers • 107 videos on Hallway • Conference channel

YouTube
  • Recommended by 16 people: 12 on Hacker News and 4 on Lobsters.
  • A classic. People kept recommending it from 2014 to 2024.
  • Presented by Will Wilson, engineer at FoundationDB

Advanced. Deep dive for people who know the field.

55K views12 years ago16 recommendations

Distributed systemsDatabases and dataTestingConcurrency and parallelismDatabase internals

Will Wilson explains how FoundationDB uses deterministic simulation to test and find rare concurrency and network bugs in distributed databases.

Debugging highly concurrent distributed systems in a noisy network environment is an exceptionally challenging endeavor. On the one hand, evaluating all possible orders in which program events can occur is a task ill-suited to human cognition, rendering a pure analytic understanding of the control flow of such a system beyond the reach of any individual programmer. On the other hand, a more “empirical” approach to the task is also fraught with difficulty, as the dependence of severe bugs on precise timings or transient network conditions makes every part of the debugging cycle – from bug replication to verification of a fix – a Sisyphean labor bordering on the impossible. One approach which has been developed to ameliorate this situation is that of deterministic simulation, wherein the hardware components of the system – including hard disks, network links, and the machines themselves – are replaced in testing with software which fulfills the contracts of those systems, but whose state is completely transparent to the developer. This enables the simulation of a wide diversity of failure modes including network failures, disk failures or space exhaustion, unexpected machine shutdown or reboot, IP address changes, and even entire datacenter failures. Moreover, once a particular pattern of failures has been identified which uncovers a bug, the determinism property of the simulation means that the exact same series of events can be replayed an indefinite number of times, greatly facilitating the debugging process, and providing confidence when a bug has been fixed. Attendees of this talk will gain an understanding of the benefits, drawbacks, and tradeoffs involved in implementing a deterministic simulation framework, with frequent reference both to theory and to real-world engineering experience gleaned from applying this method to a complex distributed system. Attendees will also learn about language features which aid in the development of such a framework. Will Wilson FoundationDB Will Wilson works on the engineering team at FoundationDB (foundationdb.com). Will started his career in biotechnology, leading a successful R&D effort in spinal cord injury diagnostics, currently undergoing commercialization by a company he co-founded. Since then, Will has worked in a variety of technical and business roles at data science and data virtualization startups. Will has a degree in math and philosophy from Yale.

Why it's here

16 people recommend this

What people say. Highly recommended as a mind-blowing and essential talk on distributed systems testing and the power of deterministic simulation.

nickpsecurityon Lobsters • Recommends

Testing Distributed Systems w/ Deterministic Simulation A talk by a FoundationDB developer about how they got it so reliable that the Jepsen team didn't see a need to test it.

agent281on Lobsters • Recommends

Testing Distributed Systems w/ Deterministic Simulation (2014)

teerayon Hacker News • Recommends

On “Apple Acquires FoundationDB”

One of their engineers gave a great talk at Strangeloop ( link to this video ) that shows some of the amazing simulations they ran FoundationDB through. It's well worth a watch if you want to understand the punishment that they put this database through to make it stand out.

chuboton Hacker News • Recommends

On “The Problem with Threads (2006) [pdf]”

This talk was about Foundation DB was brought up recently, and it's pretty amazing. I recommend watching the whole thing, but to be brief they are taming the "infinite interleavings" problem through determinism. "Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson link to this video They wrote an interesting Actor DSL that compiles to C++ and is completely deterministic, and they torture this deterministic engine with generated test cases on a cluster every night. I guess you could say that the whole cluster is necessarily non-deterministic, but an individual node is deterministic, given an ordering of the messages it receives.

rubyn00bieon Hacker News • Recommends

On “FoundationDB Document Layer”

Soooo stoked. This should make futzing with it to get started a lot easier. I've been thinking about going to the FoundationDB summit to hopefully learn more... Does anyone have any good resources for learning about it? I've tried a few times but find the documentation a bit hard to grok. Maybe I'm just slow. Also if you haven't seen it, this is one of the most amazing talks on distributed systems (because it's about testing them) I've ever seen (by Will Wilson from FoundationDB pre-Apple merger): link to this video Truly mind blowing how good FoundationDB is supposed to be for its use cases, and this Mongo layer is just the business when it comes to helping adoption.

sgk284on Hacker News • Recommends

On “FoundationDB: A distributed, unbundled, transactional key value store [pdf]”

Here's another excellent talk at Strangeloop on FoundationDB's simulation testing by Will Wilson in 2014: link to this video

LAC-Techon Hacker News • Recommends

On “How FoundationDB works and why it works”

"FDB can tolerate f failures with only f+1 replicas." Wait a minute, I know that formula... Viewstamped Replication?? I need to read the foundation DB paper. (I mainly read CRDT stuff so hopefully it's understandable). --- In general I'm really impressed foundation DB folks. The talk "Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson blew my mind. TL;DR they spent the majority of their initial dev effort into making a simulation of the database, then when they were happy with that plugged in real storage, time and networks at the end. Well worth a watch for anyone interested in distributed systems & reliability. link to this video

acon Lobsters • Recommends

Testing Distributed Systems w/ Deterministic Simulation

itpon Hacker News • Recommends

On “Databases at 14.4Mhz”

I'll give you some brief thoughts from my experience working at FoundationDB, but if you really want the in-depth answer to what makes our simulation framework an enabling technology for everything we do, you should take a look at the talk my colleague Will Wilson gave at Strange Loop 0. Everything in our core is written in Flow, our asynchronous programming environment. The architecture of our server is essentially single threaded, with (pseudo-)concurrent actors allowing a single process to satisfy multiple roles at once. The interfaces that these actors use to communicate -- with the disk, over the network, with the OS in general -- are abstracted and implemented in Flow as well. Each o…

StreamBrighton Hacker News • Recommends

On “CrimsonDB: A Self-Designing Key-Value Store”

>>> But for the Web site for my startup, early on it was clear that I needed a good key-value store as a Web user session state store (server). So, I designed one, coded it up, and have been using it. It seems to work fine. Well depending on what error scenarios you might run into your code will work until it runs into those scenarios. Few ideas what could go wrong you can get from this video: link to this video

drejon Hacker News • Recommends

On “Challenges with distributed systems”

There is a great talk about this testing, it goes all the way to deterministic seeds and other basics. The level of determinism is admirable. link to this video

arohneron Hacker News • Recommends

On “Griffin - A fully-regulated, API-driven bank, with Clojure”

It is a tall order, but but it's doable. The most important thing is to reduce the surface area of your application. Our business logic is almost entirely pure. The 'procs' have no side effects, except for things that happen on the other side of a clojure protocol (java interface). That means all side effects can be stubbed out during tests. Our "user" code has no access to threading libraries. Threading happens in "kernel" code. Watch link to this video for a good example of how this has already been done in practice.

jrvarela56on Hacker News • Recommends

On “How FoundationDB works and why it works”

Tangent about FoundationDB: this is a great video that explains how the team tested it link to this video Spoiler: they even had their own custom power supplies used to test against power failures.

georgelyonon Hacker News • Recommends

On “Swift as C++ Successor in FoundationDB [video]”

The great thing about FDB is that they have a testing infrastructure that is unlike any other database: link to this video If there is a Swift compiler bug that causes data loss I will bet money they will catch it (I will also bet they will find at least one Swift compiler bug)

merqurioon Hacker News • Recommends

On “7 Databases in 7 Weeks for 2025”

FondationDB is such an incredible resource, but it’s so hard to access for the general public. It’s no wonder so few people know about it. I’ve always thought that if there were easier ways to interact with it, or some dev-friendly layers built on top (or public) it would become way more popular. it has shown how well it scales with Apple and snowflake, but is not an obvious choice for non-internet scale applications. If you don't know about FDB; there's an amazing video about how they test it that really got me into learning more: link to this video

davidk01on Lobsters • Recommends

Testing Distributed Systems w/ Deterministic Simulation