diff --git a/main/guides/js-programming/index.md b/main/guides/js-programming/index.md index f6ea6d76c..c458d10be 100644 --- a/main/guides/js-programming/index.md +++ b/main/guides/js-programming/index.md @@ -15,19 +15,23 @@ the sections below. ::: -## Vats: the Unit of Synchrony +## Workers: the Unit of Synchrony The Agoric framework uses the same [event loop concurrency model](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop) as web browsers and Node.js. Each event loop has a message queue, a call stack of frames, and a heap of objects: ![heap, stack, and queue](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Event_Loop/the_javascript_runtime_environment_example.svg) -We refer to this combination of an event loop with a message queue, a stack, and a heap as a _vat_. +::: tip Historical Note +The term "worker" in Agoric replaces the historical term "vat", which was inspired by the philosophical thought experiment "Brain in a Vat" - where a brain is sustained in isolation and connected to simulated inputs, similar to how our workers maintain strict isolation boundaries. +::: + +We refer to this combination of an event loop with a message queue, a stack, and a heap as a _worker_. -Vats are the unit of synchrony. We can only use ordinary synchronous -function calls within the same vat. But we can use asynchronous function calls -(with [eventual send](./eventual-send)) either within the same vat or between vats. -Vats may be on remote machines, including massively replicated machines such as blockchains. +Workers are the unit of synchrony. We can only use ordinary synchronous +function calls within the same worker. But we can use asynchronous function calls +(with [eventual send](./eventual-send)) either within the same worker or between workers. +Workers may be on remote machines, including massively replicated machines such as blockchains. ## Parts of the Framework diff --git a/main/guides/platform/index.md b/main/guides/platform/index.md index bac48b870..afad5d22c 100644 --- a/main/guides/platform/index.md +++ b/main/guides/platform/index.md @@ -14,16 +14,16 @@ it's very important to ensure that one user cannot prevent another user's code from executing and that the way in which code is interleaved doesn't open up hazards such as reentrancy. SwingSet solves that problem by dividing up the execution environment into -_vats_. A [vat](../js-programming/#vats-the-unit-of-synchrony) is a _unit -of synchrony_. This means that within a JavaScript vat, objects and +_workers_. A [worker](../js-programming/#workers-the-unit-of-synchrony) is a _unit +of synchrony_. This means that within a JavaScript worker, objects and functions can communicate with one another synchronously. Between -vats, objects and functions communicate asynchronously, by design. +workers, objects and functions communicate asynchronously, by design. -A physical machine can run one or several vats. A blockchain can run -one or several communicating vats. +A physical machine can run one or several workers. A blockchain can run +one or several communicating workers. -The internal state of a vat can be stored in a persistent memory so -that the vat can be turned off and later turned back on (on the same +The internal state of a worker can be stored in a persistent memory so +that the worker can be turned off and later turned back on (on the same or a different physical machine) by loading the stored state. A SwingSet instance also handles communication between the vats it