<?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>Sat, 18 May 2013 13:41:15 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Enqueue Symfony's process components with PHP and ZeroMQ]]></title>
      <guid>http://www.phpdeveloper.org/news/19434</guid>
      <link>http://www.phpdeveloper.org/news/19434</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post today showing how he set up <a href="http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php/">queuing with ZeroMQ and Symfony components</a> and <a href="http://reactphp.org/">React</a>.
</p>
<blockquote>
Today I'd like to play with <a href="http://www.zeromq.org/">ZeroMQ</a>. ZeroMQ is a great tool to work with sockets. I will show you the problem that I want to solve: One web application needs to execute background processes but I need to execute those processes in order. Two users cannot execute one process at the same time. OK, if we face to this problem we can use Gearman. I've written various posts about Gearman (<a href="http://gonzalo123.com/2011/03/07/watermarks-in-our-images-with-php-and-gearman/">here</a> and <a href="http://gonzalo123.com/2010/11/01/database-connection-pooling-with-php-and-gearman/">here</a> for example). But today I want to play with ZeroMQ.
</blockquote>
<p>
He uses React and some ZeroMQ bindings and Symfony's <a href="https://github.com/symfony/Process">Process</a> component to make a simple client and server for working with the queue and processes. A screencast is included in the post showing them making the connection and adding the new process. The full code can be found <a href="https://github.com/gonzalo123/zmqlifo">on github</a> (or installable <a href="https://packagist.org/packages/gonzalo123/zmqlifo">via Composer</a>)
</p>
Link: http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php]]></description>
      <pubDate>Tue, 09 Apr 2013 11:11:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rasmus Lerdorf's Blog: ZeroMQ + libevent in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16928</guid>
      <link>http://www.phpdeveloper.org/news/16928</link>
      <description><![CDATA[<p>
<i>Rasmus Lerdorf</i> has a new post to his blog sharing the results of some "investigative hacking" he did to see if making <a href="http://toys.lerdorf.com/archives/57-ZeroMQ-+-libevent-in-PHP.html">ZeroMQ and libevent</a> work together was difficult. Thankfully, the answer was "not hard at all".
</p>
<blockquote>
While waiting for a connection in Frankfurt I had a quick look at what it would take to make ZeroMQ and libevent co-exist in PHP and it was actually quite easy. Well, easy after Mikko Koppanen added a way to get the underlying socket fd from the ZeroMQ PHP extension. To get this working, install the <a href="http://www.zeromq.org/bindings:php">PHP ZeroMQ extension</a> and the <a href="http://pecl.php.net/package/libevent">PHP libevent extension</a>.
</blockquote>
<p>
He includes a sample script show the results of his work, a basic server and client that sends a request to the ZeroMQ server and fires off an event using the <a href="http://libevent.org/">libevent</a> library (via PHP's <a href="http://pecl.php.net/package/libevent">extension</a>. You can find out more about using these two libraries in the PHP manual - <a href="http://php.net/libevent">libevent</a> and <a href="http://php.zero.mq/">ZeroMQ</a>
</p>]]></description>
      <pubDate>Thu, 29 Sep 2011 11:45:39 -0500</pubDate>
    </item>
  </channel>
</rss>
