Streaming realtime data between nodes?

When looking at the custom node sample code, I noticed that the node output is done via


This seems to indicate a fire-and-forget style of unary message.
Would it be possible to stream continuous data between nodes so that they form some kind of realtime processing chain on time-series data, for example?

That is very interesting. If you are familiar with node.js and piping data, then in your custom node you could use nodered’s send(msg) to pass a reference of a readable/writable stream to your other custom node. The receiving node can handle that msg and use the referenced stream and set up its data reading.

Some might consider this to be an anti-pattern for node-red, but it might be more performant for high volumes of buffer data.

1 Like

What kind of real-time processing are you looking for?
For basic real-time processing, you can use "Smooth" node.
There are also some more advanced real-time processing nodes such as the "statistics" node depending on what you are looking for.
If you are writing your own nodes, then you may take a look at how they implement the real-time processing.

1 Like

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