I'm late for this party, but let me give my two cents.
In this particular scenario, there is no need for a push system for bad notifications. Also there is no need for cron. Let me explain:
Say that A, B and C are in the chat, and browser B is crashing, so his session will expire. Right now, the server thinks that B is still there, but she is not. How do you upgrade A and C? When A and C ASK to upgrade. Check the last timestamp B and find out that her session has expired.
If all accidents A, B and C, then this will never happen, I heard you ask. What's the difference? Now there is no one to see our mistake! The only drawback is maintaining a live chat room that is in the database space. This can be cleared by creating another chat session.
Final meaning:
- Save timestamps the last time an action has been taken.
- Use a custom event to scroll through timestamps and pull out a dead tree.
In the case of users, this will result in their registration. In the case of chats, these will be the ones that have expired.
source share