Von: Adam
I’m in two minds at the moment and can’t decide on the best approach for developing a PHP application where it’s main purpose is scheduling tasks. I’m currently re-factoring a previous version which...
View ArticleVon: abcphp.com
Parallel processing in PHP… Since PHP does not offer native threads, we have to get creative to do parallel processing. I will introduce 3 fundamentally different concepts to emulate multithreading as...
View ArticleVon: Erik
Nice comparison, I’ve used the exec method before, didn’t know about the other two. @Jason you can use nohup to have the process break from the parent and continue running. I’ve used this method for...
View ArticleVon: Louis-Philippe Huberdeau
You can also use the default stream extension with non-blocking options to parallelize requests. It also works fine for webservice-intensive applications. stream_select() will avoid the idle loop by...
View ArticleVon: Indrek
You have done little wrong in fork example. Better example: $pids = array(); for ($i = 0; $i < 4; $i++) { if ($pid = pcntl_fork()) { $pids[] = $pid; break; // Now I'm child process and exit from...
View ArticleVon: Programowanie w PHP » Blog Archive » David Müller’s Blog: Parallel...
[…] a recent post to his blog David Müller has taken a look at parallel processing in PHP using a few different methods – system calls, fork, and curl. Since PHP does not offer […]
View ArticleVon: Nikvasi
I think PHP is not suited for this at all. First PHP is not thread safe, so we can not use native threading with pcntl_fork(). In second exec() is good for one process, but with multiple of them you...
View ArticleVon: javier
Best info about parallel processing I could find in all the net, the only thing I would add would be gearman, but it’s kinda different since you have to set up your php for it. Kind regards David
View Article