My 1st post, but i got many great answers and tips from stackoverflow so far. This one was a close call- How does facebook, gmail send the real time notification? but not exactly, so let brainstorm this together.
I have CMS system with mail notification when a change is made on the site. Everything wotk very well but i want to prevent multiple notification if somene make another quick change to, let say, fix a typo. Using php mail(), obviously.
I've tough of 2 ways, one simple, and one.... let just say, pretty heavy... cough. the 3rd one was inspired by Implementing Email Notification but really doesn't look appealing to me to send bunch of email at once.
Use a timestamp to check if another change was made in the 'let say' last 5 minutes.
Record the last change, and compare it to the new one. Could be usefull for backup at the same time since i'll have to save the change somewhere, but text can be long and making an sql search would be painfull. Wouldn't it?
Use cron to send changes every x minutes... convince me if you ythink it is a suitable solution.
Any ideas, comment or suggestion of your own? Looking forward for your inputs, and since i now registered, i'll do my best to help around.
Cheers, all
llt