WASM powered Node-RED in a browser?

WASM Node-RED. Yeah, it’s a little cRazY, off the beaten path, and just plain nuts. But it does give birth to possibilities (if one’s creative enough to think out of the box).

What is it?

WASM (or WebAssembly), with a twist of virtualization, would allow one to launch an instance of Node-RED without a server. While “temporary” or for demo purposes; the environment lives solely within the web browser.

You may have seen your favorite retro game, or entire computer virtualized within the browser for fun. But this technology has matured to interpret other highlevel languages and entire programming frameworks to deliver (and fast) network applications that usually depend on a server stack to run.

They've done it with PHP, and WordPress; and now Automattic, (the mega corporation behind WordPress) has released a version of the technology for webdevs to instantly test drive plugins, that run over 30% of web, right inside your web browser... no need to setup a LAMP stack or mess with Nginx directives much less run their "5 minute install script".

If they can do it with PHP, surely NodeJS that has more kinship with the browser and WASM than PHP ever had could pull off something similar? Shims for networking using web sockets, etc. etc. I would guesstimate that Node-RED wouldn't be far off the menu.

Anyone want to give it a go?
Anyone remotely interested in the notion?

I can think of at least a half dozen applications for it just pondering the thought for a few minutes.

1 Like

I can't find the post anymore, but there was someone who managed to run the client-side of node-red in the browser without nodejs as a proof of concept. Many nodes are only used for client operations anyway. But converting nodejs to wasm is probably not the best idea. A browser-only version would be great though.

1 Like

Yes it was @monteslu - Luis Montes' Pagesnodes project - GitHub - monteslu/pagenodes: Completely Browser Based IOT Platform
I think the example at pagenodes.com may still work... not checked. Really neat - was using all the latest (at the time) w3c browser extensions to allow voice, bluetooth and local storage access etc. Very cool.

2 Likes

No need for WASM unless you want to make a node that specifically runs WASM code.

The browser's VM when I made page nodes a few years ago was good enough to run most of node-red's nodes, though it took a bit of refactoring of node-red's core at the time to not be dependent on node.js

6 Likes

It was actually another post from someone else (more recent), but did something similar indeed :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.