Pluggable storage extensions for node-specific user settings?

52 views
Skip to first unread message

Mike Blackstock

unread,
Oct 20, 2016, 1:47:10 PM10/20/16
to Node-RED
There is at least one node I know of that also saves JSON files in the current user directory (freeboard).  It doesn't use the storage API and so cannot be used in Node-RED without access to the file system.  Now I know that this node is largely superseded by the new awesome dashboard :-) but bear with me...

One thing I like about the freeboard node is that the user builds the dashboard in the freeboard UI, not using the Node-RED editor.  You create, and add widgets, moving them around in the dashboard itself.  You can then save the layout without redeploying the flows.  Great for demos and building cool dashboard really fast.

There may be other nodes with UI's that need to save node-specific settings outside of flows.  I'm thinking a fancy map node could save the user's current location, zoom level, whether satellite view is shown, etc. in similar way.  My thinking is that this is node data that needs to be saved, but not on a flow deploy.

The problem with the freeboard node is that it saves this data in the file system.  This means it can't be deployed easily in a cloud PaaS.

Is there already a better way to address this issue?

If not, would it be good to extend the document storage API for nodes to save their own data so these nodes can be used without a file system?  Perhaps extending get/setSettings to avoid conflict with global node red settings. e.g. get/setNodeSettings(node, nodeSettings)?

Mike

P.S. and perhaps somewhat related to this - I’m glad that the Flow Library UI is going to be worked on (next on the Trello board); I’d like to see the ability to delete flows from the library using the UI and associated extension to storage plug in.  I can't see a way to delete them without going behind Node-RED's back?


Dave C-J

unread,
Oct 20, 2016, 4:01:15 PM10/20/16
to node...@googlegroups.com
Mike

for my node-red-contrib-web-worldmap I store user settings like selected base layer, location etc in the browser side. 

Mike Blackstock

unread,
Oct 20, 2016, 4:16:09 PM10/20/16
to node...@googlegroups.com

Makes sense.  Other users don't see your setup which is probably what you want there...but what if you want to store your views/settings for others to view (shared)?

Is there a case for non-flow (no need to redeploy) node settings like freeboard's?

Mike

Mike


On Oct 20, 2016 1:01 PM, "Dave C-J" <dce...@gmail.com> wrote:
Mike

for my node-red-contrib-web-worldmap I store user settings like selected base layer, location etc in the browser side. 

--
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/CACXWFwLFHD49QkitMX_dDYGJ7ign3_jQhg%3DRtuEjEcPngsaW%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Dave C-J

unread,
Oct 20, 2016, 5:36:02 PM10/20/16
to node...@googlegroups.com
in my node you can also set the settings from the flow - so everyone starts at wherever the flow wants - but can then save where they want in the browser...  

As you know we aren't currently multi-user so why would nodes need to be configured differently ? If it's data coming back from the browser can't it be stored in any of the available mechanisms - databases, mqtt, etc ?

Mike Blackstock

unread,
Oct 20, 2016, 7:48:38 PM10/20/16
to node...@googlegroups.com
Thanks Dave,

I can see that you can change the config in the flow and redeploy.  I realize we are not multi-user yet, but thinking of the case when multiple browsers possibly from different users access the same node-provided UI.

So, for the freeboard example, I'm thinking it could use browser storage for dynamic per-browser configuration like your node.  This would handle settings on the same browser of course.

Perhaps it could send 'settings config change' messages to persist its dashboard state back into node-red for storage using a flow.  This might be a good way forward to make it storage independent without a need for extensions to the node-red storage API.

And of course it continue to assume it has access to file system or database to save its state directly, but this seems wrong.

Mike

On Thu, Oct 20, 2016 at 2:35 PM, Dave C-J <dce...@gmail.com> wrote:
in my node you can also set the settings from the flow - so everyone starts at wherever the flow wants - but can then save where they want in the browser...  

As you know we aren't currently multi-user so why would nodes need to be configured differently ? If it's data coming back from the browser can't it be stored in any of the available mechanisms - databases, mqtt, etc ?

--
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.

For more options, visit https://groups.google.com/d/optout.



--
Mike Blackstock
Chief Technical Officer
Sense Tecnic Systems, Inc.
308 East 5th Avenue, Vancouver, BC, V5T1H4
www.sensetecnic.com

Reply all
Reply to author
Forward
0 new messages