> 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/CAF%3Dvhqco7WvkyOoncBVMfnvVbmoa_n8-RpvYf%2BHx-ZDve3HQLg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To post to this group, send an 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/CAL%3D0gLui3YTT9B1tFoVOknTkpRfoS_rH7koSbMUcFuXbLGCM0A%40mail.gmail.com.
We don't have any specific plans for improvements to the diff tool, but clearly there are more things it could do. The challenge is how the tool knows when to provide a more detailed diff of a node property - we wouldn't want to hardcode knowledge of the Function, Template, Comment, UI-Template nodes, etc etc.
Nick
--
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+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/b8b9415f-3232-4785-bfad-c3cf3cf22446%40googlegroups.com.
--
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+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/d8c2e75f-bec6-4afe-825f-da216669200b%40googlegroups.com.
...
* Things can get complex very quickly. More complex than any one person can keep in their head, and much quicker than any one person can develop. Being able to have several developers working simultaneously on different parts of the system is essential for any serious production use.
* Distributed code is essential. When you have sensors, actuators, switches, and displays scattered around your environment, having to bring everything back to a central point is a major handicap. Being able to distribute your code over a collection of devices, large and small, and being able to easily move a flow from one device to another or split it up over two or more devices is an essential capability.
Related to this is being able to easily move flows between development, test, and production environments. It also needs to be able to be done without disruption - restarting your physical access controls every time you do an lighting control update isn't a good option.
Dynamic scalability and failover fit in here as well.
The roadmap covers these points to a large extent but I would make one comment - you talk about Node-Red applications; think more along the lines of Node-Red systems. Node-Red's strength is being able to tie together disparate inputs and outputs to implement complex intelligent systems.
In the short term, I'd like to make two suggested improvements:
1. Improved error reporting. Debugging new nodes is a real pain in the arse. Just trying to find a missing bracket or semicolon can take hours. I've been forced to use debugging techniques I haven't had to use since my assembler days. Just telling me which line number a syntax or runtime error occurs on would be a major step forward.
2. Have a good think about the structure of messages. The msg.topic/msg.payload clearly originates from the constraints of MQTT. Some nodes only expect a single value to be in the payload, others handle embedded objects, whilst others a completely flexible about what message/flow/global properties they work with. This results in a lot of property wrangling to get nodes to fit along a flow - work that is an artifact of the implementation and does not contribute to the solution. A good example of this is the dashboard - gauges can only display msg.payload values. If I have a complex data object then I have to break it up to display values. And too bad if I want to display a global or flow property.
At some point there was the idea that msg.payload should contain the data and other msg properties contain metadata - topic, timestamp, request id, etc. However from experience, one node's metadata is the next node's data at some point.
Outside of MQTT, msg.topic serves little purpose. With any sort of compound data, the concept of a topic covering the entire data object becomes somewhat meaningless.
Personally, I believe the current quasi-standard is a hinderance and Node-Red would benefit from dropping the msg.topic and msg.payload concepts completely and just have messages as arbitrary objects. It isn't that hard to make nodes completely configurable as to which properties they act upon. Node Red even makes functionality available to make it quite straight forward.
JK> The use of .topic and .payload are useful standards that need no special controls since most people agree to use them. But they don't restrict the use of Node-RED since they can be ignored or augmented where it is appropriate. They are easy for beginners to understand and useful guides.
One thing I'd love is if a function within a sub-flow could figure out the name of its parent. Then you could easily make hierarchies using nested sub-flows. Incoming messages could be easily filtered by comparing the first field in the topic to the parent's name, and outgoing messages could easily be "topified" by pre-pending the parent sub-flow's name to the topic field, and forwarding the message out an output port.
Thanks Nick and Julian,
I know I have argued the case against topic and payload a couple of time now, but I would just like to counter a couple of your reasonings. I should also clarify that my main gripe is with nodes that work only if msg.payload contains a single value.
NO'L> If there was no convention and every node picked an arbitrary property, a user would have to configure every single node to ensure the data was accessed properly at each stage. The Change node is there to help restructure messages as needed
But isn't having to use a Change node in front of every functional node just as complicated. There is nothing stopping every node defaulting to using msg.payload, just don't restrict it to only using msg.payload for advanced users who are working with structured data (trust us, we can do complicated).
JK> using msg.topic and msg.payload is really helpful in a lot of situations and particularly useful for beginners.
As an advanced user, it's a hindrance. As I suggested above, make msg.payload the default, but don't restrict it to just that.
JK> Node-RED would need massive restructuring to apply schema controls throughout in order to bring sense to fully arbitrary structures.
Why would you need schema controls? Node Red already provides support for fully configurable properties, both in the editor and the framework. There are just a handful of the standard nodes that need modification to have configurable properties.
JK>That would also add significant overheads in processing that are unnecessary for the majority of use cases.
Having to now use multiple Change nodes and having to unmarshal and remarshal data in messages is a significant overhead that is unnecessary. The only reason they are needed is because of an arbitrary design limitation.
The really silly thing is that I spent some time trying to come up with a real life example where this was a problem but couldn't. The reality is that only a very small number of nodes actually adhere to the msg.property standard (RBE and Range are two examples). The notable exceptions are the dashboard nodes Gauge and Chart which only work with msg.payload containing a single numeric value.
So I suppose my strongest argument against the msg.payload standard is that in reality not many nodes actually use it.