Question

I have developed an application and i have APIs to create video calls. currently my problem is if some one invites other persons to chat, how can i generate a notification for invitees? I am using PHP and MySQL for developing the application. currently i am thinking i should work this way: While inviting, a DB insertion will happen, i should check for this insertion with small interval (may be of seconds). If the person is invited, then he will get notification. Is this the usual practice? Please advice

Was it helpful?

Solution

I finally did it. Do not know if this is the best practice. I created a function to check any database change. I used setinterval to repeat the function with an interval of 5 seconds. And it did work :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top