[rabbitmq-discuss] Perl AMQP client software in github

Eric Waters ewaters at gmail.com
Wed Jul 15 17:24:40 BST 2009


I choose to create two separate projects to allow for the greatest
flexibility in implementing client or server software.
Net::AMQP is a OO representation of the protocol.  It uses the XML spec to
dynamically create new classes in a Net::AMQP::Protocol:: namespace.  The
chief purpose of this is to (de)serialize the wire-level encoding of AMQP
frames and provide convenient OO representation of the frames.

POE::Component::Client::AMQP is an asynchronous client module which
establishes the TCP connection to the server and uses Net::AMQP for it's
(de)serialization of the frames.  It has to know some of the basics of the
protocol, such as the connection grammar Start/StartOk, Tune/TuneOk, etc
(though, now that I think of it, it's possible this could be moved to
Net::AMQP as well).  It uses the data in Net::AMQP to automatically handle
synchronous methods and their expected responses and content header
building.  Ultimately POE::Component::Client::AMQP offers simply a channel
for sending Net::AMQP packets and handling their responses, allowing you to
write complex clients without worrying about the details of connecting and
the protocol.

POE is a reactor pattern (http://en.wikipedia.org/wiki/Reactor_pattern) for
Perl.  It is similar to Twisted for Python and EventMachine for Ruby.  Some
people aren't fond of programming with the reactor pattern, as it's more
difficult to track what's
happening at any given moment, and one can't usually write linear
code.  For this reason, it's likely that another Perl client will be
instituted (lenz
is working on Net::AMQP::Simple) that will probably use IO::Socket directly.

Eric

On Wed, Jul 15, 2009 at 2:41 AM, Alexis Richardson <
alexis.richardson at gmail.com> wrote:

> Eric
>
> Thanks for this.  I'm not familiar with Perl so please can you explain
> how the two projects relate to each other?  Should they always be used
> together?
>
> alexis
>
>
> On Sat, Jul 11, 2009 at 12:06 AM, Eric Waters<ewaters at gmail.com> wrote:
> > I'll avoid talking about something that's not specific to
> > RabbitMQ in this forum in the
> >
> future, but wanted to mention this as a follow up to a post earlier this week.
> >
> I now have functioning code released for Net::AMQP and POE::Component::Client::AMQP.  Tested it against RabbitMQ 1.6.0.  Get it from
> http://github.com/ewaters.  You'll need to clone both repositories
> > to run the example pingpong.pl program (idea copied from ruby-amqp).
> > To try it out, clone both projects into the same directory, cd into
> > poe-component-client-amqp, and run:
> >   DEBUG=0 perl -Ilib -I../net-amqp/lib examples/pingpong.pl
> > ../net-amqp/spec/amqp0-8.xml
> > If you'd like to see the full protocol debug, change DEBUG=1.
> > The perl modules are fully documented in POD.  If anyone is interested,
> I'd
> > love for collaboration on the project.  Drop me a line with your github
> > username and I'll add you as a github collaborator.
> > Sorry for the interruption.  Back to your regularly scheduled RabbitMQ
> > programming.  :)
> > Eric
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090715/bd69fdb2/attachment.htm 


More information about the rabbitmq-discuss mailing list