[rabbitmq-discuss] PHP AMQP client?

Alexis Richardson alexis.richardson at cohesiveft.com
Sun Sep 30 15:47:19 BST 2007


Tom

Thanks for describing the use cases.  Knowing nothing about PHP, I
would never have realised the server workflow could benefit from
messaging in this way.

I've been scratching my head trying to think of a way to help.  One
thought was to combine one of the C clients (say, OpenAMQ, which is
BSD licensed iirc), with the WSF/PHP plug-in from WSO2, which loads
processors for, eg SOAP and WS-RM, to a PHP web server.  There is
enough family resemblance between WS and REST style invocations, and
AMQP, that the source code might help you.  You can get it from here:
http://dist.wso2.org/products/wsf/php/1.0.0/

Feel free to flame me if this is a completely bogus suggestion.

Thoughts?

alexis



On 9/29/07, Tom Samplonius <tom at samplonius.org> wrote:
>
>   Well, what is challenging about the PHP environment, is any long running tasks.  That is anything that can't be done during the http request/response cycle.  You will want to have a background worker handle any processing that takes 10+ seconds.  So the web handler can just put a message in the queue, and a background worker can process it.
>
>   Also, doing critical steps in a web response code isn't exactly great either, because the Stop button issues.  In some cases, a stop, will cause the web server to stop the PHP interpreter, possible leaving various things in a unknown state.  Particularly if your PHP script is talking to an external web service.  It would be much better to have any critical processing done by a background worker, which has a more stable execution environment.
>
>   An another issue, is serialization.  I have a remote control hardware device connected to a serial port.  Only one application can be talking to it at once.  A message queue provides an ideal serialization mechanism.
>
> > alexis
> >
> >
> >
> > --
> > Alexis Richardson
> > +44 20 7617 7339 (UK)
> > +44 77 9865 2911 (cell)
> > +1 650 206 2517 (US)
>
>
> Tom
>


-- 
Alexis Richardson
+44 20 7617 7339 (UK)
+44 77 9865 2911 (cell)
+1 650 206 2517 (US)




More information about the rabbitmq-discuss mailing list