Send notification to online users within the system

Asked

Viewed 116 times

-1

How do I make my system after sending a registration to the bd, users who are online receive by notification such action. Example: User(a), added a client in a queue, at that time the system records this record in the queue table, in the next action the system would send to a determine group of users (online) that such client is in the queue. I even managed to do, but notifications only appear to the user who is working, the others do not receive anything.

  • Which database are you using? Firebase has a read option where data is updated when there is a change in the database

  • am using mysql

1 answer

1


I’ve also been there trying to implement a feature that changes the front end in real time.

What I was able to find interesting to solve this problem was about sockets. Since you have the PHP tags and javascript I suppose it’s for the web, so more specifically you can search for Websockets.

There are ready-made tools (calls from Hosted) and other tools that assist in the implementation (Self-hosted). Of the Hosted, the one I liked the most was Pusher. Already from the hosted I found Ratchet, for PHP, very good and easier to work, but there is a more complete one called Reactphp.

You can also use Firebase, a service from Google, which has real-time database functionality. Adapting it to your needs is also possible to use it for this purpose.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.