/plushcap/analysis/temporal/temporal-intro-to-isolated-vm

Introduction to isolated-vm in TypeScript

What's this blog post about?

The Temporal's TypeScript SDK ensures workflow determinism by using V8 isolates via the isolated-vm npm package. Each workflow runs in an isolate that prevents direct access to non-deterministic logic like reading from the file system or generating a random number. This is crucial as Temporal stores each workflow's event history, including its initial state and all received signals and activity results. The SDK replaces commonly used non-deterministic built-ins with deterministic alternatives. It also prevents access to several Node.js APIs that could lead to non-determinism. If a workflow needs to use an npm module that interacts with the outside world, it should be placed in an activity which runs in the normal Node.js environment.

Company
Temporal

Date published
Sept. 22, 2021

Author(s)
Valeri Karpov

Word count
1143

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.