Hi,
Quick response as I'm out and about.
This topic has come up a couple times in the last week.
I'm currently documenting this api - will be publishing it in the next day so.
We already have a mongo storage plugin in our node-red-bluemix repository - although it's slightly out of date.
Will reply more fully when I'm near the laptop this afternoon.
Nick
--
http://nodered.org
---
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.
For more options, visit https://groups.google.com/d/optout.
Some specific responses to your questions...
>
#1) Am I right in assuming that a "deploy" does both a save of the flow & deploy the nodes ?
Yes
>
#2) All flows are reads from and written to a single file (specified in flowFile)
Yes
>
#3) the "saveFlows" function seems to get called even if I deploy just flows with changed nodes , rather than the expected "saveFlow" function. Is this by design or a bug ?
>
#4) the "getAllFlows" function seems to be called for all reads, I haven't seen a call to getFlow() in use yet (same as #3)
saveFlows is used to save your flow configuration, regardless of the type of deploy that is performed. The "deploy only changes" only affects how NR decides what nodes need to be stopped/started.
saveFlow/getFlow/getAllFlows are functions of the flow library - the import/export to library option in the menu. These functions are about to be deprecated as they are overly specific versions of get/Save/LibraryEntry (more on those later).
#5) are sheets just a ux to allow flows to be designed in comfort ? :) ie they don't serve any purpose but to seperate flows from a ui point of view
Currently yes.
#6) looks like there is no seperate storage for nodes - from the contents of the .json file it looks like all the nodes are stored in the flow itself, correct ?
The node configuration is stored in the flow - that is what the flow is.
#7) what are the getLibraryEntry and saveLibraryEntry functions for ? I can only find a reference to them in api/library.js
The function/template nodes allow you load/save content - make it easier to reuse content locally. There is an api for nodes to register a type that should make use of the library - if you look at the "how to create a node" documentation overview, you'll see one of the todo items is "library documentation". Anyway, this pair of functions is how the library content is saved/loaded on a per-type basis.
As I mentioned, Im in the process of updating and documenting this API - which is what drove the deprecation of bits of it as I realised how unnecessary they were. We will also be moving the couchdb and mongo storage plugins we have hidden in the bluemix repository into their own repo to make them easier for people to reuse.
Nick