A
A
AlpineMilk2020-05-27 21:26:11
symfony
AlpineMilk, 2020-05-27 21:26:11

How to track new entries in the database online?

The site is written in symfony, admin panel and client part (monolith). What tool to track in the admin panel that a new order entry has appeared?
Scenario:
1. A page with orders is opened in the admin panel.
2. In the client part, the user places an order for the product.
3. A notification should appear in the admin panel that a new order has appeared without reloading the page.
I know that for this it seems like web sockets are used, but in conjunction with the symphony, what is better to use? And what socket then to take for this purpose? If this is done not only on sockets, then please also write

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2020-05-29
@AlpineMilk

1. Use Ratchet to create a server socket in php. Everything is very simple there.
2. Or beat the ajax server with requests every N seconds and display what you need.
The first is better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question