Plumbing
This chapter documents the code that salsa generates and its "inner workings". We refer to this as the "plumbing".
Overview
The plumbing section is broken up into chapters:
- The jars and ingredients covers how each salsa item (like a tracked function) specifies what data it needs and runtime, and how links between items work.
- The database and runtime covers the data structures that are used at runtime to coordinate workers, trigger cancellation, track which functions are active and what dependencies they have accrued, and so forth.
- The query operations chapter describes how the major operations on function ingredients work. This text was written for an older version of salsa but the logic is the same:
- The maybe changed after operation determines when a memoized value for a tracked function is out of date.
- The fetch operation computes the most recent value.
- The derived queries flowchart depicts the logic in flowchart form.
- The cycle handling handling chapter describes what happens when cycles occur.
- The terminology section describes various words that appear throughout.