The VAT model is quite interesting. A VAT is a computational unit that runs its own event loop — basically, it processes things independently.
A machine can have one or more VATs running on it. Each VAT contains objects inside it. Now, here’s the key part:
Objects inside the same VAT can talk to each other synchronously (like a normal function call). These are called “near” objects.
Objects that are not in the same VAT are called “far” objects. Since they live in different VATs, we can’t talk to them directly. So, we call them asynchronously (like using a
Promise
in JavaScript).
Also, VATs can live on different machines too. In that case, they talk to each other asynchronously as well.
Two machines are connected through a protocol called CapTP, which stands for Capability Transfer Protocol. CapTP allows them to securely share object references across machines or VATs.
This means you can safely use a reference to an object from another machine, even if it’s far away.