I have a project with notification features, and I figured out how to get a real-time notification. My idea is to query the table every second. I have a notification table, so whenever a client adds something, it will be inserted into the notification table, and then another client receives a notification requesting it. I am using ajax for this.
Is it good to query the table every second or bad programming practice? I use this only in localhost, and that is normal. Can such an idea negatively affect the site?
in advance for your answers.
source
share