Added support for single-user outbound messages#3
Added support for single-user outbound messages#3alberto-schena-gizero wants to merge 25 commits into
Conversation
…g msgs are unicast if property is retained/propagated.
|
Hi! Thanks :-) Could you explain what you want to achieve? Because the code already has the option of handling ajax requests. With this, the client can make a request to a node and it will be send back to the specific client that made the request. |
|
My ultimate goal is to deploy a single dashboard for multiple customers. |
|
Are you sure you can achieve this with the changes you made? Because how do the nodes know to which client to send if there has not been a message received before. Furthermore, the design of this project assumes that each widget has a unique state. For example, the replay messages correspond to each widget and not for different users. It has not been designed with different dashboard states in mind. There is one reason why I am a bit hesitant to merge this: I want to get rid of socket.io in the near feature and this change makes use of a feature from socket.io. Maybe if you explain a little more how you want to use the socketid. |
|
The nodes may know the connected clients by means of a "client node" in the flow, with these assumptions:
Some sort of replay mechanism (rather like a UI re-initialization, actually) may be achieved by using a "client node" instance triggering the fetch of updated data and its injection into the UI of the newly connected user. What do you think? |
|
To simplify the task of mapping each socket ID to/from the specific user details (about capabilities with the UI, and data message pertinence) I'm considering to enrich the "on connection" messages with the socket cookies (which come from the authentication phase). They are exposed by socket.io APIs. So no post-authentication http route to call. |
|
just for your information, I am extremely busy at the moment, but I will come back to this. Is there a reason why you created a new node for disconnect and not handling this also in the current client node? |
|
You're right, I didn't think about that. |
|
thanks! I don't have time to look into it this week, but it now seems fine :-) |
Hello! Congrats for your work, I really like it!
Can you see any pitfalls with my approach about message unicasting?