|
|
|
|
|
by nevi-me
3659 days ago
|
|
I commented separately, I use sockets for this. I don't know about libraries for PHP as I haven't used it in a while, but most socket libraries make it easy to implement something. My implementation is in-memory, and the nice thing about it is that if fit example my Node.js app restarts, all active users will get disconnected, and they will emit a connection event, allowing me to get the count of online users again. I can extract relevant code and share it if it'd help. |
|
I've come across Socket.io before, and played around with pusher as well. And if i remember correctly, Laravel has built in helpers for sending websocket messages.
My main issue is actually running the node.js application, as its something i've not done before. That was another reason for not using websockets. Wanted to remove as many barriers that might slow us down or stop us from launching, so we stuck with what we knew.
I'm sure i'll update this at some point to use websockets though, gotta learn how to deploy node.js sites at some point :D