Answer the question
In order to leave comments, you need to log in
Realtime notification system in crud application. How to organize?
Hello. There is a task in my crud application on yii2 to notify users about the last 10 new events (for example, an order has been created). If the user is online then use websockets to update this list. If offline, then when opening / updating the page, just load them. Events that are viewed by the user are marked as read.
I liked centrifugo for websockets. but I can not figure out the architecture of such a solution.
As I understand it, I fire an event in centrifugo from yii2. and then how?
Where to store these events? As I understand it, they can be stored in a centrifuge, but how then is it read / not read by the user to organize? If in the database - then how is it better?
And how to connect the user in yii2 with the user in the centrifuge?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question