I
I
Ivan Ivanov2019-10-21 18:42:27
MySQL
Ivan Ivanov, 2019-10-21 18:42:27

Socket.io + mysql how to sync?

I'm trying to make a react application in conjunction with sockets and a mysql database.
I wanted to do something after adding something to the database, threw everything that was added to React through the socket and output it there, but I don’t know how to implement it except as a timer and checking every N seconds

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-10-21
@0id131

In the normal case, nothing else. In general, for good, there is such an approach as Event Sourcing when, after writing to the database (for simplicity), an event is sent to the queue, which is listened to by an independent handler and responds to the desired websocket pipe

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question