I have a MySQL DB on MaridDB. There's a table that gets new records inserted at inconsistent intervals. sometimes every seconds, sometimes every few minutes.

I have a web page and instead of having the users refresh the page to see new "items" on database, I need a mechanism that will monitor the database table, and check whenever a new record was inserted. for example I have a column named "ID", so when users enters the page and latest ID is 200, I want a push when ID 201 comes and so on.

Is this something to do with WebSocket, SSE, or anything else, and what's supposed to be the dataflow?

I'm not going to do this myself, but as the person in charge for the product I need to have a good understanding so I can have a dialogue with whoever is going to build such thing.


I am thinking about using Trigger on DB, connect it to RabbitMQ, and this way I am saving overhead (vs. having a PHP script querying the DB all time checking for new DB records). Rabbit Will trigger the We socket. Does this makes sense?

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Commented Feb 20, 2023 at 19:45
  • @rohitgupta if you believe this question is not related to databases then vote to close it rather than editing. Commented Feb 20, 2023 at 20:00
  • @MichaelGreen I have added more concrete info. Commented Feb 21, 2023 at 18:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.