I'm trying to plan how to build some functionality into my new app, and am unsure if there is a "correct" way to achieve what I am looking for.
There are certain things that I want to get done with my site, say when a certain dateTime is matched aginst some other date time, then send email.
Or for example, consider the badges on stackoverflow, do you think it is done with some big loop testing for people qualifing for new badges, or is there some design pattern I am missing.
This is my current plan.
Setup a function, that will be triggered every 1-10 mins, which will check the db for any rules being met, and therefore action to be taken.
Add these checks on a per user basis, when a user looks at any records related to them, or logs in.
If anyone could shed any light on how for example ebay would handle it's email notifications, I think that would point me in the right direction.
Thanks for any help. Even the name of what I am looking for would be greatly helpful.