[openstack-dev] A proposal for RPC-friendly objects
Dan Smith
dms at danplanet.com
Tue May 7 14:03:02 UTC 2013
> 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?
Good question!
The short answer is: "we don't need to do that." The longer answer is:
The magic decorator just indicates that object-level operations should
go to some service that handles your objects. In Nova, this would be
conductor. Since this is not generic object-oriented middleware RPC
(i.e. instance.reboot()), there is no need to direct the magic RPC call
to another exchange, topic, or server.
Again, using the Nova/conductor example, today when we need to take
action on some piece of data in the database from a compute node, we
make a call to the conductor topic, which ends up being handled by one
of the many conductor servers running. The object proposal doesn't
change what is happening, just how we get there.
Thanks!
--Dan
More information about the OpenStack-dev
mailing list