[openstack-dev] Opinions needed: Changing method signature in RPC callback ...

Sandy Walsh sandy.walsh at rackspace.com
Fri Jul 19 12:36:05 UTC 2013



On 07/18/2013 05:56 PM, Eric Windisch wrote:
> 
>     > These callback methods are part of the Kombu driver (and maybe part of
>     > Qpid), but are NOT part of the RPC abstraction. These are private
>     > methods. They can be broken for external consumers of these methods,
>     > because there shouldn't be any. It will be a good lesson to anyone
>     that
>     > tries to abuse private methods.
> 
>     I was wondering about that, but I assumed some parts of amqp.py were
>     used by other transports as well (and not just impl_kombu.py)
> 
>     There are several callbacks in amqp.py that would be affected.
> 
>  
> The code in amqp.py is used by the Kombu and Qpid drivers and might
> implement the public methods expected by the abstraction, but does not
> define it. The RPC abstraction is defined in __init__.py, and does not
> define callbacks. Other drivers, granted only being the ZeroMQ driver at
> present, are not expected to define a callback method and as a private
> method -- would have no template to follow nor an expectation to have
> this method.
> 
> I'm not saying your proposed changes are bad or invalid, but there is no
> need to make concessions to the possibility that code outside of oslo
> would be using callback(). This opens up the option, besides creating a
> new method, to simply updating all the existing method calls that exist
> in amqp.py, impl_kombu.py, and impl_qpid.py.

Gotcha ... thanks Eric. Yeah, the outer api is very generic.

I did a little more research and, unfortunately, it seems the inner amqp
implementations are being used by others. So I'll have to be careful
with the callback signature. Ceilometer, for example, seems to be
leaving zeromq support as an exercise for the reader.

Perhaps oslo-messaging will make this abstraction easier to enforce.

Cheers!
-S


> 
> -- 
> Regards,
> Eric Windisch
> 
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 



More information about the OpenStack-dev mailing list