-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local (client) scope for dashboard nodes #430
Comments
Some complexities here to consider/discuss: We currently use the concept of a We can restrict message comms to a client if a
Another factor to then consider is that, currently, we transmit |
Hi Joe, Given the above limitations & complexity of restoring the last state of centralized ("server-based") nodes, IMHO it would be unrealistic to try store & restore client-specific nodes, and I would draw the line here and avoid it.
It should be fairly easy for the developer to initialize the local-scope nodes upon page load (e.g. via a template node sending a startup message at the beginning of its JavaScript section) |
I rather agree with the thoughts from @omrid01. This was the reason why I registered this issue some time ago: to let the input messages change the server side state in the datastore, instead of storing these messages themselves. So new clients get the latest state of the node, instead of the latest message. Like Flexdash used to do it. |
Some important changes that I have built into Dashboard 2.0 to address this are:
I think I like this. Will be a mission to implement (needs to be duplicated across all core UI nodes), and would also then require all third-party widgets to implement this too though, which makes me hesitate. What I'm tempted to do, is have this configuration live in the sidebar, that way, I can centralise the logic, and it will auto-handle any third-party widgets too?
This could be a far more effective way of storing the data vs. how we do it today. My concern here is that it then requires every node to define a schema of what it's "state" looks like. Currently, this is not required, we store the raw |
Excellent. Will we be able to assume that the
This could work for objects like
It will be probably good enough to add this just to ui-templates, as this is what multi-user implementations are using. |
You are correct
This is getting very complicated, very quickly, with a lot of detailed configuration options on all nodes. I am hesitant.
Just so that I understand your own motives here, are you coming from the perspective of a third-party developer for widgets, or user/developer utilising |
I agree. A far as I'm concerned, I'm better off with no message storing/replay at all for template nodes. It's more hassle than help and giving us a big headache in Dashboard V1.
I'm chief solution architect, implementing Node-red (and loving it), in more than 20 of our company's projects. We are using ui-template for 2 main purposes:
We also developed many custom nodes (for internal use), but not for UI |
This I can get on board with. When chatting with @MarianRaphael about this topic, we settled on core Dashbaord 2.0 having two states:
Expect this is (easily) configured at the UI/Page level, more complicated on a node-by-node basis. |
Fine with me. Is it possible to separate this page-level config into 2: one for ui-templates, and one for all other UI nodes? |
Description
Dashboard nodes can be instantiated across multiple concurrent dashboard clients, but maintain a single state/value (replicated automatically across clients). In multi-user scenarios, there is a need for local client scope (for example: per-client input fields & progress indicators).
It is possible to provide this multi-user functionality by programming around the nodes (filtering messages based on client id), yet it would be beneficial to enable this as a built-in capability.
The proposed feature is to add a checkbox to all dashboard nodes (or at least to ui-template), indicating the scope. If checked, incoming messages will be tested for a client-id property, and will accept the message only if either:
The flow will be able to dynamically set the message scope, by adding/deleting the client id property.
Note: the client id can be the existing socketid property, or a new dedicated id. It is assumed that all outgoing messages from dashboard nodes automatically include this id (as done today).
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
The text was updated successfully, but these errors were encountered: