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

New Nodes: In/Out User-Specific Context Store

Open joepavitt opened this issue 1 year ago • 2 comments

Description

With the release of https://flowfuse.com/blog/2024/06/dashboard-multi-tenancy/, we've had feedback that it would be useful to have an easier way to store temporary/context data on a user-by-user basis.

I was chatting with @knolleary, initially proposing us having a standalone Dashboard store alongside flow/global stores, but then it would be tricky as we'd lose the value of that separation. Instead, Nick proposed, and I agree with, the idea of adding some new nodes - likely as a third party installable, rather than part of core. These new nodes would provide a wrapping interface to the context stores, allowing users to key by some user-specific id (e.g. socketId, user.email)

Nodes required would likely be:

  • save/set - given a user map, property and value, store this in a context store
  • get - retrieve a given value, given a user id and property
  • clear - remove all data form a given user (in the case of socketId being disconnected, an easy way to remove everything associated with the lost connection, or possibly a given value for property?

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

joepavitt avatar Jun 21 '24 13:06 joepavitt

@colinl @thebaldgeek @SynoUser-NL - tagging you here as I know this is friction you've hit with the multi-tenant stuff

joepavitt avatar Jun 21 '24 13:06 joepavitt

@joepavitt : Thanks Joe and @knolleary, I think that solution would work fine and, while Joe's current solution works like a charm, such a set of nodes would be very helpful for us.

SynoUser-NL avatar Jun 21 '24 20:06 SynoUser-NL