[rabbitmq-discuss] Return message? [Was: Re: Sample code for python?]

Valentino Volonghi dialtone at gmail.com
Thu Jul 2 22:35:24 BST 2009


On Jul 2, 2009, at 1:33 PM, Allen Fowler wrote:

> In our case, the back-end machines will be .net or possibly Java.   
> The front end web-UI will be python. (Likely TurboGears 2)
>
> As it stands now, the front end machines will be calling specific  
> functions on the back-end boxes via a basic HTTP/XML API.  For  
> instance:  "Place order for customer X"
>
> The back-end machines do whatever processing they need and reply  
> with a result code.  (Success, No Stock Left, System Busy, etc.)
>
> My idea was to use RabbitMQ for the request transport instread of  
> HTTP.  Is this a resonaable idea? Can/Should RabbitMQ be used in  
> this sort of environment?


In this case I have been writing the tool that you might need:

http://bitbucket.org/adroll/quebert/overview/

This is also written in Python but doesn't require Python anywhere else
and deployment is easy.

Most of the things I wrote in an old email to this list are still true:
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-June/004273.html

Although the API changed a bit for the better.

Essentially just using a mediator like this:
http://bitbucket.org/adroll/quebert/src/tip/examples/med.py

and starting it using (just one example):
twistd --pidfile=/var/run/quebert.pid --logfile=/var/log/quebert.log  
quebert --config=med.main --with_syslog_prefix=quebert
Would give you a system that for any message that gets in routes it to  
any
available HTTP server that knows how to process it (and you can do this
through a load balancer or directly sending the message).

The actual example code can be used as a configuration file without
changing it.

You can then easily add more features through hooks or on the point
of execution. I've essentially designed the system to answer your very
same concerns :).

--
Valentino Volonghi aka Dialtone
Now running MacOS X 10.5
Home Page: http://www.twisted.it
http://www.adroll.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090702/48b2086f/attachment.pgp 


More information about the rabbitmq-discuss mailing list