Introduction to Isolated VM
Sep 22, 2021

Summary
This post explains the use of V8 isolates via the `isolated-vm` npm package in the Temporal TypeScript SDK to ensure Workflow determinism. It details why isolates are necessary to prevent non-deterministic operations like `Date.now()` and `Math.random()`, and how the SDK replaces or stubs out these built-ins. It also provides examples of using `isolated-vm` directly and explains how the SDK uses Webpack to bundle dependencies and override global objects. The post emphasizes that side effects like file system access or HTTP requests should be placed in Activities, not Workflows, and provides an example of how Axios would fail in a Workflow isolate.