Introduction to Isolated-VM in Node.js(docs.temporal.io)
docs.temporal.io
Introduction to Isolated-VM in Node.js
https://docs.temporal.io/blog/intro-to-isolated-vm
4 comments
My question may sound silly here. What’s the advantage of an isolated-vm over async function with graceful error handling/time out?
Isolated-vm was originally developed for the game screeps. It’s a programming game where each player’s code is ran on the server, so isolated-vm helps with both runtime issue (one player’s code crashing not affecting everyone else on the same node) as well as adding some security benefits.
Thank you NhanH, it makes sense now.
One big difference is isolated-vm allows creating a separate v8 Isolate, separating the memory heaps, making it safer to run untrusted code. I don't think we can do that with the native Node.js API yet.