<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 23:21:57 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPEverywhere: Simple Easy Parallel Processing in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10995</guid>
      <link>http://www.phpdeveloper.org/news/10995</link>
      <description><![CDATA[<p>
<i>John Lim</i> has <a href="http://phplens.com/phpeverywhere/?q=node/view/254">a new blog post</a> today sharing his method for simulating parallel processing inside of a PHP application.
</p>
<blockquote>
One problem we were having is that some of our batch processing jobs were taking too long to run. In order to speed the processing, we tried to split the processing file into half, and let a separate PHP process run each job. Given that we were using a dual core server, each process would be able to run close to full speed (subject to I/O constraints). 
</blockquote>
<p>
He shows the two "jobs" files that just echo out the job name and the number of seconds it's been running and the "control.php" that makes use of streams (pointed at localhost) to start the jobs apart from the main script. Another function checks the stream resource to see if it gets an EOF from it and returns back the output.
</p>]]></description>
      <pubDate>Wed, 10 Sep 2008 09:33:51 -0500</pubDate>
    </item>
  </channel>
</rss>
