1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
6 Query node feature definitions
zobalogh edited this page 2014-10-30 04:18:37 -07:00

This page defines the features and design conventions that each query node should adhere to. The page is currently under development and changes to its contents are possible. Once the behaviour is agreed upon, these conventions are going to be migrated onto the Node-RED website for easy reference. Only the website reference should be used as a blueprint.

Query nodes MUST:

  • Always produce an output msg upon receiving an incoming msg
  • Send out a NULL msg.payload if for some reason they cannot provide the appropriate payload (example: data not available yet)
  • Upon receiving a NULL message payload, they should.... TODO

Query nodes SHOULD:

  • Have clearly defined behaviour that determines how the incoming msg object is manipulated and then forwarded

  • Try to be as stateless as possible (same behaviour regardless of say initialization properties or any other state)

  • MULTIPLE MESSAGE/CLONING BEHAVIOUR TO BE DEFINED

  • Clean up their state upon close node.on("close", function() {}

  • Report errors using node.warn() or node.error() if the external systems are in an unexpected state/behaviour

Query nodes COULD:

  • MULTIPLE MESSAGE/CLONING BEHAVIOUR TO BE DEFINED