DEV Community

Cover image for V8 Isolates are taking over the world
Tom Lienard
Tom Lienard

Posted on

V8 Isolates are taking over the world

V8 Isolates are taking over the world

Cloudflare Workers with Vercel

Deno Deploy with Netlify and Supabase

Oxygen (from Shopify)

All of these companies have something in common. You guessed it, they all use V8 Isolates for one of their product.

You might be thinking, what are those "V8 Isolates" this guy is talking about? Well, let's read this explanation from Cloudflare:

V8 orchestrates isolates: lightweight contexts that provide your code with variables it can access and a safe environment to be executed within. You could even consider an isolate a sandbox for your function to run in.

It's cheaper to run a code within an Isolate than a container or a virtual machine, both in terms of time and resources. It's faster to start an Isolate than Node.js. It costs less to run a single process running multiple Isolates, than running multiple processes. It's being used by more and more big companies.

So, what are the drawbacks?

Honestly, I didn't found a lot.

The most obvious one is that its usage to run client-provided JavaScript is still fairly recent compared to containers and virtual machines. The ecosystem is not yet mature, even tough there's more and more funding.

The second I can think of is that every company is implementing its own runtime, with its own APIs, duplicating the work. Luckly, a community group was created, initiated by Cloudflare and Deno, named WinterCG.

It aims to

provide a space for JavaScript runtimes to collaborates on API interoperability.

This is a way to provide a unified API for all those new runtimes, but I'm still sad that none of them is open-source (Cloudflare announced few months ago that their runtime will be open-source, but that's not yet the case).

That's why I started working on an open-source platform named Lagon, aiming to provide a cloud-based and self-hosted version of a Serverless Runtime for running JavaScript and TypeScript. I want to give the community a really good software, even tough it requires a lot of work to do so.

Here is the GitHub repository if you want to take an early look:

I would love to know if this idea seems interesting for anyone, so feel free to leave your tought in the comments. I'm convinced that even more amazing products using V8 Isolates will be released in the future. Long live to Isolates!

Latest comments (1)

jjoker profile image

I'm curious about why not use worker_thread provide by node directly