node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

Clients get out of sync from centralised datastore

Open joepavitt opened this issue 1 year ago • 3 comments

Current Behavior

If you have two separate Dashboard clients open and connected to a centralised Node-RED instance with Dashboard 2.0, the server has a single source of truth.

If one client updates that data, e.g. through a toggle switch, the centralised store of data is updated. However, other clients are not aware of this change until they refresh, which is not the desired behaviour. Any clients connected should update if a client has been the driver of change (i.e. user clicks a toggle).

This already works for all instance where a node is injected with a new value.

Expected Behavior

All clients should reflect the server-side datastore at all times, unless using multi-user authentication/Dashboards architecture

Steps To Reproduce

  1. Add a toggle switch
  2. Open two browsers connecting to the Dashboard
  3. Toggle the switch on one of the clients
  4. Note that the other client doesn't automically update

Environment

  • Dashboard version: 1.4.0

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

joepavitt avatar Mar 14 '24 14:03 joepavitt

This will require a little re-think of our underlying architecture, as this should just be working out of the box, but the events flow doesn't allow for it currently.

joepavitt avatar Mar 14 '24 14:03 joepavitt

Forum Discussion: https://discourse.nodered.org/t/how-to-retain-the-state-of-a-button-on-and-off-between-page-updates-and-different-browsers/86404/8?u=joepavitt

joepavitt avatar Mar 14 '24 14:03 joepavitt

Also https://discourse.nodered.org/t/dashboard-2-changes-in-one-viewer-not-reflected-in-another/85949/5

colinl avatar Mar 14 '24 15:03 colinl

Hi, is there any progress on this issue?

Kind Regards

uschmelmer avatar Oct 29 '24 09:10 uschmelmer

Sorry @uschmelmer - no updates on this currently

joepavitt avatar Oct 29 '24 09:10 joepavitt