Node vs Subflow Node implementation research

I remember that there was once a discussion about the core nodes of Node-RED and that I was arguing that all nodes should be removed and placed in a separate node package - that might or might not be preinstalled.

IIRC you actually backed that idea :wink:

Point being is that I don't see my software in the core of Node-RED, instead the core of NR should be thinned out - IMHO. And the features that NR would offer to external code would increase - perhaps libraries around network access or message handling or security and storage. That would allow node package authors their freedoms to select their licenses.

Thankfully there seems to be a trend - as far as I see it - towards open source developers being more aware of licenses and the power of corporates forcing encouraging them to develop software for free. It would be interesting to see how many "open source developers" are employed by corporates and how many are truly independent. Those employed by big corporates are further "encouraged" to support for "strings-free" software license.

No big corporate would have paid me to develop my eclectic set of node packages or my mind map tool but - IMHO - that's the true spirit of open source software - experimenting and trying different approaches and having the freedom to share that without worrying about licenses and lawyers.

EDIT: btw I miss the good old days when Julian and I would have these long discussions, going completely off-topic and everyone complain that we went off-topic .... :wink: Sorry folks for being completely off-topic the last few days!

2 Likes

Does that work if you hit a clone (e.g. 2 wires out of a single node output port)? I wouldn't have thought it would because I suspect that a clone needs to serialise things but I may well be wrong.

Except that, if I've understood things correctly (not all that likely, I will admit!), Node.js has a quite slow multi-process architecture. And so Node-RED doesn't really "pass messages" does it? All that is happening, as I understand it, is that the msg's reference (it is a variable, not really a "message") is being passed between nodes. This sounds like it is very different to Erlang (though I have only the slimmest of knowledge about Erlang).

This is very common, very few of the GPL license variations can be used in big enterprise or Government/Health. MIT is the most common for such things. UK Government and Health open source should all be dual licensed, MIT for the code and OGL2 (a UK Government specific license) for documentation.

The GPL licenses were created by the more extreme believers in the open source world. Lots of people disagree with them. MIT or Apache2 are much better open source licenses in most people's eyes.

Hey, I'm still here and as argumentative discussive (is that a word?) as ever! I just haven't had as much capacity this year so far. Just wait till I retire early next year (if not before the way things are going!). Won't be long before we get our knuckles rapped again for going down a deep, off-topic, rabbit hole I am sure. :smiling_face_with_sunglasses:

1 Like

Of course, NodeJS and Erlang are completely different however the concepts that Node-RED encapsulates can be implemented in both. Node-RED is influenced by Flow Based Programming (FBP) that has independent computational units called nodes and these can fail - in FBP.

Now we add a "supervisor" node which restarts failing nodes, that would be an extremely useful concept for FBP. So now we take that concept and add it to Node-RED. Immediately the question arises how to implement this in NodeJS. Of course, in the current state, Node-RED could not support a "supervisor" concept or it could but with difficulty - I honestly also don't know.

This does not reduce the usefulness of the "concept" of a supervisor node, it begs the question how to implement this in NodeJS! I'm not advocating converting the Node-RED to use "processes" and "messages" in NodeJS because NodeJS - as you say - isn't good at multi-process designs. But neither was NodeJS designed for FBP yet Node-RED does a great job of implementing the concepts underlying FBP. :slight_smile:

Especially since Richard Stallman fell very much out of favour. Which is a really shame since, regardless of what one thinks of RMS, he did a lot for open source software community.

The religion trap - we see it in all walks of life including science and tech. People end up treating their ideas like a religion instead of continuing to develop and adjust.

Great point, it is something that ideally would be included as core feature of node red, not left to you alone to solve haha. But it looked like you had something like that already for your own version?

Sure, it's all Erlang code - it basically setups collection of all exception and completed message (completed messages are generated by some nodes so that the "complete" node works), then it creates processes for the nodes, then triggers all inject nodes, waits and then halts all started processes.

Basically the entire code is pointless in NodeJS. Even the concepts don't transport - there is no such thing as exception collection in Node-RED. Also the Erlang version runs all tests concurrently and this requires isolation between process and errors raised.