While immersing myself in NodeJs, and to be fair dabbling with real-time events in PHP (powered by Socket.io and Laravel) I’ve been wondering whats the best way to use bi-direction data flow and the WebSocket Protocol.

The traditional way to produce an app is with REST endpoints and the request/response workflow. Now with NodeJs and WebSockets we can totally invert the universe and use pub/sub to provide data to the UI.

There are many frameworks out there now which offer their own abstracted way to utilise these features by connecting Socket.io MongoDB and some form of MongoDB replica in the browser to ensure everyone who’s subscribed gets the same data at rest and when changing. They are all very inventive do exactly what they advertise, provide bidirectional data flow.

My question is if this is right for all sorts of data?

I get it, it’s a new technology (well, its ease of use is relatively new anyway) so we have all jumped in head first and turned everything into a floating data set. But should it all be like this?

Charts, analytical data, session based stuff (shopping carts, etc)

Yes yes, to me this is where WebSockets really shine. Want to see who’s on your site right now, of course this should be realtime. Browsing a site in multiple tabs and adding items to the cart, it’s expected the cart updates across all those tabs. Viewing your monthly earning reports and a new sale comes in? You want to see that without reload right?

These are all perfect situations for the data to be floating, but others have taken this much further, and I question if it’s the right thing to do, or if the current way of doing so negatively impacts users of the system.

Profile/Account/Resource Management

I haven’t seen an example of this yet, but I dread the day I do. Say you’re updating some settings in your account, and you have a team member who can also access and update these details. Your filling in your address and all of a sudden it changes to a different value because your teammate was working in the same section.

To me this is a big no-no, yet with the integration between floating data and the view rendering in current implementations it doesn’t seem there is any warning, or indeed any interest in providing notifications of this to the user, it’s just expected it will change. I suspect any developer worth their salt will peg back this type of change and provide some meaningful notifications to the user before allowing the data to change, but I strongly suspect every now and then it will get through without notice.

How we notify and/or change the data I suspect will be on a per app basis, and it would be nice to see a UX guru’s opinion of how this would best be dealt with.

Should we notify them, then change it? Or should we notify them, and ask if they would like to receive the changes, or show some sort of side by side comparison, or carry on and overwrite the recent update? It’s a complex task and I don’t think it has been addressed properly so far (if you have seen discussions like this, please let me know. I would love to read and reference them).

Page Content

I can’t think of a worse scenario, your reading a really in-depth post, and when your half way through the text just changes. I don’t think this needs a UX guru to look at ways to implement, I just think it shouldn’t happen at all. But I have seen this done and it worries me going forward.


What do you think? Are there other cases you think this could have a negative impact, or cases where a floating data set is simply a must have? Id love to get other people’s opinions and or references to places this has been discussed before.