[openstack-dev] [nova][oslo] RPC Asynchronous Communication

Sahid Orentino Ferdjaoui sahid.ferdjaoui at redhat.com
Thu May 7 09:34:51 UTC 2015


Hi,

The primary point of this expected discussion around asynchronous
communication is to optimize performance by reducing latency.

For instance the design used in Nova and probably other projects let
able to operate ascynchronous operations from two way.

1. When communicate between inter-services
2. When communicate to the database

1 and 2 are close since they use the same API but I prefer to keep a
difference here since the high level layer is not the same.

>From Oslo Messaging point of view we currently have two methods to
invoke an RPC:

  Cast and Call: The first one is not bloking and will invoke a RPC
    without to wait any response while the second will block the
    process and wait for the response.

The aim is to add new method which will return without to block the
process an object let's call it "Future" which will provide some basic
methods to wait and get a response at any time.

The benefice from Nova will comes on a higher level:

1. When communicate between services it will be not necessary to block
   the process and use this free time to execute some other
   computations.

      future = rpcapi.invoke_long_process()
         ... do something else here ...
      result = future.get_response()

2. We can use the benefice of all of the work previously done with the
   Conductor and so by updating the framework Objects and Indirection
   Api we should take advantage of async operations to the database.

       MyObject = MyClassObject.get_async()
         ... do something else here ...
       MyObject.wait()

       MyObject.foo = "bar"
       MyObject.save_async()
         ... do something else here ...
       MyObject.wait()

All of this is to illustrate and have to be discussed.

I guess the first job needs to come from Oslo Messaging so the
question is to know the feeling here and then from Nova since it will
be the primary consumer of this feature.

https://blueprints.launchpad.net/nova/+spec/asynchronous-communication

Thanks,
s.



More information about the OpenStack-dev mailing list