[openstack-dev] A proposal for RPC-friendly objects

Mark Washenberger mark.washenberger at markwash.net
Tue May 7 05:56:10 UTC 2013


On Mon, May 6, 2013 at 5:20 PM, Dan Smith <dms at danplanet.com> wrote:

> > I was just wondering about the magic rpc part.
> >
> > It might be controversial but is a decorator the right way to go?
>
> To summarize the discussion we just had on IRC: yes. The decorator
> provides us the simple per-method indirection needed to call out to the
> actual implementation via RPC if our service is marked as
> should-be-remote. Function decorators are for modifying or augmenting
> the behavior of a function call, which is what is being done here.
>

 With the decorator approach, how do you handle the case where magic_method
has to do something different based on the attributes of the object that
has the method? Say for example, if different nova compute instances needed
to have rpc messages go to different exchanges, topics, or servers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130506/e6aadb5f/attachment.html>


More information about the OpenStack-dev mailing list