Question:
I'm developing a Help Desk system, and I would like some ideas on how to create a notification system similar to Stack Overflow itself, whenever new support is registered.
I intend to use PHP, MySQL and jQuery only.
Should I use window.setTimeout
to check the database from time to time if a new ticket is registered?
Answer:
I just answered a similar question, except it was about a chat.
The options they have are the following:
To implement the chat:
- the option that will give you the greatest coverage in terms of browsers is called long-polling , but it is also the one that will require the most work. See more about the technique: long-polling
- another option that will be easier, is to use websocket , and create a connection to the server, which will be able to send messages when some chat event occurs… like send a message, but in this case the server will have to be able to receive the client connection via websocket (you will have to be able to wait for connections… just search for "php websocket" on google and some libraries appear).