<HTML>
<HEAD>
<TITLE>Re: [rabbitmq-discuss] About PHP PECL extension</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Happy too. Though I&#8217;m gonna point at you if we start annoying people =)<BR>
<BR>
I looked through the Java client, which would seem to be the most mature and well built client to date. The major difference between the PHP extension (hereby PHPE) and the Java client (hereby JC... get it?) is that the JC allows the creation of multiple channels, and the ability to act within a channel. PHPE instead uses one channel for everything (channel 1.)<BR>
As far as objects go, since I want PHPE to be OO, the current layout seems to make sense to me, with AMQPConnection, AMQPExchange and AMQPQueue. From there, the methods I think need to be cleaned up:<BR>
AMQPConnection should continue to allow the </SPAN></FONT><SPAN STYLE='font-size:11pt'><FONT FACE="Consolas, Courier New, Courier">$params = array()</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> setup, whereby a user can create and set username, password, host, port and vhost, like so:<BR>
<BR>
</FONT><FONT FACE="Consolas, Courier New, Courier">$cnn = new AMQPConnection(array(&#8216;login&#8217; =&gt; &#8216;guest&#8217;, &#8216;password&#8217; =&gt; &#8216;&#8217;, &#8216;host&#8217; =&gt; &#8216;localhost&#8217;));</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
<BR>
However, I want to remove the auto-connect portion of the constructor, so users have to call:<BR>
<BR>
</FONT><FONT FACE="Consolas, Courier New, Courier">$cnn-&gt;connect();<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
That way, we can also add the following method: </FONT><FONT FACE="Consolas, Courier New, Courier">setLogin, setPassword, setPort, setHost, setVHost</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">. I also want to add the following action methods: </FONT><FONT FACE="Consolas, Courier New, Courier">reconnect, disconnect</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial">.<BR>
<BR>
The connection object should in turn give access to exchanges and queues, but how I am not yet sure, and I would love feedback from everyone on this. I like JC&#8217;s approach of using AMQPConnection-&gt;queueDeclare and AMQPConnectio-&gt;exchangeDeclare which would return instances of AMQPQueue and AMQPExchange respectively. I guess those methods would also accept an additional bit mask for options, and if the queue/exchange already exists, the new bit mask values would be applied...<BR>
<BR>
I am tired, so I will stop here and look for others to poke holes in my theory. Feedback from JC users in particular would be much appreciated in terms of likes and dislikes of their client.<BR>
<BR>
Pieter <BR>
<BR>
<BR>
<BR>
On 10/8/10 12:41 AM, &quot;Pedram Nimreezi&quot; &lt;<a href="mc@majorcomputing.com">mc@majorcomputing.com</a>&gt; wrote:<BR>
<BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial">Keep it on the air ways...� if you would...<BR>
<BR>
<BR>
<BR>
On Fri, Oct 8, 2010 at 3:11 AM, Alvaro Videla &lt;<a href="videlalvaro@gmail.com">videlalvaro@gmail.com</a>&gt; wrote:<BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial">Well,<BR>
<BR>
I said where is the place to contribute, not that I had something to contribute right now&#8230;<BR>
<BR>
But we might start using this extension in prod and I remember last time I checked the API there was some stuff I'd like it to be &quot;different&quot;<BR>
<BR>
Regards,<BR>
<FONT COLOR="#888888"><BR>
Alvaro<BR>
</FONT><BR>
On Oct 8, 2010, at 3:09 PM, Pieter de Zwart wrote:<BR>
<BR>
&gt; Oh thank you deity of your choice for answering me. I need help.<BR>
&gt; Lets take this off list so we don't pollute the airways.<BR>
&gt; Pieter<BR>
&gt;<BR>
&gt;<BR>
&gt; On 10/8/10 12:06 AM, &quot;Alvaro Videla&quot; &lt;<a href="videlalvaro@gmail.com">videlalvaro@gmail.com</a>&gt; wrote:<BR>
&gt;<BR>
&gt;&gt; Hi Pieter,<BR>
&gt;&gt;<BR>
&gt;&gt; My question is more where is the source code that we can contribute back. I<BR>
&gt;&gt; know about the PECL stuff :)<BR>
&gt;&gt;<BR>
&gt;&gt; Regards,<BR>
&gt;&gt;<BR>
&gt;&gt; Alvaro<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; On Oct 8, 2010, at 3:05 PM, Pieter de Zwart wrote:<BR>
&gt;&gt;<BR>
&gt;&gt;&gt; Excellent question. The source code for this:<BR>
&gt;&gt;&gt; <a href="http://php.net/manual/en/book.amqp.php">http://php.net/manual/en/book.amqp.php</a><BR>
&gt;&gt;&gt; is available here:<BR>
&gt;&gt;&gt; <a href="http://pecl.php.net/package/amqp">http://pecl.php.net/package/amqp</a><BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; I am reworking it right now to work with Rabbit 2.0.* and 2.1.*. The one<BR>
&gt;&gt;&gt; listed works with 1.7.*.<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; Pieter<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt; On 10/7/10 11:45 PM, &quot;Alvaro Videla&quot; &lt;<a href="videlalvaro@gmail.com">videlalvaro@gmail.com</a>&gt; wrote:<BR>
&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; I think is php-rabbit<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; Thanks!<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; On Oct 8, 2010, at 2:41 PM, Alexis Richardson wrote:<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt; Could it be one of these?<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt; <a href="http://www.delicious.com/alexisrichardson/rabbitmq+client+php">http://www.delicious.com/alexisrichardson/rabbitmq+client+php</a><BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt; On Fri, Oct 8, 2010 at 7:04 AM, Alvaro Videla &lt;<a href="videlalvaro@gmail.com">videlalvaro@gmail.com</a>&gt;<BR>
&gt;&gt;&gt;&gt;&gt; wrote:<BR>
&gt;&gt;&gt;&gt;&gt;&gt; Hi,<BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt; I would like to know where's the code for the PHP extension that appears<BR>
&gt;&gt;&gt;&gt;&gt;&gt; on<BR>
&gt;&gt;&gt;&gt;&gt;&gt; the PHP website.<BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt; Regards,<BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;&gt;&gt; Alvaro<BR>
&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<BR>
&gt;&gt;&gt;&gt;&gt;&gt; rabbitmq-discuss mailing list<BR>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><BR>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><BR>
&gt;&gt;&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt;<BR>
&gt;&gt;&gt;&gt; _______________________________________________<BR>
&gt;&gt;&gt;&gt; rabbitmq-discuss mailing list<BR>
&gt;&gt;&gt;&gt; <a href="rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><BR>
&gt;&gt;&gt;&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><BR>
&gt;&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;<BR>
<BR>
_______________________________________________<BR>
rabbitmq-discuss mailing list<BR>
<a href="rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><BR>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><BR>
</FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
</FONT></SPAN><FONT COLOR="#177E00"><FONT SIZE="1"><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:8pt'><BR>
</SPAN></FONT></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>