I have a system where customers open something similar to a ticket, this ticket is passed between the designated employees (it can’t be just anyone, it must be the one specified) until it is completed and the final response is sent to the customer who opened it.
This ticket must be answered quickly by employees, so the system checks from time to time if there is something for that employee to respond to.
The way I implemented it was by making requests at each time interval, but I didn’t like that… and in order to try to refactor the code I’m trying to find better alternatives.
I saw something about web socket but I still don’t understand if that is the “correct” alternative, how will I know if there have been changes in the database?
I’m looking for suggestions on how to implement this in a more efficient way.
Eduardo Silva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.