Hello everyone,
Someone have idea how I can create a Collaborative Web Page. The idea is if me and another person has the same page open and if I wrote something, what I wrote will appears in screen from the another person without any action from him.
I trying to find the most efficient way to do it.
Thanks in advance, Paulo Torres
Hi Paulo,
is this article from Rui Barbosa the kind of thing you are looking for ?
Dorine
Hello Dorine,
Yes indeed. Do you think also works with push notifications? Like firebase or pusher?
Thanks, Paulo Torres
Well yes,
I have never done anything real with those, but they seem to me convoluted and heavyweight solutions, so it really depends on how complex your requirements are, but I would think for a simple collaborative page SSE would be enough.
You could go even simpler and just have your screen poll for updates every few seconds, but I personally don't like that, it feels like way too much traffic for no reason.
But I'm no expert in any of these things, I just wanted to offer SSE as a possible solution.
I would probably send just a ping to all users on that screen whenever an update is made, maybe with an added id identifying the "page" that was updated, and make the screen refresh to the latest info if they match that page, in response.
There is something very satisfying in accomplishing something with a simple solution.
I also don't like to refresh the page every seconds!
Probably push notification not works.
How I can ping the user?
Hi @Paulo Torres ,
have you looked at this component ? It looks robust and well made to me, also well documented. It has a helloworld example to get you started.
in SSE_IS module it has 2 README actions that explain step by step how to set it up and what the best practices are.
So what I mean with ping, is that I would use this component by executing the broadcast at every update of the data, only sending a message of "please refresh" to all listening clients, and have the client decide for themselves and execute refreshes of any dataAction or Aggregate that needs it.
Hi Dorine,
Yes I saw and tested. In fact is the only one working in forge dor SSE and it's ready-made!
I will test some components we have in Forge with WebSockets, probably the behavior it's similar.
Thanks a lot for your help
Hi,
If you want to have a real collaborative environment, you may be better off with a service which shares state between users. Twilio Sync or Azure Fluid Relay (<- based on the Open-Source Fluid Framework) are services which provide shared state between users for web applications.
I doubt that server sent events or websocket notifications will give you a good user experience as there is always some delay in between.
Stefan
Hello Stefan,
Thanks for your message. Those apps you told is more for chat, video and voice share, no?
What I need is more like a confluence from atlassian or google sheets.
Anyway for now I implemented with WebSockets (Pusher) and it seems working well.
Best Regards, Paulo Torres
no, both services provide a realtime shared state between connected clients. I've used Twilio Sync in a project where multiple users can simultaneously fill out large web forms. Well, of course you could develop a chat with both, but not video or voice. Twilio has different services for voice and video collaboration.
Best
Hi Stefan,
Did you use some component from the forge?
From here I don't understand what the product you are talking about, can you help me?
When you log into the Twilio Console you find the Sync product under Developer Tools
I haven't used a Forge component. I might find some time to extract it from the customers project, but as i remember that was a very custom development. Syncing the state to OutSystems properties was somewhat challenging :-)
Thanks Stefan. I'll try to explore!
The sad thing it's this is a paid tool 😅
Regards, Paulo Torres