Welcome Guest, Not a member yet? Register   Sign In
Asynchronous Email
#4

[eluser]WanWizard[/eluser]
Search for cron here, there are some excellent things written about it.

I use a workflow engine to do these kind of things, which basically works with a message queue which is processed sequentially in the background. Which is a system you could use as well.

My message queue table is filled after inserting a record (in your case a new blog record), and contains (amongst other things) the controller and method name to execute, the table name, and the key fields of the record inserted. My cron controller (a CLI process) reads the message queue, calls the controller/method with the table name and key fields as parameter, and removes the message from the queue when finished. The controller/method is specific for the task to perform, and should know what to do with the parameters received (in this case, retrieve the friends list and start mailing).

This runs completely independent of the interactive part of the site.


Messages In This Thread
Asynchronous Email - by El Forum - 05-09-2010, 10:35 AM
Asynchronous Email - by El Forum - 05-09-2010, 11:24 AM
Asynchronous Email - by El Forum - 05-09-2010, 11:32 PM
Asynchronous Email - by El Forum - 05-10-2010, 12:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB