I want to develop a site in php where if any online clients updates any data from the db it has to be broadcasted to all online users.
It can be similar to chat system
So is it better to use long poll or web socket or is there any other better mechanism to do so.
We are currently using short poll but have to wait for it( over here its 5 sec) to get executed.
I want to broadcast the data as soon as there is any update in db it should trigger the script and data should be reflected at clients end