Question

I have been knocking about thinking about this issue for a while now and just need some closure as to what solution to take!

I'm considering deploying my CakePHP application to AWS Elastic Beanstalk and I'm trying to find solutions on the following:

Firstly, I have listeners than can be run by a console command (path/to/Console/cake sqs) that can keep checking for SQS message (to pass on to workers). I would like to daemonise this process somehow to ensure these listeners never stop running on all the servers.

Secondly, I'm considering how to approach the cron job issue. I'm thinking either have cron jobs on all servers but MySQL or ElasticCache locks to only allow the first server to actually run the job or alternatively, use an outside service like Iron.io to schedule messages.

I'd appreciate your experiences.

Was it helpful?

Solution

Have you taken a look at the Fat Controller ? It can daemonise anything. There's documentation and examples on the website: http://fat-controller.sourceforge.net

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top