Strictly speaking, if a flow branches you cannot make any assumptions about the relative order the two branches will be executed. That is a runtime implementation detail that could change.
The current implementation will pass messages down the wires in the order they were added, in a depth first order.
If a node has several output nodes, which output node is going to be "executed" first ? My guess is that it's in the order of creation but maybe I'm wrong. Maybe it would be interesting to have the ability to (optionally) display a "node number execution order" next to a node ? that way, even if you move nodes around you know in which order it will be executed ...
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/f7a9375e-524c-46ae-b107-b8a6e487f93e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/9c69f9c9-3f02-4cb1-9803-0ce7496adec9%40googlegroups.com.
In the future the message passing code will be a pluggable component of the runtime - anyone could write a custom message router.
The order will not be fixed.
The IEC61131-3 function block language is a good example. There is also an IEC61131-3 language called SFC (sequential function charts) that is a flow-chart-like language, and 61131 defines a standard for ladder logic as well. It also defines a Pascal-like language called structured text (ST) that is probably not worth bothering with .. there are much better embedded scripting languages available that could fill its role.
At any rate, the development of a graphical language based on these models is not particularly difficult. I have a shell of a JS based, SFC-like language for batch control development that conforms to the S88 batch standard. It's relatively easy to write generators that will produce programs in these languages with relatively brief textual scripts, and fairly easy to render the results graphically using JS's reflection capabilities (it requires a bit of forethought in the design of the code for the language, but nothing overwhelming).
The hard part is making a good gui for graphical programming. There are some libraries out there that help, but it's still a ton of work to make a wysiwyg editor that is reasonable. In my view, this is the most impressive technical aspect of NR .. and it probably accounts for nearly all of its popularity, which in turn accounts for its continued progress.