We did. And we had to come out with an out of the box idea to manage the same.
Once installed, only minor changes were required in our code to send those emails to a “job queue” instead of to the Mandrill API. Further to this we wrote a piece of “worker” script to process the queue. This “worker” script actually started taking the information from queue and sending the mails via the Mandrill API.
Yes we still had some possible issues in our hand before the solution could be deployed –
This would kill all the “worker” scripts and someone would have to manually start them.
Definitely the entire solution was required to be polished further to handle these issues and we installed a component called “Supervisor” to manage the same. “Supervisor” is a client / server component that allows its users to control a number of processes on UNIX-based operating systems. This component also has a web interface where you can manage the “worker” scripts (Start / stop the individual scripts as and when required).
So finally, although PHP does not support multithreading we had managed to overcome its limitation with the help of Beanstalkd and Supervisor.
Laxmikant Purohit, Senior Manager at Direction has more than 15 years of IT experience. Believes in being Light and Agile philosophy for delivering projects. He is a certified SCRUM Professional.