I'm going to briefly discuss the approach, and leave implementation up to you. 

- Send all your emails to a queue
  * Include a job or batch number thats the same for everything in this batch
- Have the queue process the information
  * Use a message queue, a worker, or some other asynchronous processing 
mechanism
  * This means the user / viewer is not blocked
- Poll at a desired rate from the UI
  * Use Javascript to poll a  status URL with the batch number
  * Something like /emails/status/batch123
- Status action
  * Check sent versus total, for a batch number
  * ->find('count', array('conditions' => array('sent' => true, 'batch_id' => 
$batchid)))
  * ->find('count', array('conditions' => array('batch_id' => $batchid)))



Cheers,
Graham Weldon
http://grahamweldon.com
e. gra...@grahamweldon.com
p. (+61) 0407 017 293
Skype: grahamweldon


On Friday, 6 January 2012 at 8:18 AM, GB wrote:

> Based on my research CakePHP does not handle well the scenario that
> may require updating a user periodically on progress (e.g. sending 20
> (200, 2000) emails: 1 of 20, 2 of 20, etc or even updating a jQuery
> progress bar).
> 
> In my case it would be easy to send the CakePHP View the 20 URL's so
> that a javascript or AJAX engine could then run those 20 jobs,
> enabling a progress bar to be shown, even stopping progress if
> desired.
> 
> Am I missing something? If not, any existing solutions out there? Or
> is it so simple nobody has bothered packaging anything (not simple for
> this non-Ajax Baker).
> 
> Thanks!
> 
> George
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 
> 


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to