Workshop in English - US at php[world] 2017
View Slides: https://prezi.com/0l3a7q5dywc6/building-php-daemons-and-long-running-processes/
Checkout the code: https://github.com/tjlytle/daemon-example
Short URL: https://joind.in/talk/b61c9 (QR-Code (opens in new window))
There are things you don't want to, or can't do, inside a web request. It could be a task that needs to be retired if it fails, maybe one that takes a significantly long time to process, or multiple jobs that need to be processed over time. Whether you're sending an email, processing a video, or consuming Twitter's streaming API, you should be using a separate process, and probably a daemon. In this hands-on workshop, you'll learn how to stop abusing cron, and easily daemonize a PHP script that responds responsibly to process signals.