Okay, here is my situation: I'm looking for the best design approach. I'm working in PHP/Smarty on the server-side and HTML/jQuery for the client-side, but that is not really important here.
I have this multi-user system on my server. It is a kind of ordering system. A standard user -- let's call them customer -- can order some items from the webshop. The webshop contains items from multiple sellers.
When the user (customer) places the order, the seller -- also a user in the system -- has to get notified that there is a new order and confirm/decline it.
When the seller confirms/declines the order, a notification has to be send to the user giving him/her the status of his/her order.
Orders are stored in the database, as well as order confirmations.
The only way I can think of right now is to constantly -- in short intervals with AJAX -- check for new records in the database, from the sellers' screen, and do the same thing for the customer when he/she is waiting for the confirmation.
But I'm thinking, is there any way to trigger notifications to the seller when the user(customer) places the order so the seller could load the database only when needed and not constantly in intervals?
The same goes for the customer when he/she is waiting for confirmation. But that is not so important because it doesn't happen all the time. There is a waiting limit when the order will be automatically declined if the seller doesn't respond.
I hope you understand my question.