
9/22/2021
What this post added
This post details the technical implementation of deterministic Workflow execution in the Temporal TypeScript SDK using V8 isolates via the `isolated-vm` npm package. It explains the necessity of determinism for Temporal's event history replay model and how isolates prevent non-determinism by providing isolated memory and stubbing out or replacing non-deterministic built-ins like `Date.now()`. It also outlines the restrictions imposed on Workflow code, such as preventing direct use of file system or HTTP modules, and directs developers to use Activities for such side effects. The post provides code examples illustrating both deterministic and non-deterministic code, and the mechanism for overriding global objects within the isolate.