Reputation: 796
The Goal:
What I am trying to do is when the MySQL database has changed send the changes to the clients currently connected.
I was thinking of trying to accomplish this using websockets however the only implementation I have seen of this is a client sends something to server and the server sends that to all the other clients.
What I am trying to do is the client connects to server (That's all the client has to do) then whenever the server has seen a change in the mysql database sends the changes to all the clients.
If websockets is the best solution could someone possibly explain how I would implement that? Or if there is a better way then websockets what is it?
Upvotes: 0
Views: 2713
Reputation: 26
I found solution for that i can give you my code because i think websocket is the best way to do it easy. and Now,what I am trying to do is the client connects to server then whenever the server has seen a change in the MySQL database sends the changes to the specific clients(something like : save the id client get it from database in cookie then send it to the server to check the right client in order to show for him the new data).
Check this link
Upvotes: 1