# Before I start questions

**URL:** https://discourse.nodered.org/t/before-i-start-questions/57285
**Category:** Dashboard
**Tags:** uibuilder
**Created:** [26 January 2022 19:30 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285 "2022-01-26T19:30:20Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [26 January 2022 19:30 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/1 "2022-01-26T19:30:20Z")

</div>

Usual preamble. I am not a programmer.

Have spent just over an hour reading threads here, the uibuilder wiki and the projects GitHub many pages and cant find an answer to this question....

Is uibuilder multiuser aware?

My main pain point with the Node-RED dashboard is my search page. If one person searches, everyone sees their results and if another person does a search before the previous one is done reading their results, that person then does their search again, over riding the... yeah, its a useless mess.

From what I can gather reading the uibuilder pages, this is still going to be an issue. Not only, but worse, it seems that using uibiulder I will need to write Node-RED code to individually handle every users search data?

Looking to replace the Node-RED dashboard, but want to be sure, be VERY sure, that the new solution will remove as many current pain points as possible.

Thanks.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [26 January 2022 20:20 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/2 "2022-01-26T20:20:59Z")

</div>

> [@thebaldgeek](#):
>
> Is uibuilder multiuser aware?

Drum-roll please ......... "kind of"!

uibuilder is _capable_ of being multi-user that's for sure.

There are both ExpressJS and [Socket.IO](http://Socket.IO) middleware hooks for example that let you hook in server-side logic which can include user/session handling.

In addition, since there is a control message for connecting and disconnecting clients, you can build logic flows to handle user identification, authentication and authorisation.

And if you try out the vNext branch, you will see that I've added some additional capabilities to support this more easily. Notably including the client IP address in control messages and giving each client (a web browser window/tab) a unique identifier that is independent of the socketId (which is reset if you reload the page or have a temporary loss of connection).

Even before vNext, I know that there are people who have implemented multi-user web apps using uibuilder.

And of course, you could also put a reverse proxy in place to handle identification, authentication and authorisation.

I have also been trying to add a more direct security capability to uibuilder. However, it is very complex to get this right, especially when working with both http and ws. I've still not found methods to make this both easy to use and secure. Though you are more than welcome to try it out and tell me where it should improve 🙂 I wouldn't recommend it for live use though as there are certainly gaps and it is likely to change quite considerably again.

> [@thebaldgeek](#):
>
> My main pain point with the Node-RED dashboard is my search page. If one person searches, everyone sees their results and if another person does a search before the previous one is done reading their results, that person then does their search again, over riding the... yeah, its a useless mess.

That won't happen with uibuilder if, in your flow logic, you retain the `msg._socketId`. If that is included when you send a msg to uibuilder, it will only go to the client that has that socket id. No other processing is required. Just remember that there are situations where that will result in the client not getting anything because something caused their socket id to change. Normally won't happen much if at all but it _can_ happen.

> [@thebaldgeek](#):
>
> From what I can gather reading the uibuilder pages, this is still going to be an issue. Not only, but worse, it seems that using uibiulder I will need to write Node-RED code to individually handle every users search data?

No, not really. As I say, all you need to do is retain the \_socketId throughout the search flow. If you need more, then you can certainly make things more robust but if you look at vNext, you will see that with the IP address and clientId along with the \_socketId, you can easily build a flow that will manage multiple user sessions even if they change networks as long as they keep the browser window/tab open (the user identifier is passed via a session cookie).

> [@thebaldgeek](#):
>
> Looking to replace the Node-RED dashboard, but want to be sure, be VERY sure, that the new solution will remove as many current pain points as possible.

Indeed. Fully understandable. And I am keen to understand how people _want_ to use uibuilder so that I'm extending it in ways that people find useful. So I'm more than happy to have discussions about this. 🕶

* * *

Oh, and of course, not to forget that each instance of the uibuilder node gets a different websocket namespace. Doesn't really help in the case you've outlined, but it does ensure that comms channels are forceably separated. This lets you build independent data-driven web apps from a single Node-RED instance.

---

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [26 January 2022 20:27 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/3 "2022-01-26T20:27:21Z")

</div>

Thanks for the prompt answer.

You clearly have put a ton of work into uibuilder. Kudos man.

IP address vs socketId.  
I can easily have ~100 users connected and I know that many connect from more than one device in their house so I think I need to look at other dashboard options as tracking all those socketId's does not sound like something my skill set is up for.

Again, thanks for being upfront about the question.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 January 2022 20:57 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/4 "2022-01-26T20:57:13Z")

</div>

> [@thebaldgeek](#):
>
> My main pain point with the Node-RED dashboard is my search page. If one person searches, everyone sees their results and if another person does a search before the previous one is done reading their results, that person then does their search again, over riding the... yeah, its a useless mess

If that is your only pain point & you are happy with everything else for now (i.e. while you learn and rebuild in ui-builder) then you could make the search page using endpoints and standard web controls.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [26 January 2022 21:25 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/5 "2022-01-26T21:25:43Z")

</div>

> [@thebaldgeek](#):
>
> so I think I need to look at other dashboard options as tracking all those socketId's does not sound like something my skill set is up for.

You don't need to "track" them. I've tried to keep the processes so far to be as free of session tracking as possible knowing that, when you _do_ need to add session handling - usually for security purposes - you will need to provide a store and lookup process. That is likely to mean using technologies you are already familiar with - of which there are many. So in true uibuilder style, I want uibuilder to save you some time and energy without tying you in to specific tech.

In your case, all you need to do is make sure that the data you are sending round your flows retain the socket id - that's it - and Node-RED will do that for you unless you insert something that looses the origin msg object.

> [@thebaldgeek](#):
>
> look at other dashboard options as tracking all those socketId's does not sound like something my skill set is up for.

Well any other option will need to do something similar to what uibuilder already gives you.

Whatever methods you use, you HAVE to have an id that comes from the client and goes back to the same client. With web endpoints, the only other option _would_ be to implement server-side session management and that is a lot more work. Retaining the socket id is simple, lightweight and reasonably robust and requires no tracking or storage.

---

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [26 January 2022 22:17 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/6 "2022-01-26T22:17:06Z")

</div>

Ok, sounds like I am going to swap pain for pain.  
But, if it means swapping my users pain for my pain, I think I am up for that.

Two things.

1. It sounds like the what ever new dashboard I pick, it will become my new pain.
2. Making sure my flows retain the socket id sounds painful.
3. After 1.5 hours in the uibuilder docs I have no idea how to install it or run it.... so it could be fun.

Not only can I not code, but I clearly can not count either.....

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [26 January 2022 23:26 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/7 "2022-01-26T23:26:34Z")

</div>

> [@thebaldgeek](#):
>
> swap pain for pain

Isn't that the story of IT?! 🤣

> [@thebaldgeek](#):
>
> swapping my users pain for my pain, I think I am up for that.

Well, you know we've got your back 🕶

> [@thebaldgeek](#):
>
> Two things.

Urm, last time I checked, I think that is three 😀

> [@thebaldgeek](#):
>
> It sounds like the what ever new dashboard I pick, it will become my new pain

Yes, I think that is inevitable. But an interesting journey so look on the bright side.

> [@thebaldgeek](#):
>
> Making sure my flows retain the socket id sounds painful.

I don't think so. I'm sure there are ways to work through the problem. You probably need to start with building some test flows to try out the concept.

> [@thebaldgeek](#):
>
> After 1.5 hours in the uibuilder docs I have no idea how to install it or run it.... so it could be fun.

OK, now you've made me sad! 😭

I thought it was simple.

Add a uibuilder node, set the url in the settings, select a template. Add debug nodes to the two outputs. Deploy. Send a msg to the node. See the data in the front-end.

Have you seen the beginners guide as well?

> [@thebaldgeek](#):
>
> Not only can I not code

Ah well, coding is just like any other skill. If you can think, you can code 👌

---

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [27 January 2022 12:33 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/8 "2022-01-27T12:33:43Z")

</div>

> [@TotallyInformation](#):
>
> Have you seen the beginners guide as well?

I read the Wiki and the GitHub pages.  
There is a third place for docs?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [27 January 2022 13:44 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/9 "2022-01-27T13:44:07Z")

</div>

> [@thebaldgeek](#):
>
> There is a third place for docs?

Not for docs but I had several requests in the forum for a beginners guide so I added something to the FAQ's:

[Uibuilder: Getting Started Walkthrough (part 1) - FAQs - Node-RED Forum (nodered.org)](https://discourse.nodered.org/t/uibuilder-getting-started-walkthrough-part-1/51483)

I need to remember to move that to the WIKI probably 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [26 February 2022 13:44 UTC](https://discourse.nodered.org/t/before-i-start-questions/57285/10 "2022-02-26T13:44:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
