I would like to implement a reminder functionality on a website, where a (anonymous) user can define a time for a (pop-up) reminder to fire automatically. Think of it as a digital egg timer, where you are reminded after some 5 minutes that your eggs are hard boiled... ;-).
My initial idea was to save the due time in $_SESSION['reminder'] and let Drupal check at each cron run whether the reminder is due. However, this approach fails because hook_cron operates on a global level and therefore does not recognise $_SESSION variables. On the other hand, saving the due time in, say, a node field does not make sense either: Drupal would find all due reminders and fire a pop-up which would be visible to every user currently on the site! So summing up, I need to find a way to initiate a process at a given time that is restricted to a particular session. Can anyone give me advise on how to go for this one?
Also, I need the reminder to pop up at the very top of all running applications in order not to be missed by the user. This is obviously something that all pop ups would like to achieve, so a user would probably have to give special pop-up permissions to this site. But how can I program such a pop-up, and what special settings are required? Alternatively, I could display the reminder as a (browser independent) system message, like the messages when receiving an MS Outlook email for example. Does anybody know whether and how this can be easily achieved?
I am sorry that this request is a bit vague, but it's really more about the general strategy and I haven't reached the level for detailed questions yet. So I would highly appreciate your ideas and experiences in similar applications in order to get inspired.