Comment 4 for bug 686048

Revision history for this message
Esteve Fernandez (esteve) wrote : Re: [Bug 686048] Re: Responses mismatch requests resulting in ValueError being raised.

Hi

On Wed, Dec 8, 2010 at 5:21 PM, Marek Kowalski
<email address hidden> wrote:
> Thanks for your reply. Well, about sending the code I would have to ask
> my boss first. ;) I will get back to it.

No problem, just trying to help :-)

> I do know how to synchronize method calls inside my communication layer. In fact I can make every call synchronous. But, of course, I would loose on performance and it just doesn't seem elegant.
> The point I was making submitting the bug reprot, was that I feel I shouldn't be forced to take care about such subtleties. In my opinion this synchronization should be managed by txAMQP itself.

txAMQP already handles serialization so that multiple requests are
sent in the right order. However adding a second layer to it increases
its complexity, and adding a DeferredLock to it would create yet
another Deferred for every method call, which seriously hampers
performance.

Also, I'm not so sure about your concerns regarding performance with
the callee issuing one control method at a time, after all you're
doing this during the setup of your application, unless you create
tons of consumers at several times while the application is running
(which you shouldn't be doing at all). You only need to call
queue_declare, basic_consume, etc. once. Also, basic_deliver, which is
called often during the application lifecycle, doesn't expect a
response. And listening on a queue for messages is inherently
asynchronous.

Cheers.